Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog

## [Unreleased](https://github.com/openfga/python-sdk/compare/v0.9.1...HEAD)
## [Unreleased](https://github.com/openfga/python-sdk/compare/v0.9.2...HEAD)

### [0.9.2](https://github.com/openfga/python-sdk/compare/v0.9.1...v0.9.2) (2025-03-25)

- fix(telemetry): fixes for telemetry attributes and metrics tracking
- fix: REST client should not close after `stream` request

## v0.9.1

Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.1
0.9.2
2 changes: 1 addition & 1 deletion example/example1/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ attrs >= 23.1.0
frozenlist >= 1.4.1
idna >= 3.6
multidict >= 6.0.4
openfga-sdk >= 0.9.1
openfga-sdk >= 0.9.2
python-dateutil >= 2.8.2
urllib3 >= 2.1.0
yarl >= 1.9.4
Expand Down
2 changes: 1 addition & 1 deletion example/example1/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

NAME = "example1"
VERSION = "0.0.1"
REQUIRES = ["openfga-sdk >= 0.9.1"]
REQUIRES = ["openfga-sdk >= 0.9.2"]

setup(
name=NAME,
Expand Down
2 changes: 1 addition & 1 deletion openfga_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.
"""

__version__ = "0.9.1"
__version__ = "0.9.2"

from openfga_sdk.api.open_fga_api import OpenFgaApi
from openfga_sdk.api_client import ApiClient
Expand Down
2 changes: 1 addition & 1 deletion openfga_sdk/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
from openfga_sdk.telemetry.attributes import TelemetryAttribute, TelemetryAttributes


DEFAULT_USER_AGENT = "openfga-sdk python/0.9.1"
DEFAULT_USER_AGENT = "openfga-sdk python/0.9.2"


def random_time(loop_count, min_wait_in_ms):
Expand Down
2 changes: 1 addition & 1 deletion openfga_sdk/oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.1",
"User-Agent": "openfga-sdk (python) 0.9.2",
}
)

Expand Down
2 changes: 1 addition & 1 deletion openfga_sdk/sync/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from openfga_sdk.telemetry.attributes import TelemetryAttribute, TelemetryAttributes


DEFAULT_USER_AGENT = "openfga-sdk python/0.9.1"
DEFAULT_USER_AGENT = "openfga-sdk python/0.9.2"


def random_time(loop_count, min_wait_in_ms) -> float:
Expand Down
2 changes: 1 addition & 1 deletion openfga_sdk/sync/oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.1",
"User-Agent": "openfga-sdk (python) 0.9.2",
}
)

Expand Down
4 changes: 2 additions & 2 deletions openfga_sdk/telemetry/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def requestDuration(

if (
isinstance(configuration, TelemetryConfiguration)
and type(configuration.metrics) is TelemetryMetricsConfiguration
and isinstance(configuration.metrics, TelemetryMetricsConfiguration)
and isinstance(
configuration.metrics.fga_client_request_duration,
TelemetryMetricConfiguration,
Expand Down Expand Up @@ -228,7 +228,7 @@ def queryDuration(

if (
isinstance(configuration, TelemetryConfiguration)
and isinstance(configuration.metrics, TelemetryMetricConfiguration)
and isinstance(configuration.metrics, TelemetryMetricsConfiguration)
and isinstance(
configuration.metrics.fga_client_query_duration,
TelemetryMetricConfiguration,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


NAME = "openfga-sdk"
VERSION = "0.9.1"
VERSION = "0.9.2"
REQUIRES = []


Expand Down
4 changes: 2 additions & 2 deletions test/api/open_fga_api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ async def test_check_api_token(self, mock_request):
{
"Accept": "application/json",
"Content-Type": "application/json",
"User-Agent": "openfga-sdk python/0.9.1",
"User-Agent": "openfga-sdk python/0.9.2",
"Authorization": "Bearer TOKEN1",
}
)
Expand Down Expand Up @@ -1601,7 +1601,7 @@ async def test_check_custom_header(self, mock_request):
{
"Accept": "application/json",
"Content-Type": "application/json",
"User-Agent": "openfga-sdk python/0.9.1",
"User-Agent": "openfga-sdk python/0.9.2",
"Custom Header": "custom value",
}
)
Expand Down
2 changes: 1 addition & 1 deletion test/oauth2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.1",
"User-Agent": "openfga-sdk (python) 0.9.2",
}
)
mock_request.assert_called_once_with(
Expand Down
2 changes: 1 addition & 1 deletion test/sync/oauth2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.1",
"User-Agent": "openfga-sdk (python) 0.9.2",
}
)
mock_request.assert_called_once_with(
Expand Down
4 changes: 2 additions & 2 deletions test/sync/open_fga_api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ async def test_check_api_token(self, mock_request):
{
"Accept": "application/json",
"Content-Type": "application/json",
"User-Agent": "openfga-sdk python/0.9.1",
"User-Agent": "openfga-sdk python/0.9.2",
"Authorization": "Bearer TOKEN1",
}
)
Expand Down Expand Up @@ -1601,7 +1601,7 @@ async def test_check_custom_header(self, mock_request):
{
"Accept": "application/json",
"Content-Type": "application/json",
"User-Agent": "openfga-sdk python/0.9.1",
"User-Agent": "openfga-sdk python/0.9.2",
"Custom Header": "custom value",
}
)
Expand Down