Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1727796 - python-urllib3 fails to build: Too old urllib3.connection.RECENT_DATE
Summary: python-urllib3 fails to build: Too old urllib3.connection.RECENT_DATE
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-urllib3
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Fedora Infrastructure SIG
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F31FTBFS PYTHON38 1732841
TreeView+ depends on / blocked
 
Reported: 2019-07-08 08:13 UTC by Miro Hrončok
Modified: 2019-07-31 22:40 UTC (History)
4 users (show)

Fixed In Version: python-urllib3-1.25.3-3.fc31 python-urllib3-1.24.3-2.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-17 01:06:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2019-07-08 08:13:53 UTC
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.

Comment 1 Miro Hrončok 2019-07-08 08:18:09 UTC
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

Comment 3 Miro Hrončok 2019-07-08 08:25:43 UTC
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

Comment 4 Jeremy Cline 2019-07-08 20:24:18 UTC
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.

Comment 5 Fedora Update System 2019-07-09 16:11:16 UTC
FEDORA-2019-e6e11be2a6 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-e6e11be2a6

Comment 6 Fedora Update System 2019-07-09 16:11:17 UTC
FEDORA-2019-6f13c38d0d has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-6f13c38d0d

Comment 7 Fedora Update System 2019-07-10 00:37:38 UTC
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

Comment 8 Fedora Update System 2019-07-10 02:41:31 UTC
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

Comment 9 Fedora Update System 2019-07-17 01:06:20 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.