From 83cc2e57751396bea0df4ba56c04b315aa9b93e8 Mon Sep 17 00:00:00 2001 From: Evan Sims Date: Sun, 22 Sep 2024 18:31:47 -0500 Subject: [PATCH] release: v0.7.2 --- CHANGELOG.md | 14 ++++++++++++++ example/example1/requirements.txt | 2 +- example/example1/setup.py | 2 +- openfga_sdk/__init__.py | 2 +- openfga_sdk/api_client.py | 2 +- openfga_sdk/configuration.py | 2 +- openfga_sdk/oauth2.py | 2 +- openfga_sdk/sync/api_client.py | 2 +- openfga_sdk/sync/oauth2.py | 2 +- setup.py | 2 +- test/api/open_fga_api_test.py | 4 ++-- test/oauth2_test.py | 2 +- test/sync/oauth2_test.py | 2 +- test/sync/open_fga_api_test.py | 4 ++-- 14 files changed, 29 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30cff5a..7522437 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## v0.7.2 + +### [0.7.2](https://github.com/openfga/python-sdk/compare/v0.7.1...v0.7.2) (2024-09-22) + +This release includes improvements to the OpenTelemetry configuration API introduced in the previous releases + +- refactor: improve OpenTelemetry configuration (#127) + +This release also includes fixes for several bugs identified in previous releases: + +- fix: ensure max_parallel_requests is an int value in batch_check (#132) +- fix: inconsistency in 429 handling between sync/async client (#131) +- fix: ensure telemetry is reported when API exceptions are raised (#127) + ## v0.7.1 ### [0.7.1](https://github.com/openfga/python-sdk/compare/v0.7.0...v0.7.1) (2024-09-16) diff --git a/example/example1/requirements.txt b/example/example1/requirements.txt index 6b9713c..aa8d03e 100644 --- a/example/example1/requirements.txt +++ b/example/example1/requirements.txt @@ -4,7 +4,7 @@ attrs >= 23.1.0 frozenlist >= 1.4.1 idna >= 3.6 multidict >= 6.0.4 -openfga-sdk >= 0.7.1 +openfga-sdk >= 0.7.2 python-dateutil >= 2.8.2 urllib3 >= 2.1.0 yarl >= 1.9.4 diff --git a/example/example1/setup.py b/example/example1/setup.py index 6c719fa..12de8b7 100644 --- a/example/example1/setup.py +++ b/example/example1/setup.py @@ -14,7 +14,7 @@ NAME = "example1" VERSION = "0.0.1" -REQUIRES = ["openfga-sdk >= 0.7.1"] +REQUIRES = ["openfga-sdk >= 0.7.2"] setup( name=NAME, diff --git a/openfga_sdk/__init__.py b/openfga_sdk/__init__.py index a3f93f5..b04feb6 100644 --- a/openfga_sdk/__init__.py +++ b/openfga_sdk/__init__.py @@ -10,7 +10,7 @@ NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ -__version__ = "0.7.1" +__version__ = "0.7.2" from openfga_sdk.api.open_fga_api import OpenFgaApi from openfga_sdk.api_client import ApiClient diff --git a/openfga_sdk/api_client.py b/openfga_sdk/api_client.py index 337a6e0..5c4d144 100644 --- a/openfga_sdk/api_client.py +++ b/openfga_sdk/api_client.py @@ -36,7 +36,7 @@ from openfga_sdk.telemetry import Telemetry from openfga_sdk.telemetry.attributes import TelemetryAttribute, TelemetryAttributes -DEFAULT_USER_AGENT = "openfga-sdk python/0.7.1" +DEFAULT_USER_AGENT = "openfga-sdk python/0.7.2" def random_time(loop_count, min_wait_in_ms): diff --git a/openfga_sdk/configuration.py b/openfga_sdk/configuration.py index f666a2d..51c8499 100644 --- a/openfga_sdk/configuration.py +++ b/openfga_sdk/configuration.py @@ -539,7 +539,7 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 1.x\n" - "SDK Package Version: 0.7.1".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 0.7.2".format(env=sys.platform, pyversion=sys.version) ) def get_host_settings(self): diff --git a/openfga_sdk/oauth2.py b/openfga_sdk/oauth2.py index 7b8651c..37354a2 100644 --- a/openfga_sdk/oauth2.py +++ b/openfga_sdk/oauth2.py @@ -83,7 +83,7 @@ async def _obtain_token(self, client): { "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "openfga-sdk (python) 0.7.1", + "User-Agent": "openfga-sdk (python) 0.7.2", } ) diff --git a/openfga_sdk/sync/api_client.py b/openfga_sdk/sync/api_client.py index 80abcb4..756a9f5 100644 --- a/openfga_sdk/sync/api_client.py +++ b/openfga_sdk/sync/api_client.py @@ -35,7 +35,7 @@ from openfga_sdk.telemetry import Telemetry from openfga_sdk.telemetry.attributes import TelemetryAttribute, TelemetryAttributes -DEFAULT_USER_AGENT = "openfga-sdk python/0.7.1" +DEFAULT_USER_AGENT = "openfga-sdk python/0.7.2" def random_time(loop_count, min_wait_in_ms): diff --git a/openfga_sdk/sync/oauth2.py b/openfga_sdk/sync/oauth2.py index c35d3a2..bb5b342 100644 --- a/openfga_sdk/sync/oauth2.py +++ b/openfga_sdk/sync/oauth2.py @@ -83,7 +83,7 @@ def _obtain_token(self, client): { "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "openfga-sdk (python) 0.7.1", + "User-Agent": "openfga-sdk (python) 0.7.2", } ) diff --git a/setup.py b/setup.py index 1b824b4..f305045 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ from setuptools import find_packages, setup NAME = "openfga-sdk" -VERSION = "0.7.1" +VERSION = "0.7.2" REQUIRES = [] diff --git a/test/api/open_fga_api_test.py b/test/api/open_fga_api_test.py index e7fa5f2..a873f0f 100644 --- a/test/api/open_fga_api_test.py +++ b/test/api/open_fga_api_test.py @@ -1520,7 +1520,7 @@ async def test_check_api_token(self, mock_request): { "Accept": "application/json", "Content-Type": "application/json", - "User-Agent": "openfga-sdk python/0.7.1", + "User-Agent": "openfga-sdk python/0.7.2", "Authorization": "Bearer TOKEN1", } ) @@ -1574,7 +1574,7 @@ async def test_check_custom_header(self, mock_request): { "Accept": "application/json", "Content-Type": "application/json", - "User-Agent": "openfga-sdk python/0.7.1", + "User-Agent": "openfga-sdk python/0.7.2", "Custom Header": "custom value", } ) diff --git a/test/oauth2_test.py b/test/oauth2_test.py index 4d3dec7..a131874 100644 --- a/test/oauth2_test.py +++ b/test/oauth2_test.py @@ -84,7 +84,7 @@ async def test_get_authentication_obtain_client_credentials(self, mock_request): { "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "openfga-sdk (python) 0.7.1", + "User-Agent": "openfga-sdk (python) 0.7.2", } ) mock_request.assert_called_once_with( diff --git a/test/sync/oauth2_test.py b/test/sync/oauth2_test.py index 8cda5cc..ebb1f95 100644 --- a/test/sync/oauth2_test.py +++ b/test/sync/oauth2_test.py @@ -84,7 +84,7 @@ def test_get_authentication_obtain_client_credentials(self, mock_request): { "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "openfga-sdk (python) 0.7.1", + "User-Agent": "openfga-sdk (python) 0.7.2", } ) mock_request.assert_called_once_with( diff --git a/test/sync/open_fga_api_test.py b/test/sync/open_fga_api_test.py index ea4f56f..8ba1115 100644 --- a/test/sync/open_fga_api_test.py +++ b/test/sync/open_fga_api_test.py @@ -1520,7 +1520,7 @@ async def test_check_api_token(self, mock_request): { "Accept": "application/json", "Content-Type": "application/json", - "User-Agent": "openfga-sdk python/0.7.1", + "User-Agent": "openfga-sdk python/0.7.2", "Authorization": "Bearer TOKEN1", } ) @@ -1574,7 +1574,7 @@ async def test_check_custom_header(self, mock_request): { "Accept": "application/json", "Content-Type": "application/json", - "User-Agent": "openfga-sdk python/0.7.1", + "User-Agent": "openfga-sdk python/0.7.2", "Custom Header": "custom value", } )