Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-132331: Addtp_versions_used toPyTypeObject docs#132335

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
sonnyding1 wants to merge3 commits intopython:main
base:main
Choose a base branch
Loading
fromsonnyding1:doc_tp_versions_used

Conversation

sonnyding1
Copy link
Contributor

@sonnyding1sonnyding1 commentedApr 9, 2025
edited by github-actionsbot
Loading

Fixes#132331. Addtp_versions_used to thetp slots section, as well as a description of the field itself. I've read through#113462 and its corresponding PR to understand how this field came about, but please let me know if there are any inaccuracies, thanks!


📚 Documentation preview 📚:https://cpython-previews--132335.org.readthedocs.build/

Co-authored-by: sobolevn <mail@sobolevn.me>
@python-cla-bot
Copy link

python-cla-botbot commentedApr 18, 2025
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed

@@ -2229,6 +2231,17 @@ and :c:data:`PyType_Type` effectively act as defaults.)
.. versionadded:: 3.12


.. c:member:: uint16_t PyTypeObject.tp_versions_used

Internal. Do not use.

Choose a reason for hiding this comment

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

Why should we document something, just to tell people not to use it?

Choose a reason for hiding this comment

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

This field is exposed to the user who may use local PyTypeObject instances that are statically initialized (the LinuxCNC project implements that use case several places). If you do not initialize this field, then you get a warningmissing initializer for member '_typeobject::tp_versions_used'.

Therefore, it should be documented (and it needs to be set to zero when statically initialized).

sonnyding1 reacted with thumbs up emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@BsAtHomeBsAtHomeBsAtHome left review comments

@sobolevnsobolevnsobolevn left review comments

@ZeroIntensityZeroIntensityZeroIntensity left review comments

Assignees
No one assigned
Labels
awaiting reviewdocsDocumentation in the Doc dirskip newstopic-C-API
Projects
Status: Todo
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

tp_versions_used was added toPyTypeObject but is not documented
4 participants
@sonnyding1@BsAtHome@sobolevn@ZeroIntensity

[8]ページ先頭

©2009-2025 Movatter.jp