GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-151948:Fix all Sphinx reference warnings in `Doc/library/select.rst` by lpyu001 · Pull Request #151957 · python/cpython

Conversation

@lpyu001

@lpyu001 lpyu001 commented Jun 23, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Issue: Fix all Sphinx reference warnings in Doc/library/select.rst #151948

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@lpyu001
Update select.rst
c95064b
@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news labels Jun 23, 2026
@github-project-automation github-project-automation Bot added this to Docs PRs Jun 23, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Jun 23, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Jun 23, 2026
Fix all Sphinx reference warnings in Doc/library/select.rst #151948
Open
@bedevere-app bedevere-app Bot added the awaiting review label Jun 23, 2026
@read-the-docs-community

read-the-docs-community Bot commented Jun 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34564884 | 📁 Comparing 50a59b2 against main (6920036)

  🔍 Preview build  

420 files changed · + 12 added · ± 406 modified · - 2 deleted

+ Added

  • builtins/constants.html
  • builtins/exceptions.html
  • builtins/functions.html
  • builtins/index.html
  • builtins/stdtypes.html
  • builtins/threadsafety.html
  • builtins/time-complexity.html
  • library/asyncio-tools.html
  • library/time-complexity.html
  • library/tkinter.dialogs.html
  • and 2 more...

± Modified

  • glossary.html
  • index.html
  • license.html
  • py-modindex.html
  • c-api/arg.html
  • c-api/bool.html
  • c-api/buffer.html
  • c-api/bytearray.html
  • c-api/bytes.html
  • c-api/capsule.html
  • and 396 more...

- Deleted

  • library/asyncio-policy.html
  • library/dialog.html
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lpyu001
Update .nitignore
a0af0a2
@lpyu001
lpyu001 requested review from AA-Turner, StanFromIreland and hugovk as code owners June 23, 2026 03:46
StanFromIreland
StanFromIreland requested changes Jun 23, 2026
View reviewed changes

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

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.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting changes and removed awaiting review labels Jun 23, 2026
@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!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lpyu001
Update select.rst
0297d51
@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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

StanFromIreland
StanFromIreland reviewed Jun 23, 2026
View reviewed changes
Comment thread Doc/library/select.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@lpyu001
revert unrelated changes
0f8b861
StanFromIreland
StanFromIreland reviewed Jun 23, 2026
View reviewed changes
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.

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

@StanFromIreland StanFromIreland Jun 23, 2026

Copy link
Copy Markdown
Member

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.

Why was this moved?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@hugovk hugovk Sep 9, 2026

Copy link
Copy Markdown
Member

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.

@lpyu001 Please answer this question.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting change review and removed awaiting changes labels Jul 22, 2026
@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app
bedevere-app Bot requested a review from StanFromIreland July 22, 2026 01:21
@lpyu001
Merge branch 'main' into bugifx
f329916
@lpyu001

lpyu001 commented Sep 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lpyu001

lpyu001 commented Sep 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

StanFromIreland
StanFromIreland reviewed Sep 10, 2026
View reviewed changes

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

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.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

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

@StanFromIreland StanFromIreland Jun 23, 2026

Copy link
Copy Markdown
Member

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.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

@StanFromIreland StanFromIreland Jun 23, 2026

Copy link
Copy Markdown
Member

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.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@lpyu001 lpyu001 Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

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.

.. currentmodule:: select doesn't actually fix it. It only resets py:module, not py:class, so a nested table still produces select.kevent.KQ_NOTE_LOWAT. What fixes it is putting the intro sentence at column 0, because that ends the .. attribute:: body. A build without currentmodule produces an identical objects.inv.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
lpyu001 added 4 commits September 12, 2026 22:50
@lpyu001
Update select.rst
00ae66b
@lpyu001
update
d84652c
@lpyu001
Merge branch 'main' into bugifx
da3630b
@lpyu001
updates
50a59b2
@lpyu001

lpyu001 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app

bedevere-app Bot commented Sep 15, 2026

Copy link
Copy Markdown

Thanks for making the requested changes!

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app
bedevere-app Bot requested a review from StanFromIreland September 15, 2026 07:43
StanFromIreland
StanFromIreland reviewed Sep 15, 2026
View reviewed changes
Comment thread Doc/library/select.rst
The following flags can be used with :attr:`kevent.fflags`, depending on the
filter type.

:const:`KQ_FILTER_READ` and :const:`KQ_FILTER_WRITE` filter flags:

@StanFromIreland StanFromIreland Sep 15, 2026

Copy link
Copy Markdown
Member

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.

Why are these dedented now, did setting .. currentmodule:: not work?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@lpyu001

lpyu001 commented Sep 16, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

yes .. currentmodule:: only sets py:module, not py:class — with the table left inside the attribute body I still got select.kevent.KQ_NOTE_LOWAT. Dedenting ends the attribute body, which puts the constants back at module scope. I dedented the tables too so they don't render inside a blockquote

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland

StanFromIreland commented Sep 16, 2026

Copy link
Copy Markdown
Member

Oh I see, is there no other way to avoid this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lpyu001

lpyu001 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

The current approach is the only one I found that works, and I think the current layout also follows existing documentation conventions.

Several modules already document constants exactly like this

  • curses.rst, "Attributes" (

    cpython/Doc/library/curses.rst

    Lines 2330 to 2344 in 7f52444

    Some constants are available to specify character cell attributes.
    The exact constants available are system dependent.
    .. _curses-wa-constants:
    +------------------------+-------------------------+------------------------------------------+
    | Attribute | Wide attribute | Meaning |
    +========================+=========================+==========================================+
    | .. data:: A_ALTCHARSET | .. data:: WA_ALTCHARSET | Alternate character set mode |
    +------------------------+-------------------------+------------------------------------------+
    | .. data:: A_BLINK | .. data:: WA_BLINK | Blink mode |
    +------------------------+-------------------------+------------------------------------------+
    | .. data:: A_BOLD | .. data:: WA_BOLD | Bold mode |
    +------------------------+-------------------------+------------------------------------------+
    | .. data:: A_DIM | .. data:: WA_DIM | Dim mode |
    )
  • curses.ascii.rst, control characters (

    cpython/Doc/library/curses.ascii.rst

    Lines 12 to 24 in 7f52444

    functions to test membership in various ASCII character classes. The constants
    supplied are names for control characters as follows:
    +---------------+----------------------------------------------+
    | Name | Meaning |
    +===============+==============================================+
    | .. data:: NUL | |
    +---------------+----------------------------------------------+
    | .. data:: SOH | Start of heading, console interrupt |
    +---------------+----------------------------------------------+
    | .. data:: STX | Start of text |
    +---------------+----------------------------------------------+
    | .. data:: ETX | End of text |
    )
  • xml.dom.rst, exception codes (

    cpython/Doc/library/xml.dom.rst

    Lines 1432 to 1444 in 7f52444

    The exception codes defined in the DOM recommendation map to the exceptions
    described above according to this table:
    +---------------------------------------+---------------------------------+
    | Constant | Exception |
    +=======================================+=================================+
    | .. data:: DOMSTRING_SIZE_ERR | :exc:`DomstringSizeErr` |
    +---------------------------------------+---------------------------------+
    | .. data:: HIERARCHY_REQUEST_ERR | :exc:`HierarchyRequestErr` |
    +---------------------------------------+---------------------------------+
    | .. data:: INDEX_SIZE_ERR | :exc:`IndexSizeErr` |
    +---------------------------------------+---------------------------------+
    | .. data:: INUSE_ATTRIBUTE_ERR | :exc:`InuseAttributeErr` |
    )
  • decimal.rst, C module constants (

    cpython/Doc/library/decimal.rst

    Lines 1603 to 1615 in 7f52444

    The following constants are only relevant for the C module. They
    are also included in the pure Python version for compatibility.
    +---------------------------------+---------------------+-------------------------------+
    | | 32-bit | 64-bit |
    +=================================+=====================+===============================+
    | .. data:: MAX_PREC | ``425000000`` | ``999999999999999999`` |
    +---------------------------------+---------------------+-------------------------------+
    | .. data:: MAX_EMAX | ``425000000`` | ``999999999999999999`` |
    +---------------------------------+---------------------+-------------------------------+
    | .. data:: MIN_EMIN | ``-425000000`` | ``-999999999999999999`` |
    +---------------------------------+---------------------+-------------------------------+
    | .. data:: MIN_ETINY | ``-849999999`` | ``-1999999999999999997`` |
    )
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

@StanFromIreland StanFromIreland StanFromIreland requested changes
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner
@hugovk hugovk Awaiting requested review from hugovk hugovk is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting change review docs Documentation in the Doc dir skip news

Projects

Docs PRs
Status: Todo

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@lpyu001 @StanFromIreland @hugovk
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.