diff --git a/.release-please-manifest.json b/.release-please-manifest.json index df68d3d..b7ab6b5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.33.0" + ".": "3.33.1" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 8da8bc5..b978975 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-63361336422f9e8ab2d67ca0f0068c7ac5f162dae5ec6de35b362cc11f07a3cb.yml -openapi_spec_hash: 862585828a78f8f58ab03c27d6ac8db0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-3d1ed08ae874eafef0c275748f38e21c1e6a245ecad05db24dee27f4166f18db.yml +openapi_spec_hash: fa7ccfe7d4574c280f3189d020401032 config_hash: f3eb5ca71172780678106f6d46f15dda diff --git a/CHANGELOG.md b/CHANGELOG.md index a37f633..e64a56d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 3.33.1 (2026-04-11) + +Full Changelog: [v3.33.0...v3.33.1](https://github.com/supermemoryai/python-sdk/compare/v3.33.0...v3.33.1) + +### Bug Fixes + +* ensure file data are only sent as 1 parameter ([e1f2afd](https://github.com/supermemoryai/python-sdk/commit/e1f2afdd2cc08f93999cebf584a821360186feb3)) + + +### Documentation + +* improve examples ([82e512e](https://github.com/supermemoryai/python-sdk/commit/82e512e4c2698025269ab4a4c604eb344ee1f83f)) + ## 3.33.0 (2026-04-08) Full Changelog: [v3.32.0...v3.33.0](https://github.com/supermemoryai/python-sdk/compare/v3.32.0...v3.33.0) diff --git a/pyproject.toml b/pyproject.toml index 21e0a8f..5959589 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "supermemory" -version = "3.33.0" +version = "3.33.1" description = "The official Python library for the supermemory API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/supermemory/_utils/_utils.py b/src/supermemory/_utils/_utils.py index eec7f4a..63b8cd6 100644 --- a/src/supermemory/_utils/_utils.py +++ b/src/supermemory/_utils/_utils.py @@ -86,8 +86,9 @@ def _extract_items( index += 1 if is_dict(obj): try: - # We are at the last entry in the path so we must remove the field - if (len(path)) == index: + # Remove the field if there are no more dict keys in the path, + # only "" traversal markers or end. + if all(p == "" for p in path[index:]): item = obj.pop(key) else: item = obj[key] diff --git a/src/supermemory/_version.py b/src/supermemory/_version.py index 58787e5..d364648 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.33.0" # x-release-please-version +__version__ = "3.33.1" # x-release-please-version diff --git a/tests/api_resources/test_client.py b/tests/api_resources/test_client.py index f8b61f9..9d5c3a6 100644 --- a/tests/api_resources/test_client.py +++ b/tests/api_resources/test_client.py @@ -83,8 +83,8 @@ def test_method_profile_with_all_params(self, client: Supermemory) -> None: "key": "key", "value": "value", "filter_type": "metadata", - "ignore_case": True, - "negate": True, + "ignore_case": "true", + "negate": "true", "numeric_operator": ">", } ] @@ -192,8 +192,8 @@ async def test_method_profile_with_all_params(self, async_client: AsyncSupermemo "key": "key", "value": "value", "filter_type": "metadata", - "ignore_case": True, - "negate": True, + "ignore_case": "true", + "negate": "true", "numeric_operator": ">", } ] diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index 1e53699..75b82b8 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -105,7 +105,7 @@ def test_method_list_with_all_params(self, client: Supermemory) -> None: "key": "group", "value": "jira_users", "filter_type": "metadata", - "ignore_case": True, + "ignore_case": "true", "negate": False, "numeric_operator": ">", }, @@ -113,7 +113,7 @@ def test_method_list_with_all_params(self, client: Supermemory) -> None: "key": "timestamp", "value": "1742745777", "filter_type": "numeric", - "ignore_case": True, + "ignore_case": "true", "negate": False, "numeric_operator": ">", }, @@ -546,7 +546,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncSupermemory) "key": "group", "value": "jira_users", "filter_type": "metadata", - "ignore_case": True, + "ignore_case": "true", "negate": False, "numeric_operator": ">", }, @@ -554,7 +554,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncSupermemory) "key": "timestamp", "value": "1742745777", "filter_type": "numeric", - "ignore_case": True, + "ignore_case": "true", "negate": False, "numeric_operator": ">", }, diff --git a/tests/api_resources/test_search.py b/tests/api_resources/test_search.py index 2a0c2b6..265f091 100644 --- a/tests/api_resources/test_search.py +++ b/tests/api_resources/test_search.py @@ -46,8 +46,8 @@ def test_method_documents_with_all_params(self, client: Supermemory) -> None: "key": "key", "value": "value", "filter_type": "metadata", - "ignore_case": True, - "negate": True, + "ignore_case": "true", + "negate": "true", "numeric_operator": ">", } ] @@ -112,8 +112,8 @@ def test_method_execute_with_all_params(self, client: Supermemory) -> None: "key": "key", "value": "value", "filter_type": "metadata", - "ignore_case": True, - "negate": True, + "ignore_case": "true", + "negate": "true", "numeric_operator": ">", } ] @@ -174,8 +174,8 @@ def test_method_memories_with_all_params(self, client: Supermemory) -> None: "key": "key", "value": "value", "filter_type": "metadata", - "ignore_case": True, - "negate": True, + "ignore_case": "true", + "negate": "true", "numeric_operator": ">", } ] @@ -252,8 +252,8 @@ async def test_method_documents_with_all_params(self, async_client: AsyncSuperme "key": "key", "value": "value", "filter_type": "metadata", - "ignore_case": True, - "negate": True, + "ignore_case": "true", + "negate": "true", "numeric_operator": ">", } ] @@ -318,8 +318,8 @@ async def test_method_execute_with_all_params(self, async_client: AsyncSupermemo "key": "key", "value": "value", "filter_type": "metadata", - "ignore_case": True, - "negate": True, + "ignore_case": "true", + "negate": "true", "numeric_operator": ">", } ] @@ -380,8 +380,8 @@ async def test_method_memories_with_all_params(self, async_client: AsyncSupermem "key": "key", "value": "value", "filter_type": "metadata", - "ignore_case": True, - "negate": True, + "ignore_case": "true", + "negate": "true", "numeric_operator": ">", } ] diff --git a/tests/test_extract_files.py b/tests/test_extract_files.py index b5940c7..e777e25 100644 --- a/tests/test_extract_files.py +++ b/tests/test_extract_files.py @@ -35,6 +35,15 @@ def test_multiple_files() -> None: assert query == {"documents": [{}, {}]} +def test_top_level_file_array() -> None: + query = {"files": [b"file one", b"file two"], "title": "hello"} + assert extract_files(query, paths=[["files", ""]]) == [ + ("files[]", b"file one"), + ("files[]", b"file two"), + ] + assert query == {"title": "hello"} + + @pytest.mark.parametrize( "query,paths,expected", [