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 1890442
Summary: | python-pycurl fails to build with Python 3.10: Py_TYPE= needs to be replaced with Py_SET_TYPE | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Tomáš Hrnčiar <thrnciar> |
Component: | python-pycurl | Assignee: | Kamil Dudka <kdudka> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | kdudka, mhroncok, msekleta, pviktori, svashisht, thrnciar |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | python-pycurl-7.43.0.6-2.fc34 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-10-27 08:24:52 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: | 1890881, 1785415 |
Description
Tomáš Hrnčiar
2020-10-22 08:47:55 UTC
https://docs.python.org/3.10/whatsnew/3.10.html#id2 Since Py_TYPE() is changed to the inline static function, Py_TYPE(obj) = new_type must be replaced with Py_SET_TYPE(obj, new_type): see Py_SET_TYPE() (available since Python 3.9). For backward compatibility, this macro can be used: #if PY_VERSION_HEX < 0x030900A4 # define Py_SET_TYPE(obj, type) ((Py_TYPE(obj) = (type)), (void)0) #endif https://bugs.python.org/issue39573 Why do python developers do backward-incompatible changes in minor updates? Python's versioning predates semver. As with any Y-release, 3.10 will have some backward incompatibilities. In other words, 3.9 -> 3.10 is not considered a "minor" update. See for example the release of Python 3.9.0: https://www.python.org/downloads/release/python-390/ "Python 3.9.0 is the newest major release of the Python programming language..." I wish we sticked to a more stable technology. Porting everything to a new major release of python all the time is utterly wasteful. I have opened a pull request upstream to fix this: https://github.com/pycurl/pycurl/pull/660 For this particular change, I've queried upstream about its necessity: https://bugs.python.org/issue39573#msg379675 I would also like Python to be more stable. Thanks for the PR, Kamil. upstream commit: https://github.com/pycurl/pycurl/commit/c4036bdc dist-git commit: https://src.fedoraproject.org/rpms/python-pycurl/c/2492f5a6 *** Bug 1891754 has been marked as a duplicate of this bug. *** JFYI The change was reverted in Python 3.10, because it caused too much trouble (the amount of affected Fedora packages was too big). This comment is mass posted in all relevant bugzillas. If you already worked upstream to fix the problem, you might want to let them know about the revert, but the new way of doing things also works. Sorry for the trouble and thanks again for the fix. https://github.com/python/cpython/commit/0e2ac21dd |