From af321744159580393ccbf560d900f13d204a13b6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 11 Apr 2026 06:48:56 +0000 Subject: [PATCH 1/2] fix: ensure file data are only sent as 1 parameter --- src/openlayer/_utils/_utils.py | 5 +++-- tests/test_extract_files.py | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/openlayer/_utils/_utils.py b/src/openlayer/_utils/_utils.py index eec7f4a1..63b8cd60 100644 --- a/src/openlayer/_utils/_utils.py +++ b/src/openlayer/_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/tests/test_extract_files.py b/tests/test_extract_files.py index 0d33d0a0..d043d680 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", [ From a2757958bbc7ac7cf12e5a6b13ded09cb3deb204 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 11 Apr 2026 06:49:17 +0000 Subject: [PATCH 2/2] release: 0.23.3 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/openlayer/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c9da8cc1..66788158 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.23.2" + ".": "0.23.3" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index f2606382..45c56987 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 0.23.3 (2026-04-11) + +Full Changelog: [v0.23.2...v0.23.3](https://github.com/openlayer-ai/openlayer-python/compare/v0.23.2...v0.23.3) + +### Bug Fixes + +* ensure file data are only sent as 1 parameter ([af32174](https://github.com/openlayer-ai/openlayer-python/commit/af321744159580393ccbf560d900f13d204a13b6)) + ## 0.23.2 (2026-04-10) Full Changelog: [v0.23.1...v0.23.2](https://github.com/openlayer-ai/openlayer-python/compare/v0.23.1...v0.23.2) diff --git a/pyproject.toml b/pyproject.toml index 33895b9a..347c23e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openlayer" -version = "0.23.2" +version = "0.23.3" description = "The official Python library for the openlayer API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/openlayer/_version.py b/src/openlayer/_version.py index 03527711..9b9fc192 100644 --- a/src/openlayer/_version.py +++ b/src/openlayer/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "openlayer" -__version__ = "0.23.2" # x-release-please-version +__version__ = "0.23.3" # x-release-please-version