Skip to content

gh-151948:Fix all Sphinx reference warnings in Doc/library/select.rst - #151957

Open
lpyu001 wants to merge 5 commits into
python:mainfrom
lpyu001:bugifx
Open

gh-151948:Fix all Sphinx reference warnings in Doc/library/select.rst#151957
lpyu001 wants to merge 5 commits into
python:mainfrom
lpyu001:bugifx

Conversation

@lpyu001

@lpyu001 lpyu001 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

@read-the-docs-community

read-the-docs-community Bot commented Jun 23, 2026

Copy link
Copy Markdown

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to just remove the references, we want to fix them.

@bedevere-app

bedevere-app Bot commented Jun 23, 2026

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

And if you don't make the requested changes, you will be put in the comfy chair!

@lpyu001

lpyu001 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

We don't want to just remove the references, we want to fix them.

I've modified it.pls review again

Comment thread Doc/library/select.rst Outdated
Comment thread Doc/library/select.rst
:const:`POLLPRI`, and :const:`POLLOUT`, described in the table above. If not
specified, the default value used will check for all 3 types of events.

+-------------------+-------------------------------------------+

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this moved?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lpyu001 Please answer this question.

@lpyu001 lpyu001 changed the title gh-151948:Fix all Sphinx reference warnings in Doc/library/select.rst gh-151948:Fix all Sphinx reference warnings in Doc/library/select.rst Jun 26, 2026
@lpyu001

lpyu001 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again

@bedevere-app

bedevere-app Bot commented Jul 22, 2026

Copy link
Copy Markdown

Thanks for making the requested changes!

@StanFromIreland: please review the changes made to this pull request.

@bedevere-app
bedevere-app Bot requested a review from StanFromIreland July 22, 2026 01:21
@lpyu001

lpyu001 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

when the table remains inside the poll.register() directive, Sphinx records the first entry with the HTML ID select.poll.POLLIN, it creates an incorrect permalink and intersphinx inventory entry for POLLIN

file:///C:/Users/syhsp/Desktop/library/select.html#select.poll.POLLIN @hugovk

@lpyu001

lpyu001 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Sorry, I replied to the question earlier, but I forgot to click “Submit review”, so the comment remained pending.

@lpyu001

lpyu001 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Additionally, Sphinx omits the current context prefix from the displayed signature, so it shows only POLLIN, making it inconsistent with the other constants.
pollin

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aargh, sorry, I had this in pending all along!

Comment thread Doc/library/select.rst
.. method:: kqueue.control(changelist, max_events[, timeout])

Low level interface to kevent
Low level interface to kevent, returning a list of events.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Low level interface to kevent, returning a list of events.
Low level interface to kevent, returning a list of :ref:`kevent <kevent-objects>`
objects.

Comment thread Doc/library/select.rst
| Constant | Meaning |
+============================+============================================+
| :const:`KQ_NOTE_LOWAT` | Low water mark of a socket buffer. |
| .. data:: KQ_NOTE_LOWAT | Low water mark of a socket buffer. |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one, and only this one, for some Sphinx reason, is in the attributes scope.

Image

We can work around this (here and under the other attributes) by resetting to the module scope:

.. currentmodule:: select

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

Labels

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants