Add typing information to ImageCmsProfile, and deprecate product_name/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 (ce041fd1995fe95de86804c83d100ed7d8ecdb3b), and never set back. Given this, let's deprecate these and schedule them for removal in Pillow 13.
Changes proposed in this pull request:
- Add attribute typing to ImageCmsProfile
- Deprecate ImageCms.ImageCmsProfile.product_name, ImageCms.ImageCmsProfile.product_info
- Deprecate ImageCms.ImageCmsProfile._set
- Deprecate ImageCms.ImageCmsProfile._set
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
I've created https://github.com/python-pillow/Pillow/pull/9032, to move forward with part of this at least.