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

gh-141004: Document descriptor and dict proxy type objects by Yashp002 · Pull Request #141803 · python/cpython · GitHub

/ cpython Public

gh-141004: Document descriptor and dict proxy type objects - #141803

Merged
ZeroIntensity merged 10 commits into
python:mainfrom
Yashp002:documentdescriptor
Dec 1, 2025
Merged

gh-141004: Document descriptor and dict proxy type objects#141803
ZeroIntensity merged 10 commits into
python:mainfrom
Yashp002:documentdescriptor

Conversation

Yashp002 commented Nov 20, 2025
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Contributor

This PR adds C API documentation for six previously undocumented type objects:

In Doc/c-api/descriptor.rst:

  • PyClassMethodDescr_Type - type for class method descriptors
  • PyGetSetDescr_Type - type for get/set descriptors
  • PyMemberDescr_Type - type for member descriptors
  • PyMethodDescr_Type - type for method descriptors
  • PyWrapperDescr_Type - type for wrapper descriptors

In Doc/c-api/dict.rst:

  • PyDictProxy_Type - type for mapping proxy objects

Each entry follows the existing documentation style and includes a brief description of the type's purpose and its relationship to the Python layer.

Contributes to #141004.


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

ZeroIntensity self-requested a review November 21, 2025 12:12
Comment thread Doc/c-api/descriptor.rst Outdated
Comment thread Doc/c-api/descriptor.rst Outdated
Comment thread Doc/c-api/descriptor.rst Outdated
Comment thread Doc/c-api/descriptor.rst Outdated
Comment thread Doc/c-api/dict.rst Outdated

Copy link
Copy Markdown
Contributor Author

Hi @ZeroIntensity, thanks for the review and apologies for the delay. I've addressed all the feedback:

  • Linked descriptor docs to their corresponding types.*DescriptorType classes (MemberDescriptorType, MethodDescriptorType, WrapperDescriptorType)
  • Moved PyGetSetDescr_Type out of the "Built-in descriptors" section to the correct location with the other C API type objects
  • Added a reference to types.MappingProxyType for PyDictProxy_Type

All checks are passing. Please let me know if anything else needs adjustment.

ZeroIntensity left a comment

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

Looks pretty good, a few final comments.

Comment thread Doc/c-api/dict.rst Outdated
Comment thread Doc/c-api/descriptor.rst Outdated
Comment on lines +28 to +29
C struct as attributes on a type, and correspond to :class:`types.MemberDescriptorType`
objects in the Python layer.

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

We try to keep lines below 80 characters, but this line exceeds that limit. Same goes for a few lines below.

vstinner left a comment

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

LGTM

Comment thread Doc/c-api/descriptor.rst Outdated
Comment thread Doc/c-api/descriptor.rst Outdated
Comment thread Doc/c-api/descriptor.rst Outdated
Co-authored-by: Victor Stinner <vstinner@python.org>

ZeroIntensity left a comment

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

LGTM as well, thanks!

ZeroIntensity enabled auto-merge (squash) December 1, 2025 15:46
ZeroIntensity added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Dec 1, 2025
ZeroIntensity merged commit 52f9b5f into python:main Dec 1, 2025
32 checks passed
github-project-automation Bot moved this from Todo to Done in Docs PRs Dec 1, 2025

Copy link
Copy Markdown

Thanks @Yashp002 for the PR, and @ZeroIntensity for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 1, 2025
…honGH-141803)

(cherry picked from commit 52f9b5f)

Co-authored-by: Yashraj <yashrajpala8@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 1, 2025
…honGH-141803)

(cherry picked from commit 52f9b5f)

Co-authored-by: Yashraj <yashrajpala8@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>

bedevere-app Bot commented Dec 1, 2025

Copy link
Copy Markdown

GH-142147 is a backport of this pull request to the 3.14 branch.

bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Dec 1, 2025

bedevere-app Bot commented Dec 1, 2025

Copy link
Copy Markdown

GH-142148 is a backport of this pull request to the 3.13 branch.

bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Dec 1, 2025
ZeroIntensity added a commit that referenced this pull request Dec 1, 2025
…-141803) (GH142147)

gh-141004: Document descriptor and dict proxy type objects (GH-141803)
(cherry picked from commit 52f9b5f)

Co-authored-by: Yashraj <yashrajpala8@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
ZeroIntensity added a commit that referenced this pull request Dec 1, 2025
…-141803) (GH-142148)

gh-141004: Document descriptor and dict proxy type objects (GH-141803)
(cherry picked from commit 52f9b5f)

Co-authored-by: Yashraj <yashrajpala8@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>

Yashp002 commented Dec 2, 2025

Copy link
Copy Markdown
Contributor Author

Thanks @ZeroIntensity for the guidance :)

StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
…honGH-141803)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
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

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL