python-urllib3 1.25.3-2 fails to build with Python 3.8.0b2: _______________________ TestConnection.test_recent_date ________________________ self = <test.test_connection.TestConnection object at 0x7ff9ad52d5e0> def test_recent_date(self): # This test is to make sure that the RECENT_DATE value # doesn't get too far behind what the current date is. # When this test fails update urllib3.connection.RECENT_DATE # according to the rules defined in that file.error: Bad exit status from /var/tmp/rpm-tmp.870O0s (%check) two_years = datetime.timedelta(days=365 * 2) > assert RECENT_DATE > (datetime.datetime.today() - two_years).date() E AssertionError: assert datetime.date(2017, 6, 30) > datetime.date(2017, 7, 7) E + where datetime.date(2017, 7, 7) = <built-in method date of datetime.datetime object at 0x7ff9ad122540>() E + where <built-in method date of datetime.datetime object at 0x7ff9ad122540> = (datetime.datetime(2019, 7, 7, 0, 25, 21, 713019) - datetime.timedelta(days=730)).date E + where datetime.datetime(2019, 7, 7, 0, 25, 21, 713019) = <built-in method today of type object at 0x7ff9adeda8e0>() E + where <built-in method today of type object at 0x7ff9adeda8e0> = <class 'datetime.datetime'>.today E + where <class 'datetime.datetime'> = datetime.datetime test_connection.py:55: AssertionError I believe this started failing after (2019, 6, 30) and that we need to update the date in urllib3.connection.RECENT_DATE. For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.8/fedora-rawhide-x86_64/00959814-python-urllib3/ For all our attempts to build pcp with Python 3.8, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.8/package/python-urllib3/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.8: https://copr.fedorainfracloud.org/coprs/g/python/python3.8/ Let us know here if you have any questions.
From urllib3-1.25.3/src/urllib3/connection.py # When updating RECENT_DATE, move it to within two years of the current date, # and not less than 6 months ago. # Example: if Today is 2018-01-01, then RECENT_DATE should be any date on or # after 2016-01-01 (today - 2 years) AND before 2017-07-01 (today - 6 months) RECENT_DATE = datetime.date(2017, 6, 30) This obviously fails on Python 3.7 as well. Rawhide scratchbuild: https://koji.fedoraproject.org/koji/taskinfo?taskID=36126416
I'll backport https://github.com/urllib3/urllib3/commit/19ff80fcd085a6a60a55ca0c526a9977ec8014e3
Pushed and building. Leaving this ON_QA: I'm not sure what is this date used for, but this might need further backports for f30 and f29 - and I'm not sure what's your update strategy there, so leaving this for you. https://src.fedoraproject.org/rpms/python-urllib3/c/85d9ed50104ce904a48704e772064961f645edb6?branch=master
Hi Miro, Thanks for the fix, I've picked it up for F30 and F29 since it looks to be used to detect if the system clock is (significantly) wrong during x509 certificate validation.
FEDORA-2019-e6e11be2a6 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-e6e11be2a6
FEDORA-2019-6f13c38d0d has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-6f13c38d0d
python-urllib3-1.24.3-2.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-e6e11be2a6
python-urllib3-1.24.3-2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-6f13c38d0d
python-urllib3-1.24.3-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.