This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients WildCard65, erlendaasland, gregory.p.smith, numberZero, vstinner
Date 2021-03-22.16:47:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1616431635.49.0.110235354328.issue43181@roundup.psfhosted.org>
In-reply-to
Content
Me:
> I don't think that PR 24533 should be backported to Python 3.8 and Python 3.9. I prefer to avoid any risk of regression, and so only change Python 3.10.

Sometimes. I'm wise :-D This change broken 2 extension modules which rely on the fact that the macro magically add parenthesis:

python-cvxopt: "if Matrix_Check((PyObject *)val)" with: "#define Matrix_Check(self) PyObject_TypeCheck(self, &matrix_tp)"
https://bugzilla.redhat.com/show_bug.cgi?id=1941557
PR proposed: https://github.com/cvxopt/cvxopt/pull/190

python-Bottleneck: "if PyArray_Check(a_obj) {" with: "#define PyArray_Check(op) PyObject_TypeCheck(op, &PyArray_Type)"
https://bugzilla.redhat.com/show_bug.cgi?id=1941559

"if func(...) {" is not valid C code, but the old macro added magically parenthesis!

It's hard to say if the Python change is a backward incompatible or not... I prefer to keep it and fix the few broken C extensions.
History
Date User Action Args
2021-03-22 16:47:15vstinnersetrecipients: + vstinner, gregory.p.smith, WildCard65, erlendaasland, numberZero
2021-03-22 16:47:15vstinnersetmessageid: <1616431635.49.0.110235354328.issue43181@roundup.psfhosted.org>
2021-03-22 16:47:15vstinnerlinkissue43181 messages
2021-03-22 16:47:15vstinnercreate