You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
email.utils.parsedate_tz behaves differently on python2.7/3 if the input string has no timezone. On python3, the last item of the return value is 0 where on python2.7 it is None.
Since email.utils.mktime_tz assumes a None timezone to be the local timezone, the resulting date might be wrong when calculating Retry-After timeout of a value without a timezone.
To reproduce run the following test on a python2.7 machine with timezone != UTC: test/test_retry.py::TestRetry::test_respect_retry_after_header_sleep[Mon Jun 3 11:30:12 2019-True-1812]
(Luckily, freezegun doesn't hide the issue since it freezes only the time using tz_offset but it doesn't patch the timezone.)
The text was updated successfully, but these errors were encountered:
email.utils.parsedate_tz
behaves differently on python2.7/3 if the input string has no timezone. On python3, the last item of the return value is0
where on python2.7 it isNone
.Since
email.utils.mktime_tz
assumes aNone
timezone to be the local timezone, the resulting date might be wrong when calculatingRetry-After
timeout of a value without a timezone.To reproduce run the following test on a python2.7 machine with timezone != UTC:
test/test_retry.py::TestRetry::test_respect_retry_after_header_sleep[Mon Jun 3 11:30:12 2019-True-1812]
(Luckily,
freezegun
doesn't hide the issue since it freezes only the time usingtz_offset
but it doesn't patch the timezone.)The text was updated successfully, but these errors were encountered: