Skip to content

Commit 00ac9c1

Browse files
committed
release(v0.2.1): fix client check crash & update docs
1 parent 6817a63 commit 00ac9c1

9 files changed

Lines changed: 15 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## v0.2.1
4+
5+
### [0.2.1](https://github.com/openfga/python-sdk/compare/v0.2.0...v0.2.1) (2023-09-05)
6+
- fix(client): fix a crash when calling check with contextual tuples (https://github.com/openfga/python-sdk/commit/dded83f9a75dc1f01c1cfbd8385a25654129f78f)
7+
- chore(docs): update README and fix a few typos (https://github.com/openfga/python-sdk/pull/21, https://github.com/openfga/python-sdk/pull/31, https://github.com/openfga/python-sdk/pull/32, https://github.com/openfga/python-sdk/pull/33, https://github.com/openfga/python-sdk/pull/34, https://github.com/openfga/python-sdk/pull/37)
8+
39
## v0.2.0
410

511
### [0.2.0](https://github.com/openfga/python-sdk/compare/v0.1.1...v0.2.0) (2023-05-25)

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.0
1+
0.2.1

openfga_sdk/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.
1515
"""
1616

17-
__version__ = "0.2.0"
17+
__version__ = "0.2.1"
1818

1919
from openfga_sdk.client.client import OpenFgaClient
2020
from openfga_sdk.client.configuration import ClientConfiguration

openfga_sdk/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from openfga_sdk.exceptions import ApiValueError, ApiException, FgaValidationException, RateLimitExceededError
3535

3636

37-
DEFAULT_USER_AGENT = 'openfga-sdk python/0.2.0'
37+
DEFAULT_USER_AGENT = 'openfga-sdk python/0.2.1'
3838

3939

4040
def random_time(loop_count, min_wait_in_ms):

openfga_sdk/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def to_debug_report(self):
439439
"OS: {env}\n"\
440440
"Python Version: {pyversion}\n"\
441441
"Version of the API: 0.1\n"\
442-
"SDK Package Version: 0.2.0".\
442+
"SDK Package Version: 0.2.1".\
443443
format(env=sys.platform, pyversion=sys.version)
444444

445445
def get_host_settings(self):

openfga_sdk/credentials.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ async def _obtain_token(self, client):
215215
'grant_type': "client_credentials",
216216
}
217217
headers = urllib3.response.HTTPHeaderDict(
218-
{'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk (python) 0.2.0'})
218+
{'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk (python) 0.2.1'})
219219
raw_response = await client.POST(token_url, headers=headers, body=body)
220220
if 200 <= raw_response.status <= 299:
221221
try:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from setuptools import setup, find_packages # noqa: H301
1616

1717
NAME = "openfga-sdk"
18-
VERSION = "0.2.0"
18+
VERSION = "0.2.1"
1919
# To install the library, run the following
2020
#
2121
# python setup.py install

test/test_credentials.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ async def test_get_authentication_obtain_client_credentials(self, mock_request):
219219
self.assertGreaterEqual(credential._access_expiry_time,
220220
current_time + timedelta(seconds=int(120)))
221221
expected_header = urllib3.response.HTTPHeaderDict(
222-
{'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk (python) 0.2.0'})
222+
{'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk (python) 0.2.1'})
223223
mock_request.assert_called_once_with(
224224
'POST',
225225
'https://www.testme.com/oauth/token',

test/test_open_fga_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,7 @@ async def test_check_api_token(self, mock_request):
11741174
self.assertTrue(api_response.allowed)
11751175
# Make sure the API was called with the right data
11761176
expectedHeader = urllib3.response.HTTPHeaderDict(
1177-
{'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk python/0.2.0', 'Authorization': 'Bearer TOKEN1'})
1177+
{'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk python/0.2.1', 'Authorization': 'Bearer TOKEN1'})
11781178
mock_request.assert_called_once_with(
11791179
'POST',
11801180
'http://api.fga.example/stores/01H0H015178Y2V4CX10C2KGHF4/check',
@@ -1217,7 +1217,7 @@ async def test_check_custom_header(self, mock_request):
12171217
self.assertTrue(api_response.allowed)
12181218
# Make sure the API was called with the right data
12191219
expectedHeader = urllib3.response.HTTPHeaderDict(
1220-
{'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk python/0.2.0', 'Custom Header': 'custom value'})
1220+
{'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk python/0.2.1', 'Custom Header': 'custom value'})
12211221
mock_request.assert_called_once_with(
12221222
'POST',
12231223
'http://api.fga.example/stores/01H0H015178Y2V4CX10C2KGHF4/check',

0 commit comments

Comments
 (0)