diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..959bdad --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,20 @@ +version: 2 +updates: + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "monthly" + groups: + dependencies: + patterns: + - "*" + ignore: + - dependency-name: "urllib3" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + groups: + dependencies: + patterns: + - "*" diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index a0df92a..4ffc69b 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -2,6 +2,7 @@ .github/CODEOWNERS .github/ISSUE_TEMPLATE/bug_report.md .github/ISSUE_TEMPLATE/feature_request.md +.github/dependabot.yaml .github/workflows/main.yaml .github/workflows/semgrep.yaml .gitignore diff --git a/CHANGELOG.md b/CHANGELOG.md index a81e783..f42cd28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## v0.3.1 + +### [0.3.1](https://github.com/openfga/python-sdk/compare/v0.3.0...v0.3.1) (2023-12-01) +- chore(deps): reduce min urllib3 to 1.25.11, add dependabot & bump deps + ## v0.3.0 ### [0.3.0](https://github.com/openfga/python-sdk/compare/v0.2.1...v0.3.0) (2023-11-02) diff --git a/VERSION.txt b/VERSION.txt index 0d91a54..9e11b32 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -0.3.0 +0.3.1 diff --git a/openfga_sdk/__init__.py b/openfga_sdk/__init__.py index e447608..fa95385 100644 --- a/openfga_sdk/__init__.py +++ b/openfga_sdk/__init__.py @@ -14,7 +14,7 @@ NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ -__version__ = "0.3.0" +__version__ = "0.3.1" from openfga_sdk.client.client import OpenFgaClient from openfga_sdk.client.configuration import ClientConfiguration diff --git a/openfga_sdk/api_client.py b/openfga_sdk/api_client.py index ae88c2e..9847926 100644 --- a/openfga_sdk/api_client.py +++ b/openfga_sdk/api_client.py @@ -34,7 +34,7 @@ from openfga_sdk.exceptions import ApiValueError, ApiException, FgaValidationException, RateLimitExceededError -DEFAULT_USER_AGENT = 'openfga-sdk python/0.3.0' +DEFAULT_USER_AGENT = 'openfga-sdk python/0.3.1' def random_time(loop_count, min_wait_in_ms): diff --git a/openfga_sdk/configuration.py b/openfga_sdk/configuration.py index 0bc0e2e..5a0b624 100644 --- a/openfga_sdk/configuration.py +++ b/openfga_sdk/configuration.py @@ -439,7 +439,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 0.1\n"\ - "SDK Package Version: 0.3.0".\ + "SDK Package Version: 0.3.1".\ 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 7e0c6c8..d929992 100644 --- a/openfga_sdk/oauth2.py +++ b/openfga_sdk/oauth2.py @@ -54,7 +54,7 @@ async def _obtain_token(self, client): 'grant_type': "client_credentials", } headers = urllib3.response.HTTPHeaderDict( - {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk (python) 0.3.0'}) + {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk (python) 0.3.1'}) raw_response = await client.POST(token_url, headers=headers, body=body) if 200 <= raw_response.status <= 299: try: diff --git a/openfga_sdk/sync/api_client.py b/openfga_sdk/sync/api_client.py index f6ebc9d..af2ceba 100644 --- a/openfga_sdk/sync/api_client.py +++ b/openfga_sdk/sync/api_client.py @@ -34,7 +34,7 @@ from openfga_sdk.exceptions import ApiValueError, ApiException, FgaValidationException, RateLimitExceededError -DEFAULT_USER_AGENT = 'openfga-sdk python/0.3.0' +DEFAULT_USER_AGENT = 'openfga-sdk python/0.3.1' def random_time(loop_count, min_wait_in_ms): diff --git a/openfga_sdk/sync/oauth2.py b/openfga_sdk/sync/oauth2.py index 1ab653b..3449307 100644 --- a/openfga_sdk/sync/oauth2.py +++ b/openfga_sdk/sync/oauth2.py @@ -54,7 +54,7 @@ def _obtain_token(self, client): 'grant_type': "client_credentials", } headers = urllib3.response.HTTPHeaderDict( - {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk (python) 0.3.0'}) + {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk (python) 0.3.1'}) raw_response = client.POST(token_url, headers=headers, body=body) if 200 <= raw_response.status <= 299: try: diff --git a/requirements.txt b/requirements.txt index 78b6497..cbee277 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ six >= 1.16 setuptools >= 67.7.2 python-dateutil >= 2.8.2 -urllib3 >= 1.26.15 -aiohttp >= 3.8.4 +urllib3 >= 1.25.11 +aiohttp >= 3.9.1 diff --git a/setup.py b/setup.py index bc422d0..65c1cbd 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "openfga-sdk" -VERSION = "0.3.0" +VERSION = "0.3.1" # To install the library, run the following # # python setup.py install @@ -23,8 +23,8 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools -REQUIRES = ["urllib3 >= 1.26.11", "six >= 1.10", "python-dateutil >= 2.8.2"] -REQUIRES.append("aiohttp >= 3.8.1") +REQUIRES = ["urllib3 >= 1.25.11", "six >= 1.16", "python-dateutil >= 2.8.2"] +REQUIRES.append("aiohttp >= 3.9.1") from setuptools import setup diff --git a/test-requirements.txt b/test-requirements.txt index 55a7510..7e44d9a 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,8 +1,7 @@ - -pytest-cov>=2.8.1 -mock>=4.0.3 -aiohttp>=3.8.1 -pycodestyle==2.10.0 -flake8>=5.0.4 -python-dateutil>=2.8.2 -urllib3>=1.26.11 +pytest-cov >= 4.1.0 +mock >= 5.1.0 +aiohttp >= 3.9.1 +pycodestyle == 2.10.0 +flake8 >= 6.0.0 +python-dateutil >= 2.8.2 +urllib3 >= 1.25.11 diff --git a/test/test_oauth2.py b/test/test_oauth2.py index 26bd1ed..a0ecd2f 100644 --- a/test/test_oauth2.py +++ b/test/test_oauth2.py @@ -82,7 +82,7 @@ async def test_get_authentication_obtain_client_credentials(self, mock_request): self.assertGreaterEqual(client._access_expiry_time, current_time + timedelta(seconds=int(120))) expected_header = urllib3.response.HTTPHeaderDict( - {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk (python) 0.3.0'}) + {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk (python) 0.3.1'}) mock_request.assert_called_once_with( 'POST', 'https://www.testme.com/oauth/token', diff --git a/test/test_oauth2_sync.py b/test/test_oauth2_sync.py index 0145017..62f3fe8 100644 --- a/test/test_oauth2_sync.py +++ b/test/test_oauth2_sync.py @@ -83,7 +83,7 @@ def test_get_authentication_obtain_client_credentials(self, mock_request): self.assertGreaterEqual(client._access_expiry_time, current_time + timedelta(seconds=int(120))) expected_header = urllib3.response.HTTPHeaderDict( - {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk (python) 0.3.0'}) + {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk (python) 0.3.1'}) mock_request.assert_called_once_with( 'POST', 'https://www.testme.com/oauth/token', diff --git a/test/test_open_fga_api.py b/test/test_open_fga_api.py index a58c42f..fe033cf 100644 --- a/test/test_open_fga_api.py +++ b/test/test_open_fga_api.py @@ -1174,7 +1174,7 @@ async def test_check_api_token(self, mock_request): self.assertTrue(api_response.allowed) # Make sure the API was called with the right data expectedHeader = urllib3.response.HTTPHeaderDict( - {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk python/0.3.0', 'Authorization': 'Bearer TOKEN1'}) + {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk python/0.3.1', 'Authorization': 'Bearer TOKEN1'}) mock_request.assert_called_once_with( 'POST', 'http://api.fga.example/stores/01H0H015178Y2V4CX10C2KGHF4/check', @@ -1217,7 +1217,7 @@ async def test_check_custom_header(self, mock_request): self.assertTrue(api_response.allowed) # Make sure the API was called with the right data expectedHeader = urllib3.response.HTTPHeaderDict( - {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk python/0.3.0', 'Custom Header': 'custom value'}) + {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk python/0.3.1', 'Custom Header': 'custom value'}) mock_request.assert_called_once_with( 'POST', 'http://api.fga.example/stores/01H0H015178Y2V4CX10C2KGHF4/check', diff --git a/test/test_open_fga_api_sync.py b/test/test_open_fga_api_sync.py index b04a53f..4db99c6 100644 --- a/test/test_open_fga_api_sync.py +++ b/test/test_open_fga_api_sync.py @@ -1175,7 +1175,7 @@ async def test_check_api_token(self, mock_request): self.assertTrue(api_response.allowed) # Make sure the API was called with the right data expectedHeader = urllib3.response.HTTPHeaderDict( - {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk python/0.3.0', 'Authorization': 'Bearer TOKEN1'}) + {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk python/0.3.1', 'Authorization': 'Bearer TOKEN1'}) mock_request.assert_called_once_with( 'POST', 'http://api.fga.example/stores/01H0H015178Y2V4CX10C2KGHF4/check', @@ -1218,7 +1218,7 @@ async def test_check_custom_header(self, mock_request): self.assertTrue(api_response.allowed) # Make sure the API was called with the right data expectedHeader = urllib3.response.HTTPHeaderDict( - {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk python/0.3.0', 'Custom Header': 'custom value'}) + {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk python/0.3.1', 'Custom Header': 'custom value'}) mock_request.assert_called_once_with( 'POST', 'http://api.fga.example/stores/01H0H015178Y2V4CX10C2KGHF4/check',