mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-01 00:17:27 +03:00 
			
		
		
		
	Removed specific WebP feature checks
This commit is contained in:
		
							parent
							
								
									b72b8dd84d
								
							
						
					
					
						commit
						cce39084f5
					
				|  | @ -55,21 +55,6 @@ def test_version() -> None: | |||
|             test(feature, features.version_feature) | ||||
| 
 | ||||
| 
 | ||||
| def test_webp_transparency() -> None: | ||||
|     with pytest.warns(DeprecationWarning, match="transp_webp"): | ||||
|         assert (features.check("transp_webp") or False) == features.check_module("webp") | ||||
| 
 | ||||
| 
 | ||||
| def test_webp_mux() -> None: | ||||
|     with pytest.warns(DeprecationWarning, match="webp_mux"): | ||||
|         assert (features.check("webp_mux") or False) == features.check_module("webp") | ||||
| 
 | ||||
| 
 | ||||
| def test_webp_anim() -> None: | ||||
|     with pytest.warns(DeprecationWarning, match="webp_anim"): | ||||
|         assert (features.check("webp_anim") or False) == features.check_module("webp") | ||||
| 
 | ||||
| 
 | ||||
| @skip_unless_feature("libjpeg_turbo") | ||||
| def test_libjpeg_turbo_version() -> None: | ||||
|     version = features.version("libjpeg_turbo") | ||||
|  |  | |||
|  | @ -39,9 +39,6 @@ def test_wheel_codecs() -> None: | |||
| 
 | ||||
| def test_wheel_features() -> None: | ||||
|     expected_features = { | ||||
|         "webp_anim", | ||||
|         "webp_mux", | ||||
|         "transp_webp", | ||||
|         "raqm", | ||||
|         "fribidi", | ||||
|         "harfbuzz", | ||||
|  |  | |||
|  | @ -122,16 +122,6 @@ The ``options`` parameter in :py:meth:`~PIL.ImageMath.lambda_eval()` and | |||
| :py:meth:`~PIL.ImageMath.unsafe_eval()` has been deprecated. One or more keyword | ||||
| arguments can be used instead. | ||||
| 
 | ||||
| Specific WebP feature checks | ||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||||
| 
 | ||||
| .. deprecated:: 11.0.0 | ||||
| 
 | ||||
| ``features.check("transp_webp")``, ``features.check("webp_mux")`` and | ||||
| ``features.check("webp_anim")`` are now deprecated. They will always return | ||||
| ``True`` if the WebP module is installed, until they are removed in Pillow | ||||
| 12.0.0 (2025-10-15). | ||||
| 
 | ||||
| Get internal pointers to objects | ||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||||
| 
 | ||||
|  | @ -222,14 +212,23 @@ JpegImageFile.huffman_ac and JpegImageFile.huffman_dc | |||
| .. versionremoved:: 12.0.0 | ||||
| 
 | ||||
| The ``huffman_ac`` and ``huffman_dc`` dictionaries on JPEG images were unused. They | ||||
| have been deprecated, and will be removed in Pillow 12 (2025-10-15). | ||||
| have been removed. | ||||
| 
 | ||||
| Specific WebP feature checks | ||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||||
| 
 | ||||
| .. deprecated:: 11.0.0 | ||||
| .. versionremoved:: 12.0.0 | ||||
| 
 | ||||
| ``features.check("transp_webp")``, ``features.check("webp_mux")`` and | ||||
| ``features.check("webp_anim")`` have been removed. | ||||
| 
 | ||||
| TiffImagePlugin IFD_LEGACY_API | ||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
| 
 | ||||
| .. versionremoved:: 11.0.0 | ||||
| 
 | ||||
| ``TiffImagePlugin.IFD_LEGACY_API`` was removed, as it was an unused setting. | ||||
| ``TiffImagePlugin.IFD_LEGACY_API`` has been removed, as it was an unused setting. | ||||
| 
 | ||||
| PSFile | ||||
| ~~~~~~ | ||||
|  |  | |||
|  | @ -60,9 +60,6 @@ Support for the following features can be checked: | |||
| * ``raqm``: Raqm library, required for ``ImageFont.Layout.RAQM`` in :py:func:`PIL.ImageFont.truetype`. Run-time version number is available for Raqm 0.7.0 or newer. | ||||
| * ``libimagequant``: (compile time) ImageQuant quantization support in :py:func:`PIL.Image.Image.quantize`. Run-time version number is available. | ||||
| * ``xcb``: (compile time) Support for X11 in :py:func:`PIL.ImageGrab.grab` via the XCB library. | ||||
| * ``transp_webp``: Deprecated. Always ``True`` if WebP module is installed. | ||||
| * ``webp_mux``: Deprecated. Always ``True`` if WebP module is installed. | ||||
| * ``webp_anim``: Deprecated. Always ``True`` if WebP module is installed. | ||||
| 
 | ||||
| .. autofunction:: PIL.features.check_feature | ||||
| .. autofunction:: PIL.features.version_feature | ||||
|  |  | |||
|  | @ -121,9 +121,6 @@ def get_supported_codecs() -> list[str]: | |||
| 
 | ||||
| 
 | ||||
| features: dict[str, tuple[str, str | bool, str | None]] = { | ||||
|     "webp_anim": ("PIL._webp", True, None), | ||||
|     "webp_mux": ("PIL._webp", True, None), | ||||
|     "transp_webp": ("PIL._webp", True, None), | ||||
|     "raqm": ("PIL._imagingft", "HAVE_RAQM", "raqm_version"), | ||||
|     "fribidi": ("PIL._imagingft", "HAVE_FRIBIDI", "fribidi_version"), | ||||
|     "harfbuzz": ("PIL._imagingft", "HAVE_HARFBUZZ", "harfbuzz_version"), | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user