diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 959bdad8..5c2a0d6a 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -10,6 +10,14 @@ updates: - "*" ignore: - dependency-name: "urllib3" + - package-ecosystem: "pip" + directory: "/example/example1" + schedule: + interval: "monthly" + groups: + dependencies: + patterns: + - "*" - package-ecosystem: "github-actions" directory: "/" schedule: diff --git a/.gitignore b/.gitignore index 4ff761ca..a875858f 100644 --- a/.gitignore +++ b/.gitignore @@ -68,6 +68,9 @@ target/ #Ipython Notebook .ipynb_checkpoints +# Python tooling +setup.local.cfg + # IDEs .idea @@ -89,4 +92,3 @@ credentials.json VERSION.txt git_push.sh -setup.local.cfg diff --git a/CHANGELOG.md b/CHANGELOG.md index 299221f5..0ef40ef1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## v0.5.0 + +### [0.5.0](https://github.com/openfga/python-sdk/compare/v0.4.2...v0.5.0) (2024-06-17) + +- fix: ClientTuple condition property type +- fix: list_users should accept FgaObject type +- fix: remove ReadAuthorizationModel calls from BatchCheck and writes +- chore!: remove excluded users from ListUsers response + ## v0.4.3 ### [0.4.3](https://github.com/openfga/python-sdk/compare/v0.4.2...v0.4.3) (2024-06-07) diff --git a/VERSION.txt b/VERSION.txt index 17b2ccd9..8f0916f7 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -0.4.3 +0.5.0 diff --git a/example/example1/requirements.txt b/example/example1/requirements.txt index 5cdbd061..29a08b0c 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.4.3 +openfga-sdk >= 0.5.0 python-dateutil >= 2.8.2 urllib3 >= 2.1.0 yarl >= 1.9.4 diff --git a/openfga_sdk/__init__.py b/openfga_sdk/__init__.py index 02461bec..d0e5831a 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.4.3" +__version__ = "0.5.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 21507abf..b061dfd6 100644 --- a/openfga_sdk/api_client.py +++ b/openfga_sdk/api_client.py @@ -33,7 +33,7 @@ ServiceException, ) -DEFAULT_USER_AGENT = "openfga-sdk python/0.4.3" +DEFAULT_USER_AGENT = "openfga-sdk python/0.5.0" def random_time(loop_count, min_wait_in_ms): diff --git a/openfga_sdk/configuration.py b/openfga_sdk/configuration.py index 536827d4..f37cd258 100644 --- a/openfga_sdk/configuration.py +++ b/openfga_sdk/configuration.py @@ -469,7 +469,7 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 1.x\n" - "SDK Package Version: 0.4.3".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 0.5.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 ee5c2075..a0c9eb64 100644 --- a/openfga_sdk/oauth2.py +++ b/openfga_sdk/oauth2.py @@ -80,7 +80,7 @@ async def _obtain_token(self, client): { "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "openfga-sdk (python) 0.4.3", + "User-Agent": "openfga-sdk (python) 0.5.0", } ) diff --git a/openfga_sdk/sync/api_client.py b/openfga_sdk/sync/api_client.py index b08c82c0..f967c5f9 100644 --- a/openfga_sdk/sync/api_client.py +++ b/openfga_sdk/sync/api_client.py @@ -33,7 +33,7 @@ ) from openfga_sdk.sync import oauth2, rest -DEFAULT_USER_AGENT = "openfga-sdk python/0.4.3" +DEFAULT_USER_AGENT = "openfga-sdk python/0.5.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 9bd2a438..b126b8ce 100644 --- a/openfga_sdk/sync/oauth2.py +++ b/openfga_sdk/sync/oauth2.py @@ -80,7 +80,7 @@ def _obtain_token(self, client): { "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "openfga-sdk (python) 0.4.3", + "User-Agent": "openfga-sdk (python) 0.5.0", } ) diff --git a/setup.py b/setup.py index 14ed424b..489f085a 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ import setuptools NAME = "openfga-sdk" -VERSION = "0.4.3" +VERSION = "0.5.0" REQUIRES = [] diff --git a/test/test_oauth2.py b/test/test_oauth2.py index 3a4c3b1e..9acc2355 100644 --- a/test/test_oauth2.py +++ b/test/test_oauth2.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.4.3", + "User-Agent": "openfga-sdk (python) 0.5.0", } ) mock_request.assert_called_once_with( diff --git a/test/test_oauth2_sync.py b/test/test_oauth2_sync.py index 5f1f7496..2799c159 100644 --- a/test/test_oauth2_sync.py +++ b/test/test_oauth2_sync.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.4.3", + "User-Agent": "openfga-sdk (python) 0.5.0", } ) mock_request.assert_called_once_with( diff --git a/test/test_open_fga_api.py b/test/test_open_fga_api.py index 5a822fc3..f39eca04 100644 --- a/test/test_open_fga_api.py +++ b/test/test_open_fga_api.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.4.3", + "User-Agent": "openfga-sdk python/0.5.0", "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.4.3", + "User-Agent": "openfga-sdk python/0.5.0", "Custom Header": "custom value", } ) diff --git a/test/test_open_fga_api_sync.py b/test/test_open_fga_api_sync.py index 0a1ebce7..7fab6333 100644 --- a/test/test_open_fga_api_sync.py +++ b/test/test_open_fga_api_sync.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.4.3", + "User-Agent": "openfga-sdk python/0.5.0", "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.4.3", + "User-Agent": "openfga-sdk python/0.5.0", "Custom Header": "custom value", } )