Bug 1941559
Summary: | python-cvxopt fails to build with Python 3.10: error: expected ‘(’ before ‘_PyObject_TypeCheck’ | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Miro Hrončok <mhroncok> |
Component: | python-cvxopt | Assignee: | Jerry James <loganjerry> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | loganjerry, mhroncok, thrnciar |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | python-cvxopt-1.2.6-2.fc35 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-03-22 15:18:58 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
Miro Hrončok
2021-03-22 11:10:38 UTC
Python 3.9 object.h includes this: #define PyObject_TypeCheck(ob, tp) \ (Py_IS_TYPE(ob, tp) || PyType_IsSubtype(Py_TYPE(ob), (tp))) Python 3.10 object.h changes that to: static inline int _PyObject_TypeCheck(PyObject *ob, PyTypeObject *type) { return Py_IS_TYPE(ob, type) || PyType_IsSubtype(Py_TYPE(ob), type); } #define PyObject_TypeCheck(ob, type) _PyObject_TypeCheck(_PyObject_CAST(ob), type) and cvxopt.h has: #define Matrix_Check(self) PyObject_TypeCheck(self, &matrix_tp) So this code in cvxopt's base.c function: if Matrix_Check((PyObject *)val) used to expand to an expression in parentheses, but now it doesn't. The cvxopt authors just need to wrap the "if" expression in parentheses and all will be well again. I will contact upstream. Indeed: https://docs.python.org/3.10/whatsnew/changelog.html """Convert PyObject_TypeCheck() macro to a static inline function.""" https://bugs.python.org/issue43181 Thanks. https://github.com/cvxopt/cvxopt/pull/190 I will add that patch and kick off a Rawhide build. Patched version built in Rawhide. As always, works like a charm. Thanks, Jerry! |