Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release(v0.3.1): with dep upgrades, and reduce urllib3 min #46

Merged
merged 3 commits into from
Dec 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
release(v0.3.1): with dep upgrades, and reduce urllib3 min
  • Loading branch information
rhamzeh committed Dec 4, 2023
commit 251684810520ddab298fca11382d6a18ab569693
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.0
0.3.1
2 changes: 1 addition & 1 deletion openfga_sdk/__init__.py
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion openfga_sdk/api_client.py
Original file line number Diff line number Diff line change
@@ -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):
2 changes: 1 addition & 1 deletion openfga_sdk/configuration.py
Original file line number Diff line number Diff line change
@@ -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):
2 changes: 1 addition & 1 deletion openfga_sdk/oauth2.py
Original file line number Diff line number Diff line change
@@ -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:
2 changes: 1 addition & 1 deletion openfga_sdk/sync/api_client.py
Original file line number Diff line number Diff line change
@@ -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):
2 changes: 1 addition & 1 deletion openfga_sdk/sync/oauth2.py
Original file line number Diff line number Diff line change
@@ -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:
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion test/test_oauth2.py
Original file line number Diff line number Diff line change
@@ -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',
2 changes: 1 addition & 1 deletion test/test_oauth2_sync.py
Original file line number Diff line number Diff line change
@@ -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',
4 changes: 2 additions & 2 deletions test/test_open_fga_api.py
Original file line number Diff line number Diff line change
@@ -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',
4 changes: 2 additions & 2 deletions test/test_open_fga_api_sync.py
Original file line number Diff line number Diff line change
@@ -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',