Skip to content

Require Sphinx 6.2 to build Python 3.13 documentation #104818

Closed
@vstinner

Description

@vstinner

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:

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

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions