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

gh-89554: Document weakref type objects as classes by gaborbernat · Pull Request #150678 · python/cpython · GitHub

Repository navigation

gh-89554: Document weakref type objects as classes - #150678

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
gaborbernat:gh-89554-weakref-class-roles
Jun 2, 2026
Merged

serhiy-storchaka merged 1 commit into
python:mainfrom
gaborbernat:gh-89554-weakref-class-roles

Conversation

Copy link
Copy Markdown
Contributor

weakref.ReferenceType, weakref.ProxyType, and weakref.CallableProxyType are classes (the type objects for weak references and proxies), but the documentation marks them with the .. data:: directive, so :class: cross-references to them cannot resolve against a py:class target.

Switch these three entries to .. class::. weakref.ProxyTypes is left as .. data:: since it is a sequence of the proxy type objects, not a type itself.

Refs: gh-89554. Documentation-only change, so no Misc/NEWS entry (skip news).

ReferenceType, ProxyType and CallableProxyType are classes (the type
objects for weak references and proxies), but were documented with the
".. data::" directive, so ":class:" cross-references to them cannot
resolve against a py:class target.

Switch these three entries to ".. class::". ProxyTypes is left as
".. data::" since it is a sequence of the proxy type objects, not a
type itself.

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #32924414 | 📁 Comparing 5e8b835 against main (2f8f569)

  🔍 Preview build  

1 file changed
± library/weakref.html

Copy link
Copy Markdown
Contributor Author

Backward-compatibility check. Downstream nitpick_ignore lists reference these as py:class far more than py:data (ReferenceType 264:15, ProxyType 8:0), and no independent :data: doc references were found. Strong fix, negligible breakage.

serhiy-storchaka 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. 👍

serhiy-storchaka merged commit 10c4219 into python:main Jun 2, 2026
40 checks passed
github-project-automation Bot moved this from Todo to Done in Docs PRs Jun 2, 2026
serhiy-storchaka added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Jun 2, 2026

Copy link
Copy Markdown

Thanks @gaborbernat for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

Copy link
Copy Markdown

Thanks @gaborbernat for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

Copy link
Copy Markdown

Thanks @gaborbernat for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

bedevere-app Bot commented Jun 2, 2026

Copy link
Copy Markdown

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

bedevere-app Bot removed the needs backport to 3.13 only security fixes label Jun 2, 2026

bedevere-app Bot commented Jun 2, 2026

Copy link
Copy Markdown

GH-150759 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 Jun 2, 2026

bedevere-app Bot commented Jun 2, 2026

Copy link
Copy Markdown

GH-150760 is a backport of this pull request to the 3.15 branch.

bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Jun 2, 2026
serhiy-storchaka pushed a commit that referenced this pull request Jun 2, 2026
…GH-150758)

Use the "class" directive instead of "data" for ReferenceType,
ProxyType and CallableProxyType.
(cherry picked from commit 10c4219)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
serhiy-storchaka pushed a commit that referenced this pull request Jun 2, 2026
…GH-150759)

Use the "class" directive instead of "data" for ReferenceType,
ProxyType and CallableProxyType.
(cherry picked from commit 10c4219)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
serhiy-storchaka pushed a commit that referenced this pull request Jun 2, 2026
…GH-150760)

Use the "class" directive instead of "data" for ReferenceType,
ProxyType and CallableProxyType.
(cherry picked from commit 10c4219)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
gaborbernat deleted the gh-89554-weakref-class-roles branch October 3, 2026 15:12
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.

2 participants


Back | FazBrowse Home | New Git URL