rahulsmahadev commented on code in PR #4429:
URL: https://github.com/apache/iceberg-python/pull/4429#discussion_r4637669593


##########
pyiceberg/catalog/rest/__init__.py:
##########
@@ -36,6 +40,9 @@
 from requests.adapters import DEFAULT_RETRIES, HTTPAdapter
 from tenacity import RetryCallState, retry, retry_if_exception_type, 
stop_after_attempt
 from typing_extensions import override
+from urllib3.connectionpool import ConnectionPool
+from urllib3.exceptions import MaxRetryError, ResponseError
+from urllib3.response import BaseHTTPResponse

Review Comment:
   With urllib3 1.26, which `requests>=2.20.0` still allows, `import 
pyiceberg.catalog.rest` now fails with `ImportError: cannot import name 
'BaseHTTPResponse'`, and 1.26's `Retry` has no `backoff_jitter` or 
`backoff_max` either. One option: import this under `TYPE_CHECKING`, and since 
pyiceberg never sets a jitter, have `_max_sleep` return 
`self.get_backoff_time()`; with both changes the new tests pass on urllib3 
1.26.20 and 2.8.0. Requiring `urllib3>=2` in `pyproject.toml` would also work.



-- 
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]

Reply via email to