diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1040019e..76f30e4a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "5.25.1" + ".": "5.25.2" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e3dc5d4..16f406f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 5.25.2 (2026-04-11) + +Full Changelog: [v5.25.1...v5.25.2](https://github.com/RetellAI/retell-python-sdk/compare/v5.25.1...v5.25.2) + +### Bug Fixes + +* ensure file data are only sent as 1 parameter ([f78c675](https://github.com/RetellAI/retell-python-sdk/commit/f78c6756701a322eaffc2fd88926dc23be926b69)) + ## 5.25.1 (2026-04-08) Full Changelog: [v5.25.0...v5.25.1](https://github.com/RetellAI/retell-python-sdk/compare/v5.25.0...v5.25.1) diff --git a/pyproject.toml b/pyproject.toml index ad59b855..765ab876 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "retell-sdk" -version = "5.25.1" +version = "5.25.2" description = "The official Python library for the retell API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/retell/_utils/_utils.py b/src/retell/_utils/_utils.py index 09779d13..c96a2bc0 100644 --- a/src/retell/_utils/_utils.py +++ b/src/retell/_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/retell/_version.py b/src/retell/_version.py index fab01d1e..c476bd70 100644 --- a/src/retell/_version.py +++ b/src/retell/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "retell" -__version__ = "5.25.1" # x-release-please-version +__version__ = "5.25.2" # x-release-please-version diff --git a/tests/test_extract_files.py b/tests/test_extract_files.py index 979837e3..6f4e4c5f 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", [