diff --git a/CHANGELOG.md b/CHANGELOG.md index a72e200..db9d9d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,19 @@ # Changelog -## [Unreleased](https://github.com/openfga/python-sdk/compare/v0.9.3...HEAD) +## [Unreleased](https://github.com/openfga/python-sdk/compare/v0.9.4...HEAD) + +### [0.9.4](https://github.com/openfga/python-sdk/compare/v0.9.3...0.9.4) (2025-04-30) + +- feat: support List Stores name filter (#181) +- feat: fix and improve retries and rate limit handling. (#176) - thanks @GMorris-professional + The SDK now respects the rate limit headers (`Retry-After`) returned by the server and will retry the request after the specified time. + If the header is not sent or on network errors, it will fall back to exponential backoff. +- feat: allow more user customizations for the token issuer (#186) - thanks @manuel-lang - fix: ListRelations should not swallow errors (#183) -- feat: feat: support List Stores name filter (#181) +- fix: urllib3 compatibility < v2 (#187) ### [0.9.3](https://github.com/openfga/python-sdk/compare/v0.9.2...v0.9.3) (2025-03-26) + - fix: urllib3 compatibility < v2 (#179) ### [0.9.2](https://github.com/openfga/python-sdk/compare/v0.9.1...v0.9.2) (2025-03-25) diff --git a/VERSION.txt b/VERSION.txt index 965065d..a602fc9 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -0.9.3 +0.9.4 diff --git a/example/example1/requirements.txt b/example/example1/requirements.txt index be19005..29275f2 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.9.3 +openfga-sdk >= 0.9.4 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 b4b7b4c..77787f3 100644 --- a/example/example1/setup.py +++ b/example/example1/setup.py @@ -15,7 +15,7 @@ NAME = "example1" VERSION = "0.0.1" -REQUIRES = ["openfga-sdk >= 0.9.3"] +REQUIRES = ["openfga-sdk >= 0.9.4"] setup( name=NAME, diff --git a/openfga_sdk/__init__.py b/openfga_sdk/__init__.py index 7b577e0..e57a523 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.9.3" +__version__ = "0.9.4" 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 2d5631f..9305ade 100644 --- a/openfga_sdk/api_client.py +++ b/openfga_sdk/api_client.py @@ -39,7 +39,7 @@ from openfga_sdk.telemetry.attributes import TelemetryAttribute, TelemetryAttributes -DEFAULT_USER_AGENT = "openfga-sdk python/0.9.3" +DEFAULT_USER_AGENT = "openfga-sdk python/0.9.4" def random_time(loop_count, min_wait_in_ms) -> float: diff --git a/openfga_sdk/configuration.py b/openfga_sdk/configuration.py index 7ccd972..01ed94b 100644 --- a/openfga_sdk/configuration.py +++ b/openfga_sdk/configuration.py @@ -538,7 +538,7 @@ def to_debug_report(self): f"OS: {sys.platform}\n" f"Python Version: {sys.version}\n" "Version of the API: 1.x\n" - "SDK Package Version: 0.9.3" + "SDK Package Version: 0.9.4" ) def get_host_settings(self): diff --git a/openfga_sdk/oauth2.py b/openfga_sdk/oauth2.py index 5b70374..222b251 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.9.3", + "User-Agent": "openfga-sdk (python) 0.9.4", } ) diff --git a/openfga_sdk/sync/api_client.py b/openfga_sdk/sync/api_client.py index c1fa860..5a5839b 100644 --- a/openfga_sdk/sync/api_client.py +++ b/openfga_sdk/sync/api_client.py @@ -38,7 +38,7 @@ from openfga_sdk.telemetry.attributes import TelemetryAttribute, TelemetryAttributes -DEFAULT_USER_AGENT = "openfga-sdk python/0.9.3" +DEFAULT_USER_AGENT = "openfga-sdk python/0.9.4" def random_time(loop_count, min_wait_in_ms) -> float: diff --git a/openfga_sdk/sync/oauth2.py b/openfga_sdk/sync/oauth2.py index 3858770..62eb788 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.9.3", + "User-Agent": "openfga-sdk (python) 0.9.4", } ) diff --git a/setup.py b/setup.py index 6c996b4..6805830 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ NAME = "openfga-sdk" -VERSION = "0.9.3" +VERSION = "0.9.4" REQUIRES = [] diff --git a/test/api/open_fga_api_test.py b/test/api/open_fga_api_test.py index 2c83b53..d21604a 100644 --- a/test/api/open_fga_api_test.py +++ b/test/api/open_fga_api_test.py @@ -1782,7 +1782,7 @@ async def test_check_api_token(self, mock_request): { "Accept": "application/json", "Content-Type": "application/json", - "User-Agent": "openfga-sdk python/0.9.3", + "User-Agent": "openfga-sdk python/0.9.4", "Authorization": "Bearer TOKEN1", } ) @@ -1836,7 +1836,7 @@ async def test_check_custom_header(self, mock_request): { "Accept": "application/json", "Content-Type": "application/json", - "User-Agent": "openfga-sdk python/0.9.3", + "User-Agent": "openfga-sdk python/0.9.4", "Custom Header": "custom value", } ) diff --git a/test/oauth2_test.py b/test/oauth2_test.py index 35b5267..d263d55 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.9.3", + "User-Agent": "openfga-sdk (python) 0.9.4", } ) mock_request.assert_called_once_with( @@ -310,7 +310,7 @@ async def test_get_authentication_keep_full_url(self, mock_request): { "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "openfga-sdk (python) 0.9.3", + "User-Agent": "openfga-sdk (python) 0.9.4", } ) mock_request.assert_called_once_with( @@ -365,7 +365,7 @@ async def test_get_authentication_add_scheme(self, mock_request): { "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "openfga-sdk (python) 0.9.3", + "User-Agent": "openfga-sdk (python) 0.9.4", } ) mock_request.assert_called_once_with( @@ -420,7 +420,7 @@ async def test_get_authentication_add_path(self, mock_request): { "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "openfga-sdk (python) 0.9.3", + "User-Agent": "openfga-sdk (python) 0.9.4", } ) mock_request.assert_called_once_with( @@ -475,7 +475,7 @@ async def test_get_authentication_add_scheme_and_path(self, mock_request): { "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "openfga-sdk (python) 0.9.3", + "User-Agent": "openfga-sdk (python) 0.9.4", } ) mock_request.assert_called_once_with( diff --git a/test/sync/oauth2_test.py b/test/sync/oauth2_test.py index dd6ed8f..78e22e8 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.9.3", + "User-Agent": "openfga-sdk (python) 0.9.4", } ) 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 9f7dc6e..ce527a0 100644 --- a/test/sync/open_fga_api_test.py +++ b/test/sync/open_fga_api_test.py @@ -1841,7 +1841,7 @@ def test_check_api_token(self, mock_request): { "Accept": "application/json", "Content-Type": "application/json", - "User-Agent": "openfga-sdk python/0.9.3", + "User-Agent": "openfga-sdk python/0.9.4", "Authorization": "Bearer TOKEN1", } ) @@ -1895,7 +1895,7 @@ def test_check_custom_header(self, mock_request): { "Accept": "application/json", "Content-Type": "application/json", - "User-Agent": "openfga-sdk python/0.9.3", + "User-Agent": "openfga-sdk python/0.9.4", "Custom Header": "custom value", } )