Skip to content

Commit 329d6a6

Browse files
authored
Remove reference to libtiff 3.x (#9072)
2 parents 3e5df07 + cbd47d8 commit 329d6a6

File tree

3 files changed

+4
-25
lines changed

3 files changed

+4
-25
lines changed

docs/deprecations.rst

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@ Deprecated features
1212
Below are features which are considered deprecated. Where appropriate,
1313
a :py:exc:`DeprecationWarning` is issued.
1414

15-
ImageDraw.getdraw hints parameter
16-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17-
18-
.. deprecated:: 10.4.0
19-
20-
The ``hints`` parameter in :py:meth:`~PIL.ImageDraw.getdraw()` has been deprecated.
21-
2215
ExifTags.IFD.Makernote
2316
^^^^^^^^^^^^^^^^^^^^^^
2417

@@ -186,6 +179,7 @@ ICNS (width, height, scale) sizes
186179
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
187180

188181
.. deprecated:: 11.0.0
182+
.. versionremoved:: 12.0.0
189183

190184
Setting an ICNS image size to ``(width, height, scale)`` before loading has been
191185
removed. Instead, ``load(scale)`` can be used.

docs/installation/building-from-source.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Many of Pillow's features require external libraries:
4444

4545
* **libtiff** provides compressed TIFF functionality
4646

47-
* Pillow has been tested with libtiff versions **3.x** and **4.0-4.7.0**
47+
* Pillow has been tested with libtiff versions **4.0-4.7.0**
4848

4949
* **libfreetype** provides type related services
5050

src/PIL/features.py

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import PIL
1010

1111
from . import Image
12-
from ._deprecate import deprecate
1312

1413
modules = {
1514
"pil": ("PIL._imaging", "PILLOW_VERSION"),
@@ -120,7 +119,7 @@ def get_supported_codecs() -> list[str]:
120119
return [f for f in codecs if check_codec(f)]
121120

122121

123-
features: dict[str, tuple[str, str | bool, str | None]] = {
122+
features: dict[str, tuple[str, str, str | None]] = {
124123
"raqm": ("PIL._imagingft", "HAVE_RAQM", "raqm_version"),
125124
"fribidi": ("PIL._imagingft", "HAVE_FRIBIDI", "fribidi_version"),
126125
"harfbuzz": ("PIL._imagingft", "HAVE_HARFBUZZ", "harfbuzz_version"),
@@ -146,12 +145,8 @@ def check_feature(feature: str) -> bool | None:
146145

147146
module, flag, ver = features[feature]
148147

149-
if isinstance(flag, bool):
150-
deprecate(f'check_feature("{feature}")', 12)
151148
try:
152149
imported_module = __import__(module, fromlist=["PIL"])
153-
if isinstance(flag, bool):
154-
return flag
155150
return getattr(imported_module, flag)
156151
except ModuleNotFoundError:
157152
return None
@@ -181,17 +176,7 @@ def get_supported_features() -> list[str]:
181176
"""
182177
:returns: A list of all supported features.
183178
"""
184-
supported_features = []
185-
for f, (module, flag, _) in features.items():
186-
if flag is True:
187-
for feature, (feature_module, _) in modules.items():
188-
if feature_module == module:
189-
if check_module(feature):
190-
supported_features.append(f)
191-
break
192-
elif check_feature(f):
193-
supported_features.append(f)
194-
return supported_features
179+
return [f for f in features if check_feature(f)]
195180

196181

197182
def check(feature: str) -> bool | None:

0 commit comments

Comments
 (0)