Uh oh!
There was an error while loading. Please reload this page.
gh-89554: Document socket, thread and expat type objects as classes - #150681
gh-89554: Document socket, thread and expat type objects as classes#150681gaborbernat wants to merge 1 commit into
Conversation
…sses socket.SocketType, _thread.LockType and xml.parsers.expat.XMLParserType are classes (the type objects for socket, lock and expat parser objects), 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::".
Please, don't create a PR. We already did so for PyExpat but the problem is the name of the class and for now we gave up. And if you want to document the others, you need to open separate PRs. |
gaborbernat
commented
May 31, 2026
Can you expand on why? |
gaborbernat
commented
May 31, 2026
picnixz
commented
May 31, 2026
At runtime, the name of the class is >>>pyexpat.ParserCreate()
<pyexpat.xmlparserobjectat0x0000026B96F1AC70>and xml.parsers.expat.XMLParserType is exposed as: Lines 2445 to 2447 in 2f8f569 So, if we now change to The issue is #140771. And we still don't know what to do with it. Note that changing the directives will make packages relying on intersphinx broken and this will break all links. I don't know how we can mitigate this (i.e. using |
vstinner
commented
Jun 1, 2026
Is it a problem to document The two types are already documented at: |
socket.SocketType,_thread.LockType, andxml.parsers.expat.XMLParserTypeare classes (the type objects for socket, lock, and expat parser objects), 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::.Refs: gh-89554. Documentation-only change, so no
Misc/NEWSentry (skip news).These files are not covered by CODEOWNERS, so cc @vstinner (socket and _thread) and @picnixz (pyexpat), who review most changes to these modules.