Skip to content

Commit

Permalink
fix RemovedInV4Warning
Browse files Browse the repository at this point in the history
globus_sdk/services/auth/client/service_client.py:258: RemovedInV4Warning: The method `oauth2_userinfo` is deprecated. Use `userinfo` instead.
  • Loading branch information
haochenpan committed Sep 24, 2024
1 parent c41763b commit cfa9286
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion diaspora_event_sdk/sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(
base_url=self.web_service_address
)
self.auth_client = self.login_manager.get_auth_client()
self.subject_openid = self.auth_client.oauth2_userinfo()["sub"]
self.subject_openid = self.auth_client.userinfo()["sub"]

def logout(self):
"""Remove credentials from your local system"""
Expand Down
2 changes: 1 addition & 1 deletion diaspora_event_sdk/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.5"
__version__ = "0.3.6"
2 changes: 1 addition & 1 deletion tests/unit/client_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def mock_login_manager(): # TODO
login_manager = Mock(spec=LoginManager())
login_manager.get_web_client.return_value = Mock(spec=WebClient)
login_manager.get_auth_client.return_value = Mock(
oauth2_userinfo=lambda: {"sub": "test_sub"}
userinfo=lambda: {"sub": "test_sub"}
)
login_manager._token_storage.get_token_data.return_value = {
"username": "test_sub",
Expand Down

0 comments on commit cfa9286

Please sign in to comment.