◐ Shell
reader mode source ↗
Skip to content

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

@Yashp002 Yashp002 commented Nov 20, 2025

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 ZeroIntensity self-requested a review November 21, 2025 12:12
@Yashp002

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 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.

Hide comment

Looks pretty good, a few final comments.

Yashp002 and others added 4 commits December 1, 2025 11:03

@vstinner 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.

Hide comment

LGTM

Co-authored-by: Victor Stinner <vstinner@python.org>

@ZeroIntensity 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.

Hide comment

LGTM as well, thanks!

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

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

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 bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Dec 1, 2025
@bedevere-app

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 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

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>
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