Closed
Description
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:
- imghdr is deprecated and slated for removal in Python 3.13 sphinx-doc/sphinx#10440 (comment)
- sphinx-doc/sphinx@a502e75
- https://github.com/sphinx-doc/sphinx/releases/tag/v6.2.0
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:
- Run Sphinx with Python older than 3.13 (ex: Python 3.12) which still had the imghdr module
- Don't remove the imghdr module in Python 3.13
- Provide the imghdr module on PyPI, as it was done with nntplib (on PyPI) -- old Sphinx versions would still be supported in this case
- For Linux distributions: backport the Sphinx 6.2 change to older Sphinx version to support Python 3.13 without imghdr.