-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-101100: [docs] Fix Sphinx warnings in dis
module
#102597
Conversation
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.
Seems otherwise good overall, but instead of disabling resolution and silencing the warnings, could co_names
be properly documented instead, just like codeobject.co_positions
currently is, especially since it's referenced nearly a dozen times in this document?
I don't know enough about the history of these fields. They might be not documented on purpose. We need a field expert here to decide. |
@iritkatriel can you please take a look? :) |
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.
A comment on the pre-fixing of codeobject.
-- I think we should revert this for now.
It may also be better to add an entry to nitpick_ignore
in conf.py
with an explanatory note rather than supressing these warnings, if we intend to document the code object attributes at a later date.
Or can we do it now? |
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Closed by #108476 by @erlend-aasland |
Sorry, @sobolevn, I didn't know you had a PR open :( |
Original errors:
A couple of notes for reviewers:
:func:myfunc
was rendered incorrectly (invalid signature):Because
:func:
is reserved for functions defined with.. function::
directive.I've silenced
!builtins.__build_class__
reference, because as far as I understand, there's no desire in documenting this feature. So, now this reference renders the same way, but just does not error out:attr:!codeobject.*
are also just ignoring warnings, because right now there's no way to address these attributes documented here: https://github.com/python/cpython/blame/5ffdaf748d98da6065158534720f1996a45a0072/Doc/reference/datamodel.rst#L956 So, we just add an ignore and slightly more contextPyObject_Format
will be found after gh-102595: DocumentPyObject_Format
c-api function #102596 is merged