Skip to content

Commit 7713df9

Browse files
committed
Removed ImageCms._set
1 parent f76f64a commit 7713df9

File tree

3 files changed

+1
-22
lines changed

3 files changed

+1
-22
lines changed

Tests/test_imagecms.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -710,8 +710,7 @@ def test_deprecation() -> None:
710710
with pytest.warns(DeprecationWarning):
711711
assert isinstance(ImageCms.FLAGS, dict)
712712

713-
p = ImageCms.createProfile("sRGB")
714-
profile = ImageCmsProfile(p)
713+
profile = ImageCmsProfile(ImageCms.createProfile("sRGB"))
715714
with pytest.warns(DeprecationWarning):
716715
ImageCms.ImageCmsTransform(profile, profile, "RGBA;16B", "RGB")
717716
with pytest.warns(DeprecationWarning):
@@ -721,7 +720,5 @@ def test_deprecation() -> None:
721720
profile.product_name
722721
with pytest.warns(DeprecationWarning):
723722
profile.product_info
724-
with pytest.warns(DeprecationWarning):
725-
profile._set(p)
726723
with pytest.raises(AttributeError):
727724
profile.this_attribute_does_not_exist

docs/deprecations.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,6 @@ Image.Image.get_child_images()
193193
method uses an image's file pointer, and so child images could only be retrieved from
194194
an :py:class:`PIL.ImageFile.ImageFile` instance.
195195

196-
ImageCms.ImageCmsProfile._set
197-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
198-
199-
.. deprecated:: 11.3.0
200-
201-
``ImageCms.ImageCmsProfile._set()`` has been deprecated, and will be removed in
202-
Pillow 13 (2026-10-15). You should construct a new ``ImageCmsProfile`` instance
203-
instead.
204-
205196
ImageCms.ImageCmsProfile.product_name and .product_info
206197
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
207198

src/PIL/ImageCms.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -286,15 +286,6 @@ def __getattr__(self, name: str) -> Any:
286286
msg = f"'{self.__class__.__name__}' has no attribute '{name}'"
287287
raise AttributeError(msg)
288288

289-
def _set(self, profile: core.CmsProfile, filename: str | None = None) -> None:
290-
deprecate(
291-
"ImageCmsProfile._set",
292-
13,
293-
action="Set the 'profile' and 'filename' attributes directly instead.",
294-
)
295-
self.profile = profile
296-
self.filename = filename
297-
298289
def tobytes(self) -> bytes:
299290
"""
300291
Returns the profile in a format suitable for embedding in

0 commit comments

Comments
 (0)