atlassian-api / atlassian-python-api

Atlassian Python REST API wrapper
https://atlassian-python-api.readthedocs.io
Apache License 2.0
1.29k stars 642 forks source link

rest client: Only enable `backoff_and_retry` if `urllib3` is at least 2.0.0 #1342

Closed djgoku closed 2 weeks ago

djgoku commented 4 months ago

We are trying to use backoff_and_retry but are getting errors with urllib3 1.26.X this fixes and sets the minimum of urllib3 to >= 2.0.0

The first release supporting backoff_jitter in the Retry class is the 2.0.0 release.

https://github.com/urllib3/urllib3/releases/tag/2.0.0

It doesn't look like this will be added to 1.26.X https://github.com/urllib3/urllib3/pull/2952#issuecomment-1523888273

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 50.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 34.19%. Comparing base (0a5bc5e) to head (26ab8c0). Report is 8 commits behind head on master.

Files Patch % Lines
atlassian/rest_client.py 50.00% 0 Missing and 1 partial :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1342 +/- ## ========================================== + Coverage 34.16% 34.19% +0.02% ========================================== Files 45 46 +1 Lines 8373 8428 +55 Branches 1177 1185 +8 ========================================== + Hits 2861 2882 +21 - Misses 5397 5431 +34 Partials 115 115 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

timsavage commented 3 months ago

This is problematic for companies using RHEL. urllib3>2.0 requires a version of libssl that is not available on older (but still supported releases) or RHEL.

djgoku commented 3 months ago

This is problematic for companies using RHEL. urllib3>2.0 requires a version of libssl that is not available on older (but still supported releases) or RHEL.

Ok, I'll look into alternative options. Thanks.

djgoku commented 3 months ago

This is problematic for companies using RHEL. urllib3>2.0 requires a version of libssl that is not available on older (but still supported releases) or RHEL.

Here is another option I thought of. Hacky, but at least it won't fail is urllib3 is less than version 2.

djgoku commented 1 month ago

@gonchik can I get a review on this?

gonchik commented 1 month ago

@djgoku I did not check on the RHEL 7 yet. , I will come back once it's ready