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. |
Can you expand on why? |
At runtime, the name of the class is >>> pyexpat.ParserCreate()
<pyexpat.xmlparser object at 0x0000026B96F1AC70>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 |
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.