diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6c7bc2ea..e132657d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.21.1" + ".": "0.21.2" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 193d293b..df4dfbe5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.21.2 (2024-06-17) + +Full Changelog: [v0.21.1...v0.21.2](https://github.com/Finch-API/finch-api-python/compare/v0.21.1...v0.21.2) + +### Chores + +* **internal:** add a `default_query` method ([#402](https://github.com/Finch-API/finch-api-python/issues/402)) ([2afe0c6](https://github.com/Finch-API/finch-api-python/commit/2afe0c61507c7813f1b5479d209f5c52f21b5885)) + ## 0.21.1 (2024-06-07) Full Changelog: [v0.21.0...v0.21.1](https://github.com/Finch-API/finch-api-python/compare/v0.21.0...v0.21.1) diff --git a/pyproject.toml b/pyproject.toml index 3dab6c2c..394c8240 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "finch-api" -version = "0.21.1" +version = "0.21.2" description = "The official Python library for the Finch API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/finch/_base_client.py b/src/finch/_base_client.py index 128e20d2..05df2cd6 100644 --- a/src/finch/_base_client.py +++ b/src/finch/_base_client.py @@ -457,7 +457,7 @@ def _build_request( raise RuntimeError(f"Unexpected JSON data type, {type(json_data)}, cannot merge with `extra_body`") headers = self._build_headers(options) - params = _merge_mappings(self._custom_query, options.params) + params = _merge_mappings(self.default_query, options.params) content_type = headers.get("Content-Type") # If the given Content-Type header is multipart/form-data then it @@ -593,6 +593,12 @@ def default_headers(self) -> dict[str, str | Omit]: **self._custom_headers, } + @property + def default_query(self) -> dict[str, object]: + return { + **self._custom_query, + } + def _validate_headers( self, headers: Headers, # noqa: ARG002 diff --git a/src/finch/_version.py b/src/finch/_version.py index e183db80..157c5143 100644 --- a/src/finch/_version.py +++ b/src/finch/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "finch" -__version__ = "0.21.1" # x-release-please-version +__version__ = "0.21.2" # x-release-please-version