Repository navigation
bpo-38007: Added ts_ prefix to PyType_Spec struct members - #15644
LeslieGerman wants to merge 2 commits into
Conversation
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Our records indicate we have not received your CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for your contribution, we look forward to reviewing it! |
So the conflicting "slots" member was renamed to "ts_slots"
33323db to
6046c16
Compare
eduardo-elizondo
left a comment
There was a problem hiding this comment.
There's a slight difference though, _heaptypeobject is not API whereas PyType_FromSpec is. Unless there is a really good reason to break compatibility (which usually happens when a CPython bug is found), the API shouldn't change. Without any more context on why this change is needed, it's unclear if this is the proper fix.
@eduardo-elizondo , for the same reason https://bugs.python.org/issue1086854 was opened. The "slots" member causes compilation errors. To decrease compatibility issues we might rename only the "slots" member. |
@eduardo-elizondo , please note that this change does NOT break binary compatibility. Any built library or application which used If any new version is created for such library/application, usually it is recompiled anyway, then the renaming can be applied in the client code - if those members were in use, at all. |
Idea about a regression testSo that "slots" or "signals" is not introduced again in the headers as an entity name. Add a test, which compiles all CPython headers by mimicing Qt headers have included. If there are no compiler errors, the test passes, otherwise fails. Possible implementation
|
|
I found an "official" Qt solution for this whole issue, the QT_NO_SIGNALS_SLOTS_KEYWORDS and QT_NO_KEYWORDS macros. So this PR is not necessary anymore, so I close it. |
|
Cool! |
https://bugs.python.org/issue38007