-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Submission for SC consideration: PEP 670 -- Convert macros to functions in the Python C API #90
Comments
I've added this to our rolling agenda. |
Hi, is there any update on this PEP? |
No but is scheduled to be discussed next week. |
Hi, did you discuss this PEP in latest meetings? Do you have questions about it? |
We did discuss it, but we aren't done yet. |
One of my motivation to push the PEP 670 is my plan to Slowly bend the C API towards the limited API to get a stable ABI for everyone. I didn't put it in the PEP because the relationship between the PEP 670 and the limited API/stable ABI is indirect, and the PEP alone is not enough to immediately make the whole default C API usable to get the stable ABI. |
The SC posted an announcement on python-dev recently. A copy of the announcement is inlined in this message for convenience.
Thank you for submitting PEP 670 (Convert macros to functions in the Python C API)!
The steering council is still discussing it. We're not ready to accept the PEP as a whole, but there are parts on which we agree unanimously.
To unblock the work, we're making the following pronouncements:
All other things being equal, static inline functions are better than macros. The performance impact of changing macros to static inline functions is negligible. When there is no backwards compatibility issue, macros can be changed to static inline functions. The straightforward macros should be converted first. When they are, we hope that it will become easier to evaluate the remaining ones.
|
We posted a second version of the PEP which takes in account all the feedback that we received so far: https://mail.python.org/archives/list/python-dev@python.org/thread/VM6I3UHVMME6QRSUOYLK6N2OZHP454W6/ It better explains the requirement for a macro to not add new compiler warnings, and it restricts the PEP scope (even more) to really avoid any risk of backward compatibility. |
I've put the PEP back on our agenda. |
@encukou reorganized the PEP (merge the two sections about performance) and clarified a few points: python/peps#2461 PEP 670 can be read at: https://peps.python.org/pep-0670/ |
The PEP is |
Hi,
The PEP 670 "Convert macros to functions in the Python C API" has been discussed for 1 month on python-dev. Erlend and me updated the PEP multiple times to address comments of Antoine Pitrou and Petr Viktorin.
The PEP is also based on past discussions on the bug tracker and pull requests. I tried to reply to arguments of Marc Andre Lemburg and Raymond Hettinger, and I added "Rejected Ideas: Keep macros, but fix some macro issues" which tries to describe Lemburg's point of view. I included benchmarks to answer to Raymond's worries about a possible performance slowdown.
Victor and Erlend @erlend-aasland
The text was updated successfully, but these errors were encountered: