| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
The Docs CI job fails with: Could not import extension sphinx.builders.epub3 (exception: No module named 'imghdr') Oh. It seems like the Sphinx EPUB builder requires the removed imghdr module. |
Sorry, something went wrong.
|
Sphinx used to depend on imghdr, but no longer does as of Sphinx 6.2.0:
Therefore we'll need to start using Sphinx 6.2.0 for Python 3.13. |
Sorry, something went wrong.
@doko42 would it be managable from a Debian packaging point of view? Do we have some contacts with other distribs? I remember the last bump of needs_sphinx raised a lot of concerns. |
Sorry, something went wrong.
|
@encukou Is requiring Sphinx 6.2.0 for Python 3.13 okay for Red Hat? |
Sorry, something went wrong.
There was a problem hiding this comment.
Avoid new Sphinx warnings:
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 7a479c6e56..9b33155c5a 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -1735,7 +1735,7 @@ Modules
+---------------------+---------------------+---------------------+---------------------+---------------------+
| :mod:`audioop` | :mod:`crypt` | :mod:`nis` | :mod:`sndhdr` | :mod:`uu` |
+---------------------+---------------------+---------------------+---------------------+---------------------+
- | :mod:`cgi` | :mod:`imghdr` | :mod:`nntplib` | :mod:`spwd` | :mod:`xdrlib` |
+ | :mod:`cgi` | :mod:`!imghdr` | :mod:`nntplib` | :mod:`spwd` | :mod:`xdrlib` |
+---------------------+---------------------+---------------------+---------------------+---------------------+
| :mod:`cgitb` | :mod:`mailcap` | :mod:`ossaudiodev` | :mod:`sunau` | |
+---------------------+---------------------+---------------------+---------------------+---------------------+
diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst
index 14b6425cea..d13036f6fd 100644
--- a/Doc/whatsnew/3.5.rst
+++ b/Doc/whatsnew/3.5.rst
@@ -1252,7 +1252,7 @@ Oberkirch in :issue:`21800`.)
imghdr
------
-The :func:`~imghdr.what` function now recognizes the
+The :func:`!imghdr.what` function now recognizes the
`OpenEXR <https://www.openexr.com>`_ format
(contributed by Martin Vignali and Claudiu Popa in :issue:`20295`),
and the `WebP <https://en.wikipedia.org/wiki/WebP>`_ format
Sorry, something went wrong.
| * :mod:`chunk` | ||
| * :mod:`crypt` | ||
| * :mod:`imghdr` | ||
| * ``imghdr`` |
There was a problem hiding this comment.
| * ``imghdr`` | |
| * :mod:`!imghdr` |
Sorry, something went wrong.
| `filetype <https://pypi.org/project/filetype/>`_, | ||
| `puremagic <https://pypi.org/project/puremagic/>`_, | ||
| or `python-magic <https://pypi.org/project/python-magic/>`_ instead. | ||
| (Contributed by Victor Stinner in :gh:`104773`.) |
There was a problem hiding this comment.
Reference the PEP.
Sorry, something went wrong.
| Remove the ``imghdr`` module, deprecated in Python 3.11: use the projects | ||
| `filetype <https://pypi.org/project/filetype/>`_, `puremagic | ||
| <https://pypi.org/project/puremagic/>`_, or `python-magic | ||
| <https://pypi.org/project/python-magic/>`_ instead. Patch by Victor Stinner. |
There was a problem hiding this comment.
Reference the PEP.
Sorry, something went wrong.
Yes. It's OK for Fedora. (And RHEL will follow Fedora after some time.) |
Sorry, something went wrong.
We should likely prefer :func:`~!imghdr.what` to keep the rendered HTML showing only what. A |
Sorry, something went wrong.
| Removed | ||
| ======= | ||
|
|
||
| * Remove the ``imghdr`` module, deprecated in Python 3.11: use the projects |
There was a problem hiding this comment.
| * Remove the ``imghdr`` module, deprecated in Python 3.11: use the projects | |
| * Remove the :mod:`!imghdr` module, deprecated in Python 3.11: use the projects |
Sorry, something went wrong.
| @@ -0,0 +1,4 @@ | |||
| Remove the ``imghdr`` module, deprecated in Python 3.11: use the projects | |||
There was a problem hiding this comment.
| Remove the ``imghdr`` module, deprecated in Python 3.11: use the projects | |
| Remove the :mod:`!imghdr` module, deprecated in Python 3.11: use the projects |
Sorry, something went wrong.
|
OpenSUSE is using Sphinx 7 for Python 3.12 builds Debian and Ubuntu are the only remaining distributions from the list we checked last time. A |
Sorry, something went wrong.
|
I created issue #104818 "Require Sphinx 6.2 to build Python 3.13 documentation". I propose to discuss updating Sphinx (or not) there. |
Sorry, something went wrong.
|
I rebased the PR on the main branch. |
Sorry, something went wrong.
* Remove the Lib/test/imghdrdata/ directory. * Copy 5 pictures (gif, png, ppm, pgm, xbm) from removed Lib/test/imghdrdata/ to a new Lib/test/tkinterdata/ directory.
* Update Sphinx from 4.5 to 6.2 in Doc/requirements.txt.
There was a problem hiding this comment.
Looks good, we can use Sphinx 6.2 for the "normal" docs build and for doctest (both use requirements.txt), and still support 3.2 in Doc/requirements-oldest-sphinx.txt.
Sorry, something went wrong.
Right. I only upgraded Sphinx in the GHA "Doctest" job. It seems like increasing the minimum Sphinx version to build the documentation is not strictly required to remove the imghdr module. I prefer to decorelate the imghdr removal and increase the minimum Sphinx version to build the Python documentation. So far, still supporting Sphinx 3.2 makes it possible to build Python 3.13 documentation on Debian Stable: #104818 (comment) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
📚 Documentation preview 📚: https://cpython-previews--104777.org.readthedocs.build/