-
- Notifications
You must be signed in to change notification settings - Fork 2.4k
Deprecate ImageCmsProfile product_name and product_info #8995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…/product_info The _set method is no longer necessary, since we no longer compute any attributes from the profile. In most cases, we only set the profile, and in only one branch do we set the filename to anything non-None. product_name/product_info were set to None at some point during what appears to be a batch of changes for Python 3 compatibility (ce041fd), and never set back. Given this, let's deprecate these and schedule them for removal in Pillow 13.
docs/deprecations.rst Outdated
| ``ImageCms.ImageCmsProfile.product_name`` and the corresponding | ||
| ``.product_info`` attributes have been deprecated, and will be removed in | ||
| Pillow 13 (2026-10-15). These attributes can be accessed on the ``.profile`` | ||
| attribute of ``ImageCmsProfile`` instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not following this.
>>> from PIL import ImageCms >>> profile = ImageCms.ImageCmsProfile(ImageCms.createProfile("sRGB")) >>> profile.profile.product_name Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'PIL.ImageCms.core.CmsProfile' object has no attribute 'product_name'There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've pushed commits to remove the replacement suggestion.
This is an undocumented underscore method, so not part of the public API and can be changed/removed without deprecation. https://pillow.readthedocs.io/en/stable/reference/ImageCms.html |
7629c2e to 7713df9 Compare | I've created #9032, to move forward with part of this at least. |
dabb506 to 97cd599 Compare 1598ce8 to f6df21b Compare 01e0b00 to 8383b72 Compare
The _set method is no longer necessary, since we no longer compute any attributes from the profile. In most cases, we only set the profile, and in only one branch do we set the filename to anything non-None.
product_name/product_info were set to None at some point during what appears to be a batch of changes for Python 3 compatibility (ce041fd), and never set back. Given this, let's deprecate these and schedule them for removal in Pillow 13.
Changes proposed in this pull request: