Add 'pypi' Sphinx role

This commit is contained in:
Hugo van Kemenade 2023-10-30 08:56:42 +02:00
parent 8d0812252a
commit ac6eb84704
7 changed files with 11 additions and 10 deletions

View File

@ -338,6 +338,7 @@ extlinks = {
"cwe": ("https://cwe.mitre.org/data/definitions/%s.html", "CWE-%s"),
"issue": (_repo + "issues/%s", "#%s"),
"pr": (_repo + "pull/%s", "#%s"),
"pypi": ("https://pypi.org/project/%s/", "%s"),
}
# sphinxext.opengraph

View File

@ -443,6 +443,6 @@ PIL.OleFileIO
.. versionremoved:: 6.0.0
PIL.OleFileIO was removed as a vendored file in Pillow 4.0.0 (2017-01) in favour of
the upstream olefile Python package, and replaced with an ``ImportError`` in 5.0.0
the upstream :pypi:`olefile` Python package, and replaced with an ``ImportError`` in 5.0.0
(2018-01). The deprecated file has now been removed from Pillow. If needed, install from
PyPI (eg. ``python3 -m pip install olefile``).

View File

@ -1296,7 +1296,7 @@ Pillow reads Kodak FlashPix files. In the current version, only the highest
resolution image is read from the file, and the viewing transform is not taken
into account.
To enable FPX support, you must install olefile.
To enable FPX support, you must install :pypi:`olefile`.
.. note::
@ -1374,7 +1374,7 @@ the first sprite in the file is loaded. You can use :py:meth:`~PIL.Image.Image.s
Note that there may be an embedded gamma of 2.2 in MIC files.
To enable MIC support, you must install olefile.
To enable MIC support, you must install :pypi:`olefile`.
MPO
^^^

View File

@ -10,7 +10,7 @@ this class store bitmap fonts, and are used with the
PIL uses its own font file format to store bitmap fonts, limited to 256 characters. You can use
`pilfont.py <https://github.com/python-pillow/pillow-scripts/blob/main/Scripts/pilfont.py>`_
from `pillow-scripts <https://pypi.org/project/pillow-scripts/>`_ to convert BDF and
from :pypi:`pillow-scripts` to convert BDF and
PCF font descriptors (X window font formats) to this format.
Starting with version 1.1.4, PIL can be configured to support TrueType and

View File

@ -17,8 +17,8 @@ Pillow 4.0 supports Python 3.6.
OleFileIO.py
============
OleFileIO.py has been removed as a vendored file and is now installed
from the upstream olefile pypi package. All internal dependencies are
``OleFileIO.py`` has been removed as a vendored file and is now installed
from the upstream :pypi:`olefile` PyPI package. All internal dependencies are
redirected to the olefile package. Direct accesses to
``PIL.OlefileIO`` raises a deprecation warning, then patches the
upstream olefile into ``sys.modules`` in its place.

View File

@ -28,7 +28,7 @@ Scripts
The scripts formerly installed by Pillow have been split into a
separate package, pillow-scripts, living at
https://github.com/python-pillow/pillow-scripts .
https://github.com/python-pillow/pillow-scripts.
API Changes
@ -37,7 +37,7 @@ API Changes
OleFileIO.py
^^^^^^^^^^^^
The olefile module is no longer a required dependency when installing Pillow.
The :pypi:`olefile` module is no longer a required dependency when installing Pillow.
Support for plugins requiring olefile will not be loaded if it is not
installed. This allows library consumers to avoid installing this dependency
if they choose. Some library consumers have little interest in the format

View File

@ -14,8 +14,8 @@ Pillow for Python 3.4 is 5.4.1.
Removed deprecated PIL.OleFileIO
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PIL.OleFileIO was removed as a vendored file and in Pillow 4.0.0 (2017-01) in favour of
the upstream olefile Python package, and replaced with an ``ImportError``. The
``PIL.OleFileIO`` was removed as a vendored file and in Pillow 4.0.0 (2017-01) in favour of
the upstream :pypi:`olefile` Python package, and replaced with an :py:exc:`ImportError`. The
deprecated file has now been removed from Pillow. If needed, install from PyPI (eg.
``python3 -m pip install olefile``).