Skip to content

Infra: Docutils >= 0.22 compatibility - #5234

Open
cjmayo wants to merge 1 commit into
python:mainfrom
cjmayo:docutils
Open

cjmayo wants to merge 1 commit into
python:mainfrom
cjmayo:docutils

Conversation

@cjmayo

@cjmayo cjmayo commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@Secrus Secrus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some initial opinions. Last word is on the PEP maintainers team though.

Comment thread peps/pep-0426.rst

These optional categories are known as
`Extras <Extras (optional dependencies)_>`_. In addition to the four
:ref:`Extras <pep426-extras-optional-dependencies>`. In addition to the four

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it's better to leave the previous link syntax if possible.

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.

What do you mean by leaving the previous syntax? If I revert these changes with git checkout main peps/pep-0426.rst, make html fails with:

pep-0426.rst:748: (ERROR/3) Duplicate target name, cannot be used as a unique reference: "extras".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I meant the reference syntax without using the :ref: role. IIUC RST correctly, we can keep the previous syntax (no :ref:) and just update the anchor names

Comment thread requirements.txt
Sphinx >= 8.2
# 0.22 causes build errors, see https://github.com/python/peps/issues/4924
docutils < 0.22
docutils

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's add a minimal requirement, docutils >= 0.22

@vstinner vstinner Nov 12, 2026 •

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 not accepting older versions if they just run fine? It was docutils >= 0.19.0 before: can we keep this minimum version?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could be fine too, just a personal preference to go with higher versions.

Comment thread peps/pep-0827.rst
Comment on lines +1902 to +1908
* "Partial polymorphic type inference is undecidable" by Hans Boehm: https://dl.acm.org/doi/10.1109/SFCS.1985.44
* "On the Undecidability of Partial Polymorphic Type Reconstruction" by Frank Pfenning: https://www.cs.cmu.edu/~fp/papers/CMU-CS-92-105.pdf

Our setting does not try to infer generic types for functions,
though, which might dodge some of the problems. On the other hand,
we have subtyping. (Honestly we are already pretty deep into some
of these cans of worms.)
Our setting does not try to infer generic types for functions,
though, which might dodge some of the problems. On the other hand,
we have subtyping. (Honestly we are already pretty deep into some
of these cans of worms.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this change necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes:

Traceback
=========

      File "/usr/lib/python3.14/site-packages/sphinx/util/parallel.py", line 137, in _join_one
        raise SphinxParallelError(*result)
    sphinx.errors.SphinxParallelError: docutils.utils.SystemMessage: peps-0718ecb7cd0dafaa966cbbb01d49bb67bb594ebe/peps/pep-0827.rst:1901: (WARNING/2) Footnote content expected.

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

LGTM. The reference changes are correct. Changes on the footnotes adds more indentation, but the rendered doc looks good to me (the only change is the indentation).

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants