Bug 1890880
Summary: | breezy fails to build with Python 3.10: Py_REFCNT= needs to be replaced with Py_SET_REFCNT | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Tomáš Hrnčiar <thrnciar> |
Component: | breezy | Assignee: | Ondřej Pohořelský <opohorel> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | mhroncok, opohorel, python-sig, thrnciar, 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-11-24 09:45:55 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-23 07:54:04 UTC
https://docs.python.org/3.10/whatsnew/3.10.html#id2 Since Py_REFCNT() is changed to the inline static function, Py_REFCNT(obj) = new_refcnt must be replaced with Py_SET_REFCNT(obj, new_refcnt): see Py_SET_REFCNT() (available since Python 3.9). For backward compatibility, this macro can be used: #if PY_VERSION_HEX < 0x030900A4 # define Py_SET_REFCNT(obj, refcnt) ((Py_REFCNT(obj) = (refcnt)), (void)0) #endif https://bugs.python.org/issue39573 For the record, this is **not** fixed in breezy 3.1.0: [breezy (3.1.0)]$ rg Py_REFCNT breezy-3.1.0 breezy-3.1.0/breezy/_static_tuple_c.c 100: Py_REFCNT(self) -= 1; 119: Py_REFCNT(self) = 2; I reported the issue to breezy upstream: https://bugs.launchpad.net/brz/+bug/1904868 My fix got merged into the 3.1 branch: https://bazaar.launchpad.net/~brz/brz/3.1/revision/7647 Thank you for the patch Victor. I can confirm that breezy builds alright in our Copr: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/build/1776306/ |