kevinjqliu commented on code in PR #2846:
URL: https://github.com/apache/iceberg-python/pull/2846#discussion_r2696434765
##########
pyiceberg/catalog/rest/__init__.py:
##########
@@ -364,16 +359,24 @@ def _create_session(self) -> Session:
if auth_type != CUSTOM and auth_impl:
raise ValueError("auth.impl can only be specified when using
custom auth.type")
- session.auth =
AuthManagerAdapter(AuthManagerFactory.create(auth_impl or auth_type,
auth_type_config))
+ self._auth_manager = AuthManagerFactory.create(auth_impl or
auth_type, auth_type_config)
+ session.auth = AuthManagerAdapter(self._auth_manager)
else:
- session.auth =
AuthManagerAdapter(self._create_legacy_oauth2_auth_manager(session))
+ self._auth_manager =
self._create_legacy_oauth2_auth_manager(session)
+ session.auth = AuthManagerAdapter(self._auth_manager)
Review Comment:
nit: take `session.auth = AuthManagerAdapter(self._auth_manager)` part out
of the if/else branch since its the same logic
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]