Deprecate ImageCms constants and versions() function#7702
Deprecate ImageCms constants and versions() function#7702hugovk merged 7 commits intopython-pillow:mainfrom
Conversation
| _imagingcms = DeferredError.new(ex) | ||
|
|
||
| DESCRIPTION = """ | ||
| _DESCRIPTION = """ |
There was a problem hiding this comment.
When removing this constant, is there any important info in this text we should keep somewhere?
There was a problem hiding this comment.
Originally released under LGPL. Graciously donated to PIL in
March 2009, for distribution under the standard PIL license
This should probably be turned into a comment - I've pushed a commit.
There are also links to https://www.cazabon.com/pyCMS and https://www.littlecms.com. I'm not sure these need to be kept; https://www.cazabon.com/pyCMS is the first result I get on Google for "Kevin Cazabon's PyCMS library" in a private window.
Otherwise, it just duplicates information from comments in ImageCms.py, text from ImageCms.rst, and part of CHANGES.rst for PIL 1.1.7c1.
docs/releasenotes/10.3.0.rst
Outdated
| ``ImageCms.VERSION`` ``PIL.__version__`` | ||
| ``ImageCms.FLAGS["MATRIXINPUT"]`` :py:attr:`.ImageCms.Flags.CLUT_POST_LINEARIZATION` | ||
| ``ImageCms.FLAGS["MATRIXOUTPUT"]`` :py:attr:`.ImageCms.Flags.FORCE_CLUT` | ||
| ``ImageCms.FLAGS["MATRIXONLY"]`` |
There was a problem hiding this comment.
This is equal to (1 | 2) i.e. (MATRIXINPUT | MATRIXOUTPUT), so it could be CLUT_POST_LINEARIZATION | FORCE_CLUT, but from the flag names it looks like these values have been repurposed in LCMS2.
I wasn't even sure about listing the replacements for MATRIXINPUT and MATRIXOUTPUT, but I couldn't find any LCMS2 documentation on this and didn't feel like hunting around in LCMS2 source code to check for each flag, so I just matched all flags by their values.
…deprecations without a replacement
Co-authored-by: Andrew Murray <[email protected]>
|
Thanks! |
Deprecations proposed in this pull request:
DESCRIPTIONis just a subset of the information in the docs/changelog and can be removed after deprecation.VERSIONhas been equal to"1.0.0 pil"since 2013,PIL.__version__should be used instead.FLAGSis based on LCMS1,Flagsadded in Add LCMS2 flags to ImageCms #7676 uses names from LCMS2.versions()is undocumented and returns values already available elsewhere.