Bug 1787948

Summary: python-parameterized fails to build with Python 3.9: invalid open() mode U
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-parameterizedAssignee: Igor Raits <igor.raits>
Status: CLOSED DEFERRED QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, igor.raits, mhroncok, mplch, vstinner
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-05 23:20:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1785415    

Description Miro Hrončok 2020-01-05 19:57:21 UTC
python-parameterized fails to build with Python 3.9.0a2.

+ /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -s'
Traceback (most recent call last):
  File "/builddir/build/BUILD/parameterized-0.7.0/setup.py", line 11, in <module>
    long_description = open("README.rst", "U").read()
ValueError: invalid mode: 'U'

Th U mode was removed in 3.9: https://bugs.python.org/issue37330

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01138830-python-parameterized/

For all our attempts to build python-parameterized with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python-parameterized/

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.9:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33, but the initial bootstrapping has already started.
A build failure this early in the bootstrap sequence blocks us very much.

Comment 1 Miro Hrončok 2020-01-05 20:07:53 UTC
This gets the job done. Shall I push it?

 %prep
 %autosetup -p1 -n %{srcname}-%{version}
 
+# Python 3.9 compatibility
+# https://github.com/wolever/parameterized/issues/90
+# https://bugzilla.redhat.com/show_bug.cgi?id=1787948
+sed -i 's/, "U"//' setup.py

Comment 2 Miro Hrončok 2020-02-10 14:32:23 UTC
Igor?

Comment 3 Ben Cotton 2020-02-11 16:33:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 4 Miro Hrončok 2020-03-16 18:30:24 UTC
Setting the severity to high.

This package is part of the initial bootstrap sequence. Without it, we cannot proceed with the bootstrap in a Koji side tag.

https://fedoraproject.org/wiki/Changes/Python3.9#Important_dates_and_plan

The current plan is to follow the "ideal point when we can start rebuilding in Koji" -- that is we need to get this bug fixed approximately in 2 months.

That includes potential uncovered bugs in packages that depend on this one.

Please knowledge that you have read this message and that you can dedicate time to fix it. If you know already that you won't be able to fix it by the deadline, please let us know ASAP, so we can allocate resources to do that. Thank You.

(This comment is posted to multiple Bugzillas, please forgive me if it's not 100% accurate.)

Comment 5 Victor Stinner 2020-03-18 14:49:23 UTC
I proposed a pull request upstream: https://github.com/wolever/parameterized/pull/94

Comment 6 Miro Hrončok 2020-04-05 23:20:56 UTC
The removal of U open() mode was postponed to Python 3.10.

Closing this now.

If you haven't yet, please consider to follow up up on this with your upstream.

(This comment is mass posted to all affected bugzillas.)

Comment 7 Victor Stinner 2020-04-06 12:36:08 UTC
> If you haven't yet, please consider to follow up up on this with your upstream.

It's fine, I proposed a fix upstream: https://github.com/wolever/parameterized/pull/94 (no feedback so far).

Comment 8 Victor Stinner 2020-04-13 10:50:01 UTC
> It's fine, I proposed a fix upstream: https://github.com/wolever/parameterized/pull/94 (no feedback so far).

FYI my fix was merged and is part of 0.7.3 release.