Conversation
4bc9baf to
e7652a1
Compare
|
Superseded the `typing.Dict` approach with whole-class `:no-index:` on `AppType` — fixes all 6 builtin collisions (`dict, exec, help, max, set, sum`) instead of 1, and needs no change to the four `:type:` fields. New head: `e7652a1c5978476267bbe3e05bab2b0d21c187b4`
Cost: 3 existing `:class:` refs to `AppType` itself (`pep.rst`, `protocols/application/index.rst`, `reg.rst`'s own table) can no longer resolve, converted to plain literals. |
|
✅ GOOD TO MERGE @ |
|
✅ GOOD TO MERGE @ Measured on the merge result (main
✅ GOOD TO MERGE @ |
:no-index: on the AppType autoclass (reg.rst:76) fixed the builtin collisions but also dropped AppType's own py-domain target, breaking every :class: link to it -- the 4 hand-written refs plus ~31 more generated from type annotations in pcapkit/protocols/schema/transport and pcapkit/protocols/transport/transport.py. Add an invisible `.. py:class:: AppType` stub with :no-typesetting: right before the no-indexed autoclass (reg.rst:73). It registers just the class's own cross-reference target; docutils merges that anchor onto the autoclass's own signature block, so there's no visible duplicate "class AppType" header. Members stay unindexed, still visible as content. Restored the three hand-converted plain literals (reg.rst's list-table row, application/index.rst, pep.rst) back to :class: links. vendor/reg.rst:63's existing :class: ref needed no edit -- it resolves again automatically once AppType has a target. Fresh -E build: 49 warnings before and after, byte-identical. Bare dict in :type: fields still resolves to docs.python.org, confirming the original fix isn't regressed. objects.inv: +1 py:class entry for AppType, 0 new py:attribute entries for its members. Fixes #717.
e7652a1 to
9d1fbd7
Compare
|
Status: candidate for closing, pending the maintainer's final call — #732's redesign may subsume this. Measured, since my earlier assessment that it would not: the per-transport split changes four of the six collisions, because Sphinx resolves silently only when exactly one target matches, and duplicating a member into both
So #732 takes six collisions to one. Two caveats against closing:
This PR is now 9 added lines in one file ( |
|
Closing unmerged, on the maintainer's decision: "i prefer we close it. no need to update the doc which is already determined to be updated/rewrote entirely." #732 rewrites Issue #717 stays open. This PR carried What #732 does and does not fix, measured, so the redesign inherits the requirement rather than the assumption:
Sphinx resolves silently only when exactly one target matches, so duplicating a member across Work not lost, for whoever picks up #717 under #732: the mechanism that keeps a class linkable while its members carry no targets is |
.pytouched)make testpasses, and a test case covers the changedocs/source/changelog/What is the purpose of your pull request?
docsDescription of your pull request and other information
AppTypehas members literally nameddict,exec,help,max,set,sum(IANA service names), which shadow builtins in bare:type:lookups.:no-index:on its autoclass (reg.rst:76) fixes that, but also dropsAppType's own py-domain target — breaking every:class:link to it: 4hand-written refs plus ~31 generated from type annotations in
pcapkit/protocols/schema/transport/*.pyandtransport/transport.py.Added an invisible
.. py:class:: AppTypestub with:no-typesetting:(
reg.rst:73) immediately before the no-indexed autoclass. It registersonly the class's own target; docutils merges that anchor onto the
autoclass's signature block, so there's no visible duplicate header.
Restored the three hand-converted plain literals back to
:class:links;vendor/reg.rst:63's existing ref needed no edit, it resolves on its own.Result: all ~35
:class:references toAppTypeare working linksagain, including the annotation-generated ones. Its 8,182 members stay
unindexed (still visible as content) — no member is referenced anywhere.
Fresh
-Ebuild: 49 warnings before/after, byte-identical. Baredictin:type:fields still resolves to docs.python.org, notAppType.dict.objects.inv: +1py:classentry forAppType, 0 newpy:attributeentries for its members.
make testunticked: no test covers Sphinx xref resolution.tests/project/test_documentation_claims.pystates that's deliberate andthe measured counts belong in the PR instead — given above.
Changelog unticked: N/A — changelog centralised in #657.
Fixes #717.