From edd620a352556b3b6e49db399e9d4a20c67a5283 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 31 Mar 2024 15:56:57 +0300 Subject: [PATCH 1/3] Add type hints to release notes --- docs/releasenotes/10.3.0.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/releasenotes/10.3.0.rst b/docs/releasenotes/10.3.0.rst index 446ad211d..36c5f5f5f 100644 --- a/docs/releasenotes/10.3.0.rst +++ b/docs/releasenotes/10.3.0.rst @@ -104,3 +104,9 @@ Release GIL when fetching WebP frames Python's Global Interpreter Lock is now released when fetching WebP frames from the libwebp decoder. + +Type hints +^^^^^^^^^^ + +Pillow now has type hints, and the package includes a ``py.typed`` file and the +``Typing :: Typed`` Trove classifier. From 7b2320b50fd44f54637752ebb0c7c365c4430085 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 31 Mar 2024 15:57:20 +0300 Subject: [PATCH 2/3] Fix typos --- CHANGES.rst | 4 ++-- Tests/test_locale.py | 2 +- src/libImaging/JpegDecode.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index f753bcdc1..9dae34a1f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4325,7 +4325,7 @@ Changelog (Pillow) - Documentation changes, URL update, transpose, release checklist [radarhere] -- Fixed saving to nonexistant files specified by pathlib.Path objects #1748 (fixes #1747) +- Fixed saving to nonexistent files specified by pathlib.Path objects #1748 (fixes #1747) [radarhere] - Round Image.crop arguments to the nearest integer #1745 (fixes #1744) @@ -7536,7 +7536,7 @@ The test suite includes 400 individual tests. - A handbook is available (distributed separately). - The coordinate system is changed so that (0,0) is now located - in the upper left corner. This is in compliancy with ISO 12087 + in the upper left corner. This is in compliance with ISO 12087 and 90% of all other image processing and graphics libraries. - Modes "1" (bilevel) and "P" (palette) have been introduced. Note diff --git a/Tests/test_locale.py b/Tests/test_locale.py index 1c8b84a2b..386c57cc0 100644 --- a/Tests/test_locale.py +++ b/Tests/test_locale.py @@ -19,7 +19,7 @@ from PIL import Image # 7 # 160 -# one of string.whitespace is not freely convertable into ascii. +# one of string.whitespace is not freely convertible into ascii. path = "Tests/images/hopper.jpg" diff --git a/src/libImaging/JpegDecode.c b/src/libImaging/JpegDecode.c index 55d10a81a..6f75d8670 100644 --- a/src/libImaging/JpegDecode.c +++ b/src/libImaging/JpegDecode.c @@ -180,7 +180,7 @@ ImagingJpegDecode(Imaging im, ImagingCodecState state, UINT8 *buf, Py_ssize_t by /* Decoder settings */ - /* jpegmode indicates whats in the file; if not set, we'll + /* jpegmode indicates what's in the file; if not set, we'll trust the decoder */ if (strcmp(context->jpegmode, "L") == 0) { context->cinfo.jpeg_color_space = JCS_GRAYSCALE; From 6d57e8823791368ab7b2c8a426935bb14e6b26f2 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 31 Mar 2024 17:41:46 +0300 Subject: [PATCH 3/3] Improve wording MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ondrej Baranovič --- docs/releasenotes/10.3.0.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/releasenotes/10.3.0.rst b/docs/releasenotes/10.3.0.rst index 36c5f5f5f..a73efcee4 100644 --- a/docs/releasenotes/10.3.0.rst +++ b/docs/releasenotes/10.3.0.rst @@ -108,5 +108,5 @@ the libwebp decoder. Type hints ^^^^^^^^^^ -Pillow now has type hints, and the package includes a ``py.typed`` file and the -``Typing :: Typed`` Trove classifier. +Pillow now has type hints for a large part of its modules, and the package +includes a ``py.typed`` file and the ``Typing :: Typed`` Trove classifier.