Skip to content

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

Open
gaborbernat wants to merge 1 commit into
python:mainfrom
gaborbernat:gh-89554-weakref-class-roles
Open

gh-89554: Document weakref type objects as classes#150678
gaborbernat wants to merge 1 commit into
python:mainfrom
gaborbernat:gh-89554-weakref-class-roles

Conversation

@gaborbernat
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.
@read-the-docs-community
Copy link
Copy Markdown

Documentation build overview

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

  🔍 Preview build  

1 file changed
± library/weakref.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant