Fokko commented on code in PR #1981: URL: https://github.com/apache/iceberg-python/pull/1981#discussion_r2084032360
########## pyiceberg/catalog/rest/util.py: ########## @@ -0,0 +1,111 @@ +# Licensed to the Apache Software Foundation (ASF) under one Review Comment: `util.py` sounds very generic? How about something like `responses.py`? ########## pyiceberg/catalog/rest/__init__.py: ########## @@ -289,6 +254,26 @@ def _create_session(self) -> Session: return session + def _create_legacy_oauth2_auth_manager(self, session: Session) -> AuthManager: + """Create the LegacyOAuth2AuthManager by fetching required properties. + + This will be deprecated in PyIceberg 1.0 Review Comment: Deprecated or removed in 1.0? It is a private function, so we should be able to remove them any time. ########## tests/catalog/test_rest.py: ########## @@ -620,14 +620,18 @@ def test_list_namespaces_token_expired_success_on_retries(rest_mock: Mocker, sta status_code=200, ) catalog = RestCatalog("rest", uri=TEST_URI, token=TEST_TOKEN, credential=TEST_CREDENTIALS) + # LegacyOAuth2AuthManager is created twice through `_create_session()` + # which results in the token being refreshed twice when the RestCatalog is initialized. Review Comment: Any way to avoid this? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org