-
-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
Require Sphinx 6.2 to build Python 3.13 documentation #104818
Comments
I think this is fine: it can be only for 3.13, not due out until October 2024, and Sphinx 6.2 will be 18 months old by then. |
Sphinx 6.2.0 was released at Apr 23, 2023. Today, it's only 1 month old. But when Python 3.13 final will be released (October 2024), it will be 1 year and 6 months old. |
Would you mind to officially approve the PR #104819 in that case? |
We don't normally build the docs with the Python built from the current repo do we? The Makefile seems to say |
No, we don't build the docs with Python built from the current repo, but we do run doctest on the CI which needs that Python to actually test that Python. For example, see the imghdr removal PR (#104777) that fails with old Sphinx:
https://github.com/python/cpython/actions/runs/5082380617/jobs/9132034271?pr=104777 |
According to packages.debian.org, Debian provides:
I see that Sphinx is slowly being upgraded from 3.4 to 5.3, and then later a migration to 7.0 may happen. While Sphinx is upgrade to 5.3 in testing, Python is upgraded from 3.9 to 3.11. I imagine that in the future, a similar move will happen with the migration from Sphinx 5.3 to 6.2 (or newer) and Python from 3.11 to 3.13 (or maybe first to 3.12). Again, if Debian is stuck with an older Sphinx version, it's easy to backport the change which removed the dependency to the imghdr dependency. Or someone can provide imghdr on PyPI, Debian can create a new dedicated package for it, and then add a build dependency on it (it's not needed to run Python, obviously). Note: a quick & dirty hack is to just copy the Lib/imghdr.py file from Python 3.12 to the right place in Sphinx. But it should not land in production, right? ;-) |
I looked again at the whole problem. I understood that Sphinx 6.2 was stricky required to build the Python documentation on Python 3.13. I was wrong. It's only required for the specific GHA Doctest CI job: only this job runs with Python 3.13. In fact, the GHA Doc job which only builds the documentation runs with Sphinx 3.2 which remains compatible with Python 3.11. Since upgrading Sphinx is not strictly required to remove the imghdr module, I close this issue. Obviously, if someone has another good rationale to upgrade Sphinx, please open a new separated issue with that rationale. But again, the imghdr removal is not a good rationale :-) |
Ah yes, that's a good solution in PR #104777 to unblock imghdr removal: Sphinx 6.2 in And maintain support for 3.2 by keeping We can consider bumping the minimum Sphinx more incrementally. For example, can we already move to Sphinx 5.3 for main/3.13, 3.12 and 3.11? |
I'd think that would think 5.3 as the minimum for 3.11, and maybe 3.12 too would be too aggressive, as it was released a few days before the final release of Python 3.11.0 itself, and it is an already released feature version. For 3.12 we could perhaps bump it to 4.5.0 though, and maybe go 5.3.0 with 3.13. On the other hand, the normal Also, re-closing the issue for now with the correct close state. |
I propose to require Sphinx 6.2.0 to build Python 3.13 documentation.
PEP 594 scheduled the removal of the imghdr module in Python 3.13. Problem: Sphinx EPUB builder used it until Sphinx 6.2.
Sphinx 6.2 got fixed: it no longer uses this deprecated module:
This change is ok for Fedora and RHEL will follow Fedora, and it's ok for OpenSuSE.
In May 2022, Debian Stable used Sphinx 3.4 and Ubuntu LTS used Sphinx 3.5.
In May 2022, Python was modified to require Sphinx 3.2 or newer: see issue #86986.
See also details in the imghdr module removal PR.
Alternatives:
Linked PRs
The text was updated successfully, but these errors were encountered: