diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index deb5bf5..7c1f87b 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -5,8 +5,6 @@ .github/ISSUE_TEMPLATE/config.yaml .github/ISSUE_TEMPLATE/feature_request.yaml .github/dependabot.yaml -.github/workflows/main.yaml -.github/workflows/semgrep.yaml .gitignore .snyk CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d6bbf3..ffd2d43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [Unreleased](https://github.com/openfga/python-sdk/compare/v0.8.0...HEAD) + +## v0.8.0 + +### [0.8.0](https://github.com/openfga/python-sdk/compare/v0.7.2...v0.8.0) (2024-11-15) + +- feat: allow configuring the token endpoint (#137) +- feat: add per-HTTP request counter metric (#135) +- refactor: remove SDK version for OpenTelemetry meter name (#134) +- fix: only send SDK method header from SDK wrapper methods (#142) +- fix: unable to pass `retry_params` (#144) +- fix: list users should send contextual tuples as a list (#147) +- fix: handle no models existing in `read_latest_authorization_model` (#147) + ## v0.7.2 ### [0.7.2](https://github.com/openfga/python-sdk/compare/v0.7.1...v0.7.2) (2024-09-22) diff --git a/VERSION.txt b/VERSION.txt index 7486fdb..a3df0a6 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -0.7.2 +0.8.0 diff --git a/example/example1/requirements.txt b/example/example1/requirements.txt index aa8d03e..2e64cdf 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.2 +openfga-sdk >= 0.8.0 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 12de8b7..f74d156 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.2"] +REQUIRES = ["openfga-sdk >= 0.8.0"] setup( name=NAME, diff --git a/openfga_sdk/__init__.py b/openfga_sdk/__init__.py index 1eaf1e5..c969bb4 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.2" +__version__ = "0.8.0" 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 1de86ed..9b3b2cf 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.2" +DEFAULT_USER_AGENT = "openfga-sdk python/0.8.0" def random_time(loop_count, min_wait_in_ms): diff --git a/openfga_sdk/configuration.py b/openfga_sdk/configuration.py index 7c9ba2e..4168b87 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.2".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 0.8.0".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 256eff1..eeebb98 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.2", + "User-Agent": "openfga-sdk (python) 0.8.0", } ) diff --git a/openfga_sdk/sync/api_client.py b/openfga_sdk/sync/api_client.py index b5e6b32..2dd7888 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.2" +DEFAULT_USER_AGENT = "openfga-sdk python/0.8.0" def random_time(loop_count, min_wait_in_ms): diff --git a/openfga_sdk/sync/oauth2.py b/openfga_sdk/sync/oauth2.py index 9bde71c..6934be3 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.2", + "User-Agent": "openfga-sdk (python) 0.8.0", } ) diff --git a/setup.py b/setup.py index f305045..d3fb8ca 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ from setuptools import find_packages, setup NAME = "openfga-sdk" -VERSION = "0.7.2" +VERSION = "0.8.0" REQUIRES = [] diff --git a/test/api/open_fga_api_test.py b/test/api/open_fga_api_test.py index 0dccdc0..a051a67 100644 --- a/test/api/open_fga_api_test.py +++ b/test/api/open_fga_api_test.py @@ -1518,7 +1518,7 @@ async def test_check_api_token(self, mock_request): { "Accept": "application/json", "Content-Type": "application/json", - "User-Agent": "openfga-sdk python/0.7.2", + "User-Agent": "openfga-sdk python/0.8.0", "Authorization": "Bearer TOKEN1", } ) @@ -1572,7 +1572,7 @@ async def test_check_custom_header(self, mock_request): { "Accept": "application/json", "Content-Type": "application/json", - "User-Agent": "openfga-sdk python/0.7.2", + "User-Agent": "openfga-sdk python/0.8.0", "Custom Header": "custom value", } ) diff --git a/test/oauth2_test.py b/test/oauth2_test.py index a131874..0c828eb 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.2", + "User-Agent": "openfga-sdk (python) 0.8.0", } ) mock_request.assert_called_once_with( diff --git a/test/sync/oauth2_test.py b/test/sync/oauth2_test.py index ebb1f95..e24b954 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.2", + "User-Agent": "openfga-sdk (python) 0.8.0", } ) 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 827370f..4f12ed1 100644 --- a/test/sync/open_fga_api_test.py +++ b/test/sync/open_fga_api_test.py @@ -1518,7 +1518,7 @@ async def test_check_api_token(self, mock_request): { "Accept": "application/json", "Content-Type": "application/json", - "User-Agent": "openfga-sdk python/0.7.2", + "User-Agent": "openfga-sdk python/0.8.0", "Authorization": "Bearer TOKEN1", } ) @@ -1572,7 +1572,7 @@ async def test_check_custom_header(self, mock_request): { "Accept": "application/json", "Content-Type": "application/json", - "User-Agent": "openfga-sdk python/0.7.2", + "User-Agent": "openfga-sdk python/0.8.0", "Custom Header": "custom value", } )