GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-89554: Document weakref type objects as classes by gaborbernat · Pull Request #150678 · python/cpython

Conversation

@gaborbernat

@gaborbernat gaborbernat commented May 31, 2026

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gaborbernat
pythongh-89554: Document weakref type objects as classes
5e8b835
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.
@gaborbernat
gaborbernat requested a review from kumaraditya303 as a code owner May 31, 2026 17:08
@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news labels May 31, 2026
@github-project-automation github-project-automation Bot added this to Docs PRs May 31, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs May 31, 2026
@bedevere-app bedevere-app Bot mentioned this pull request May 31, 2026
Intersphinx inventory classifies some type-like objects as data #89554
Open
@bedevere-app bedevere-app Bot added the awaiting review label May 31, 2026
@read-the-docs-community

read-the-docs-community Bot commented May 31, 2026

Copy link
Copy Markdown

Documentation build overview

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

  🔍 Preview build  

1 file changed
± library/weakref.html
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gaborbernat

gaborbernat commented Jun 1, 2026

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

serhiy-storchaka
serhiy-storchaka approved these changes Jun 2, 2026
View reviewed changes

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM. 👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Jun 2, 2026
@serhiy-storchaka
serhiy-storchaka merged commit 10c4219 into python:main Jun 2, 2026
40 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Jun 2, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Jun 2, 2026
@serhiy-storchaka 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
@miss-islington-app

miss-islington-app Bot commented 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.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented 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.14.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented 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.15.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jun 2, 2026
@bedevere-app

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app 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
@miss-islington @gaborbernat
[3.13] gh-89554: Document weakref type objects as classes (GH-150678) (…
8b9997d
…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 <[email protected]>
serhiy-storchaka pushed a commit that referenced this pull request Jun 2, 2026
@miss-islington @gaborbernat
[3.14] gh-89554: Document weakref type objects as classes (GH-150678) (…
bd4fe0f
…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 <[email protected]>
serhiy-storchaka pushed a commit that referenced this pull request Jun 2, 2026
@miss-islington @gaborbernat
[3.15] gh-89554: Document weakref type objects as classes (GH-150678) (…
506b41d
…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 <[email protected]>
@gaborbernat
gaborbernat deleted the gh-89554-weakref-class-roles branch October 3, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@serhiy-storchaka serhiy-storchaka serhiy-storchaka approved these changes
@kumaraditya303 kumaraditya303 Awaiting requested review from kumaraditya303 kumaraditya303 is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news

Projects

Docs PRs
Status: Done

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@gaborbernat @serhiy-storchaka
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.