diff --git a/.release-please-manifest.json b/.release-please-manifest.json index da3cbca0..5944faf5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.2.0-alpha.52" + ".": "0.2.0-alpha.53" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a6e30e8..fcd87ff9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,20 @@ 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.2.0-alpha.53 (2025-04-15) + +Full Changelog: [v0.2.0-alpha.52...v0.2.0-alpha.53](https://github.com/openlayer-ai/openlayer-python/compare/v0.2.0-alpha.52...v0.2.0-alpha.53) + +### Features + +* fix: verify SSL by default and disable it via env var ([92f8b70](https://github.com/openlayer-ai/openlayer-python/commit/92f8b7055c4721edc8a6ec1ab9e678ff6bf18e97)) + + +### Chores + +* **client:** minor internal fixes ([cb7cdf2](https://github.com/openlayer-ai/openlayer-python/commit/cb7cdf29f19b6131dcfb0a47dcbfd20f1b6659b6)) +* **internal:** update pyright settings ([0e70ac7](https://github.com/openlayer-ai/openlayer-python/commit/0e70ac7853b7c2a353da7021e7454096c0ea6524)) + ## 0.2.0-alpha.52 (2025-04-14) Full Changelog: [v0.2.0-alpha.51...v0.2.0-alpha.52](https://github.com/openlayer-ai/openlayer-python/compare/v0.2.0-alpha.51...v0.2.0-alpha.52) diff --git a/pyproject.toml b/pyproject.toml index 81f9b604..21275674 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openlayer" -version = "0.2.0-alpha.52" +version = "0.2.0-alpha.53" description = "The official Python library for the openlayer API" dynamic = ["readme"] license = "Apache-2.0" @@ -155,6 +155,7 @@ exclude = [ ignore = ["src/openlayer/lib/*", "examples/*"] reportImplicitOverride = true +reportOverlappingOverload = false reportImportCycles = false reportPrivateUsage = false diff --git a/src/openlayer/_base_client.py b/src/openlayer/_base_client.py index 38a3b467..dcc1a63e 100644 --- a/src/openlayer/_base_client.py +++ b/src/openlayer/_base_client.py @@ -409,7 +409,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. @@ -943,6 +944,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 @@ -1475,6 +1480,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/openlayer/_version.py b/src/openlayer/_version.py index 96631d01..c52bf153 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.2.0-alpha.52" # x-release-please-version +__version__ = "0.2.0-alpha.53" # x-release-please-version diff --git a/src/openlayer/lib/tracing/tracer.py b/src/openlayer/lib/tracing/tracer.py index 4e099416..aedd9d3d 100644 --- a/src/openlayer/lib/tracing/tracer.py +++ b/src/openlayer/lib/tracing/tracer.py @@ -20,7 +20,9 @@ TRUE_LIST = ["true", "on", "1"] _publish = utils.get_env_variable("OPENLAYER_DISABLE_PUBLISH") not in TRUE_LIST -_verify_ssl = utils.get_env_variable("OPENLAYER_VERIFY_SSL").lower() in TRUE_LIST +_verify_ssl = ( + utils.get_env_variable("OPENLAYER_VERIFY_SSL", "true").lower() in TRUE_LIST +) _client = None if _publish: if _verify_ssl: