-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
gh-136823: Update documentation on excluded headers in Python.h #136824
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
gh-136823: Update documentation on excluded headers in Python.h #136824
Conversation
Hi @AA-Turner, could you please take a look at this PR? |
Hi @AA-Turner, I think this PR is now ready to be merged. Would you be so kind to review this once more and if all well, merge it? Thank you so much! |
simplify the sentence and supress link Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@encukou: Do you want to review this change?
The list should also include:
Could you also add a comment to the |
@encukou But regarding other headers, I think the point of this part of the documentation is that C extensions should only include <Python.h>, and not the other Python header files that are already included by <Python.h>. Would it be enough if I add this to the documentation instead of listing the other included headers? This way, the documentation communicates clearly what should be done and why. The risk of naming all the included headers is that the documentation can get out of sync with the implementation (even with the reminder). |
Thanks @SZeltaat for the PR, and @AA-Turner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…pythonGH-136824) (cherry picked from commit c2428ca) Co-authored-by: Sina Zel taat <111974143+SZeltaat@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
…pythonGH-136824) (cherry picked from commit c2428ca) Co-authored-by: Sina Zel taat <111974143+SZeltaat@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
GH-137437 is a backport of this pull request to the 3.14 branch. |
GH-137438 is a backport of this pull request to the 3.13 branch. |
Thank you @SZeltaat! A |
This part of the documentation from https://docs.python.org/3/extending/extending.html#a-simple-example is currently outdated:
This PR aligns the documentation with the code and the comments provided by the original author that implemented the changes.
📚 Documentation preview 📚: https://cpython-previews--136824.org.readthedocs.build/