Bug 1893194
Summary: | gobject-introspection 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: | gobject-introspection | Assignee: | Colin Walters <walters> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | dcbw, fmuellner, klember, mhroncok, otaylor, thrnciar, walters, yaneti |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | gobject-introspection-1.66.1-2.fc34 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-11-04 08:36:34 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 |
Description
Tomáš Hrnčiar
2020-10-30 14:03:17 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 CCing Kalev, who is the de-facto maintainer here AFAIK. Fix is already proposed in upstream. See: https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/243 Thanks for finding the MR! I went ahead and backported this to rawhide: https://src.fedoraproject.org/rpms/gobject-introspection/c/408248fb59bdd890041b892b828177790203c62d?branch=master 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 |