Skip to content

Commit ffb3fc0

Browse files
authored
rest client: Only enable backoff_and_retry if urllib3 version is at least version 2. (#1342)
1 parent 876e4a9 commit ffb3fc0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

atlassian/rest_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from requests_oauthlib import OAuth1, OAuth2
1414
from six.moves.urllib.parse import urlencode
1515
from urllib3.util import Retry
16+
import urllib3
1617

1718
from atlassian.request_utils import get_default_logger
1819

@@ -117,7 +118,7 @@ def __init__(
117118
self._session = requests.Session()
118119
else:
119120
self._session = session
120-
if backoff_and_retry:
121+
if backoff_and_retry and int(urllib3.__version__.split(".")[0]) >= 2:
121122
# Note: we only retry on status and not on any of the
122123
# other supported reasons
123124
retries = Retry(

0 commit comments

Comments
 (0)