diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ef07f9..a6a7746 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,14 +61,18 @@ jobs: run: rye build - name: Get GitHub OIDC Token - if: github.repository == 'stainless-sdks/supermemory-new-python' + if: |- + github.repository == 'stainless-sdks/supermemory-new-python' && + !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc uses: actions/github-script@v8 with: script: core.setOutput('github_token', await core.getIDToken()); - name: Upload tarball - if: github.repository == 'stainless-sdks/supermemory-new-python' + if: |- + github.repository == 'stainless-sdks/supermemory-new-python' && + !startsWith(github.ref, 'refs/heads/stl/') env: URL: https://pkg.stainless.com/s AUTH: ${{ steps.github-oidc.outputs.github_token }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 14e0f91..53e0b74 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.27.0" + ".": "3.28.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index d698bd5..1aa117c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 26 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-062b5e0b84ca5acf4b18f1a9650e023e1908ee6f2b88465e55ba5213ee9257bf.yml -openapi_spec_hash: c465d5d777712bec4bdd8e6aa81a0da9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-8d6903994bad6e2f9510fb021df21f84a3efa8f63abfff814455d666efa7388a.yml +openapi_spec_hash: f9e80ec52ae9aecbd23a365dc1a3932f config_hash: f3eb5ca71172780678106f6d46f15dda diff --git a/CHANGELOG.md b/CHANGELOG.md index 30d8925..a087768 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 3.28.0 (2026-03-09) + +Full Changelog: [v3.27.0...v3.28.0](https://github.com/supermemoryai/python-sdk/compare/v3.27.0...v3.28.0) + +### Features + +* **api:** api update ([0631be2](https://github.com/supermemoryai/python-sdk/commit/0631be2c3b7274f34b362ddc902c7f377c5ee11b)) + + +### Chores + +* **ci:** skip uploading artifacts on stainless-internal branches ([9b8ce06](https://github.com/supermemoryai/python-sdk/commit/9b8ce065606550ceec128b6d8e0fd15f51c3c32d)) +* **internal:** make `test_proxy_environment_variables` more resilient to env ([0f56565](https://github.com/supermemoryai/python-sdk/commit/0f5656508ff42b297ec9a47b40d06a5ffc0a1a7e)) +* update placeholder string ([f37dc85](https://github.com/supermemoryai/python-sdk/commit/f37dc85ff4113d4a8c7f1155eecd8ae90db5bb14)) + ## 3.27.0 (2026-02-24) Full Changelog: [v3.26.0...v3.27.0](https://github.com/supermemoryai/python-sdk/compare/v3.26.0...v3.27.0) diff --git a/pyproject.toml b/pyproject.toml index 4f7eb77..291232b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "supermemory" -version = "3.27.0" +version = "3.28.0" description = "The official Python library for the supermemory API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/supermemory/_client.py b/src/supermemory/_client.py index 7eff718..3ee8280 100644 --- a/src/supermemory/_client.py +++ b/src/supermemory/_client.py @@ -258,10 +258,10 @@ def add( website, a PDF, an image, or a video. container_tag: Optional tag this document should be containerized by. Max 100 characters, - alphanumeric with hyphens and underscores only. + alphanumeric with hyphens, underscores, and dots only. custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with - hyphens and underscores only. + hyphens, underscores, and dots only. entity_context: Optional entity context for this container tag. Max 1500 characters. Used during document processing to guide memory extraction. @@ -571,10 +571,10 @@ async def add( website, a PDF, an image, or a video. container_tag: Optional tag this document should be containerized by. Max 100 characters, - alphanumeric with hyphens and underscores only. + alphanumeric with hyphens, underscores, and dots only. custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with - hyphens and underscores only. + hyphens, underscores, and dots only. entity_context: Optional entity context for this container tag. Max 1500 characters. Used during document processing to guide memory extraction. diff --git a/src/supermemory/_version.py b/src/supermemory/_version.py index d8303c6..40b2ac4 100644 --- a/src/supermemory/_version.py +++ b/src/supermemory/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "supermemory" -__version__ = "3.27.0" # x-release-please-version +__version__ = "3.28.0" # x-release-please-version diff --git a/src/supermemory/resources/connections.py b/src/supermemory/resources/connections.py index 6e50399..c96b4be 100644 --- a/src/supermemory/resources/connections.py +++ b/src/supermemory/resources/connections.py @@ -65,6 +65,7 @@ def create( self, provider: Literal["notion", "google-drive", "onedrive", "gmail", "github", "web-crawler", "s3"], *, + container_tag: str | Omit = omit, container_tags: SequenceNotStr[str] | Omit = omit, document_limit: int | Omit = omit, metadata: Optional[Dict[str, Union[str, float, bool]]] | Omit = omit, @@ -94,6 +95,7 @@ def create( f"/v3/connections/{provider}", body=maybe_transform( { + "container_tag": container_tag, "container_tags": container_tags, "document_limit": document_limit, "metadata": metadata, @@ -468,6 +470,7 @@ async def create( self, provider: Literal["notion", "google-drive", "onedrive", "gmail", "github", "web-crawler", "s3"], *, + container_tag: str | Omit = omit, container_tags: SequenceNotStr[str] | Omit = omit, document_limit: int | Omit = omit, metadata: Optional[Dict[str, Union[str, float, bool]]] | Omit = omit, @@ -497,6 +500,7 @@ async def create( f"/v3/connections/{provider}", body=await async_maybe_transform( { + "container_tag": container_tag, "container_tags": container_tags, "document_limit": document_limit, "metadata": metadata, diff --git a/src/supermemory/resources/documents.py b/src/supermemory/resources/documents.py index 4b0a3a6..4fb46e7 100644 --- a/src/supermemory/resources/documents.py +++ b/src/supermemory/resources/documents.py @@ -256,10 +256,10 @@ def add( website, a PDF, an image, or a video. container_tag: Optional tag this document should be containerized by. Max 100 characters, - alphanumeric with hyphens and underscores only. + alphanumeric with hyphens, underscores, and dots only. custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with - hyphens and underscores only. + hyphens, underscores, and dots only. entity_context: Optional entity context for this container tag. Max 1500 characters. Used during document processing to guide memory extraction. @@ -743,10 +743,10 @@ async def add( website, a PDF, an image, or a video. container_tag: Optional tag this document should be containerized by. Max 100 characters, - alphanumeric with hyphens and underscores only. + alphanumeric with hyphens, underscores, and dots only. custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with - hyphens and underscores only. + hyphens, underscores, and dots only. entity_context: Optional entity context for this container tag. Max 1500 characters. Used during document processing to guide memory extraction. diff --git a/src/supermemory/types/client_add_params.py b/src/supermemory/types/client_add_params.py index 8f1830e..77b21d6 100644 --- a/src/supermemory/types/client_add_params.py +++ b/src/supermemory/types/client_add_params.py @@ -21,7 +21,7 @@ class ClientAddParams(TypedDict, total=False): container_tag: Annotated[str, PropertyInfo(alias="containerTag")] """Optional tag this document should be containerized by. - Max 100 characters, alphanumeric with hyphens and underscores only. + Max 100 characters, alphanumeric with hyphens, underscores, and dots only. """ container_tags: Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")] @@ -29,7 +29,7 @@ class ClientAddParams(TypedDict, total=False): custom_id: Annotated[str, PropertyInfo(alias="customId")] """Optional custom ID of the document. - Max 100 characters, alphanumeric with hyphens and underscores only. + Max 100 characters, alphanumeric with hyphens, underscores, and dots only. """ entity_context: Annotated[str, PropertyInfo(alias="entityContext")] diff --git a/src/supermemory/types/connection_create_params.py b/src/supermemory/types/connection_create_params.py index 1c8d823..fcd9923 100644 --- a/src/supermemory/types/connection_create_params.py +++ b/src/supermemory/types/connection_create_params.py @@ -12,6 +12,8 @@ class ConnectionCreateParams(TypedDict, total=False): + container_tag: Annotated[str, PropertyInfo(alias="containerTag")] + container_tags: Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")] document_limit: Annotated[int, PropertyInfo(alias="documentLimit")] diff --git a/src/supermemory/types/document_add_params.py b/src/supermemory/types/document_add_params.py index ed71ceb..71d9fbd 100644 --- a/src/supermemory/types/document_add_params.py +++ b/src/supermemory/types/document_add_params.py @@ -21,7 +21,7 @@ class DocumentAddParams(TypedDict, total=False): container_tag: Annotated[str, PropertyInfo(alias="containerTag")] """Optional tag this document should be containerized by. - Max 100 characters, alphanumeric with hyphens and underscores only. + Max 100 characters, alphanumeric with hyphens, underscores, and dots only. """ container_tags: Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")] @@ -29,7 +29,7 @@ class DocumentAddParams(TypedDict, total=False): custom_id: Annotated[str, PropertyInfo(alias="customId")] """Optional custom ID of the document. - Max 100 characters, alphanumeric with hyphens and underscores only. + Max 100 characters, alphanumeric with hyphens, underscores, and dots only. """ entity_context: Annotated[str, PropertyInfo(alias="entityContext")] diff --git a/tests/api_resources/test_connections.py b/tests/api_resources/test_connections.py index 0c8d8d3..b78b0df 100644 --- a/tests/api_resources/test_connections.py +++ b/tests/api_resources/test_connections.py @@ -40,7 +40,8 @@ def test_method_create(self, client: Supermemory) -> None: def test_method_create_with_all_params(self, client: Supermemory) -> None: connection = client.connections.create( provider="notion", - container_tags=["string"], + container_tag="containerTag", + container_tags=["_1K--W2kIFj1"], document_limit=1, metadata={"foo": "string"}, redirect_url="redirectUrl", @@ -470,7 +471,8 @@ async def test_method_create(self, async_client: AsyncSupermemory) -> None: async def test_method_create_with_all_params(self, async_client: AsyncSupermemory) -> None: connection = await async_client.connections.create( provider="notion", - container_tags=["string"], + container_tag="containerTag", + container_tags=["_1K--W2kIFj1"], document_limit=1, metadata={"foo": "string"}, redirect_url="redirectUrl", diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index 5264c9d..53a1503 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -417,7 +417,7 @@ def test_streaming_response_list_processing(self, client: Supermemory) -> None: @parametrize def test_method_upload_file(self, client: Supermemory) -> None: document = client.documents.upload_file( - file=b"raw file contents", + file=b"Example data", ) assert_matches_type(DocumentUploadFileResponse, document, path=["response"]) @@ -425,7 +425,7 @@ def test_method_upload_file(self, client: Supermemory) -> None: @parametrize def test_method_upload_file_with_all_params(self, client: Supermemory) -> None: document = client.documents.upload_file( - file=b"raw file contents", + file=b"Example data", container_tags='["user_123", "project_123"]', file_type="image", metadata='{"category": "technology", "isPublic": true, "readingTime": 5}', @@ -438,7 +438,7 @@ def test_method_upload_file_with_all_params(self, client: Supermemory) -> None: @parametrize def test_raw_response_upload_file(self, client: Supermemory) -> None: response = client.documents.with_raw_response.upload_file( - file=b"raw file contents", + file=b"Example data", ) assert response.is_closed is True @@ -450,7 +450,7 @@ def test_raw_response_upload_file(self, client: Supermemory) -> None: @parametrize def test_streaming_response_upload_file(self, client: Supermemory) -> None: with client.documents.with_streaming_response.upload_file( - file=b"raw file contents", + file=b"Example data", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -857,7 +857,7 @@ async def test_streaming_response_list_processing(self, async_client: AsyncSuper @parametrize async def test_method_upload_file(self, async_client: AsyncSupermemory) -> None: document = await async_client.documents.upload_file( - file=b"raw file contents", + file=b"Example data", ) assert_matches_type(DocumentUploadFileResponse, document, path=["response"]) @@ -865,7 +865,7 @@ async def test_method_upload_file(self, async_client: AsyncSupermemory) -> None: @parametrize async def test_method_upload_file_with_all_params(self, async_client: AsyncSupermemory) -> None: document = await async_client.documents.upload_file( - file=b"raw file contents", + file=b"Example data", container_tags='["user_123", "project_123"]', file_type="image", metadata='{"category": "technology", "isPublic": true, "readingTime": 5}', @@ -878,7 +878,7 @@ async def test_method_upload_file_with_all_params(self, async_client: AsyncSuper @parametrize async def test_raw_response_upload_file(self, async_client: AsyncSupermemory) -> None: response = await async_client.documents.with_raw_response.upload_file( - file=b"raw file contents", + file=b"Example data", ) assert response.is_closed is True @@ -890,7 +890,7 @@ async def test_raw_response_upload_file(self, async_client: AsyncSupermemory) -> @parametrize async def test_streaming_response_upload_file(self, async_client: AsyncSupermemory) -> None: async with async_client.documents.with_streaming_response.upload_file( - file=b"raw file contents", + file=b"Example data", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/test_client.py b/tests/test_client.py index 7084f73..1fdb84a 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -957,8 +957,14 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") - # Delete in case our environment has this set + # Delete in case our environment has any proxy env vars set monkeypatch.delenv("HTTP_PROXY", raising=False) + monkeypatch.delenv("ALL_PROXY", raising=False) + monkeypatch.delenv("NO_PROXY", raising=False) + monkeypatch.delenv("http_proxy", raising=False) + monkeypatch.delenv("https_proxy", raising=False) + monkeypatch.delenv("all_proxy", raising=False) + monkeypatch.delenv("no_proxy", raising=False) client = DefaultHttpxClient() @@ -1871,8 +1877,14 @@ async def test_get_platform(self) -> None: async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") - # Delete in case our environment has this set + # Delete in case our environment has any proxy env vars set monkeypatch.delenv("HTTP_PROXY", raising=False) + monkeypatch.delenv("ALL_PROXY", raising=False) + monkeypatch.delenv("NO_PROXY", raising=False) + monkeypatch.delenv("http_proxy", raising=False) + monkeypatch.delenv("https_proxy", raising=False) + monkeypatch.delenv("all_proxy", raising=False) + monkeypatch.delenv("no_proxy", raising=False) client = DefaultAsyncHttpxClient()