FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-159808: Sync documented C API structs with their headers by ngoldbaum · Pull Request #159812 · python/cpython · GitHub

Repository navigation

gh-159808: Sync documented C API structs with their headers - #159812

Open
ngoldbaum wants to merge 2 commits into
python:mainfrom
ngoldbaum:update-docs-structs
Open

ngoldbaum wants to merge 2 commits into
python:mainfrom
ngoldbaum:update-docs-structs

Conversation

ngoldbaum commented Oct 19, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

Fixes #159808.

@encukou suggested to just delete the PyTypeObject definition from the docs but I wasn't quite brave enough to do that. I could also see valid reasons for wanting to know what's in that type and just generally would prefer not to break old docs links.

Instead I added a comment to the end of the file in Doc/includes to more forcefully hint that private fields shouldn't be documented. The comment shouldn't show up in the built docs.

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35256376 | 📁 Comparing 73d1798 against main (395d766)

  🔍 Preview build  

3 files changed
± c-api/import.html
± c-api/slots.html
± extending/newtypes.html

brettcannon removed their request for review October 19, 2026 23:34
Comment thread Doc/c-api/import.rst
};
is:

.. literalinclude:: ../../Include/cpython/import.h

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Could you add a comment to import.h before the struct, warning that this is included in public docs?

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review docs Documentation in the Doc dir needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes skip news topic-C-API

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Struct definitions in the documentation differ from the implementation

2 participants


Back | FazBrowse Home | New Git URL