diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cbff9d4a..ccb3566a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.90.2" + ".": "0.90.3" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index c5254b76..40143a4b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 156 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-18973e063e9e9233433290bb4d641df8e17e1f21f5b1ec57e00182f0a48dbdec.yml openapi_spec_hash: ab503dc3772f962b603ade7b91b8534c -config_hash: 6729d695e399d14fff4891b6b82ec86c +config_hash: cb39eda3ababfc0a6d3a5ac0c2a5ec7a diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d99a9a7..7067ee44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.90.3 (2025-04-14) + +Full Changelog: [v0.90.2...v0.90.3](https://github.com/lithic-com/lithic-python/compare/v0.90.2...v0.90.3) + +### Chores + +* **client:** minor internal fixes ([67e2aa9](https://github.com/lithic-com/lithic-python/commit/67e2aa9108a631f0c97fea32cd8e4519944f0ffd)) +* **internal:** update pyright settings ([04ac3ad](https://github.com/lithic-com/lithic-python/commit/04ac3adac96fd5c2fc7d6eb0db21e396f0764d63)) + ## 0.90.2 (2025-04-11) Full Changelog: [v0.90.1...v0.90.2](https://github.com/lithic-com/lithic-python/compare/v0.90.1...v0.90.2) diff --git a/mypy.ini b/mypy.ini index c0bb47f6..d895d267 100644 --- a/mypy.ini +++ b/mypy.ini @@ -8,7 +8,7 @@ show_error_codes = True # # We also exclude our `tests` as mypy doesn't always infer # types correctly and Pyright will still catch any type errors. -exclude = ^(src/lithic/_files\.py|_dev/.*\.py|tests/.*|src/lithic/resources/external_bank_accounts/external_bank_accounts\.py)$ +exclude = ^(src/lithic/_files\.py|_dev/.*\.py|tests/.*)$ strict_equality = True implicit_reexport = True diff --git a/pyproject.toml b/pyproject.toml index 503b9057..a97db1ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "lithic" -version = "0.90.2" +version = "0.90.3" description = "The official Python library for the lithic API" dynamic = ["readme"] license = "Apache-2.0" @@ -147,11 +147,10 @@ exclude = [ ] reportImplicitOverride = true +reportOverlappingOverload = false reportImportCycles = false reportPrivateUsage = false -reportOverlappingOverload = false - [tool.ruff] line-length = 120 diff --git a/src/lithic/_base_client.py b/src/lithic/_base_client.py index c3a3eb97..108ac3fc 100644 --- a/src/lithic/_base_client.py +++ b/src/lithic/_base_client.py @@ -410,7 +410,8 @@ def _build_headers(self, options: FinalRequestOptions, *, retries_taken: int = 0 idempotency_header = self._idempotency_header if idempotency_header and options.method.lower() != "get" and idempotency_header not in headers: - headers[idempotency_header] = options.idempotency_key or self._idempotency_key() + options.idempotency_key = options.idempotency_key or self._idempotency_key() + headers[idempotency_header] = options.idempotency_key # Don't set these headers if they were already set or removed by the caller. We check # `custom_headers`, which can contain `Omit()`, instead of `headers` to account for the removal case. @@ -944,6 +945,10 @@ def _request( request = self._build_request(options, retries_taken=retries_taken) self._prepare_request(request) + if options.idempotency_key: + # ensure the idempotency key is reused between requests + input_options.idempotency_key = options.idempotency_key + kwargs: HttpxSendArgs = {} if self.custom_auth is not None: kwargs["auth"] = self.custom_auth @@ -1490,6 +1495,10 @@ async def _request( request = self._build_request(options, retries_taken=retries_taken) await self._prepare_request(request) + if options.idempotency_key: + # ensure the idempotency key is reused between requests + input_options.idempotency_key = options.idempotency_key + kwargs: HttpxSendArgs = {} if self.custom_auth is not None: kwargs["auth"] = self.custom_auth diff --git a/src/lithic/_version.py b/src/lithic/_version.py index 5cb01030..92b76556 100644 --- a/src/lithic/_version.py +++ b/src/lithic/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "lithic" -__version__ = "0.90.2" # x-release-please-version +__version__ = "0.90.3" # x-release-please-version