Removed unused TiffImagePlugin IFD_LEGACY_API#8355
Removed unused TiffImagePlugin IFD_LEGACY_API#8355radarhere merged 1 commit intopython-pillow:mainfrom
Conversation
|
Searching the top 8k PyPI projects only shows use in Pillow and type checkers: ❯ python3 ~/github/misc/cpython/search_pypi_top.py -q . IFD_LEGACY_API
./pytype-2024.4.11.tar.gz: pytype-2024.4.11/pytype/typeshed/stubs/Pillow/PIL/TiffImagePlugin.pyi: IFD_LEGACY_API: bool
./pillow-10.3.0.tar.gz: pillow-10.3.0/src/PIL/TiffImagePlugin.py: IFD_LEGACY_API = True
./pillow-10.3.0.tar.gz: pillow-10.3.0/src/PIL/TiffImagePlugin.py: # undone -- switch this pointer when IFD_LEGACY_API == False
./pyre-check-0.9.22.tar.gz: pyre_check-0.9.22/typeshed/stubs/Pillow/PIL/TiffImagePlugin.pyi: IFD_LEGACY_API: bool
./types-Pillow-10.2.0.20240520.tar.gz: types-Pillow-10.2.0.20240520/PIL-stubs/TiffImagePlugin.pyi: IFD_LEGACY_API: bool
Time: 0:00:29.920569
Found 5 matching lines in 4 projectsLikewise with grep.app: https://grep.app/search?q=IFD_LEGACY_API&case=true And GitHub, where it's also in some AST symbol tables, but they look like dumps of specific versions: https://github.com/search?q=IFD_LEGACY_API&ref=opensearch&type=code&p=1 Technically this is a breaking change, but I think we can make an exception to the deprecation period, and go straight to removal in a major version. Let's also document it in the release notes and removals. |
d988023 to
f1cfb51
Compare
docs/releasenotes/11.0.0.rst
Outdated
| TiffImagePlugin IFD_LEGACY_API | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| TODO | ||
| An unused setting, ``TiffImagePlugin.IFD_LEGACY_API``, has been removed. |
There was a problem hiding this comment.
Let's move this under "Backwards Incompatible Changes"
|
|
||
|
|
||
| # undone -- switch this pointer when IFD_LEGACY_API == False | ||
| ImageFileDirectory = ImageFileDirectory_v1 |
There was a problem hiding this comment.
Are there still plans to switch this in the future?
There was a problem hiding this comment.
There were something like 3 stages to the tiff IFD modernization, and I got through stage 1, years back now. Something like it is going to be required if we're going to do robust tiff tags, but it's not on my list anymore.
There was a problem hiding this comment.
I've restored the comment that it is 'undone' to 'switch this pointer'
f1cfb51 to
94315f8
Compare
This value is not used anywhere.
Pillow/src/PIL/TiffImagePlugin.py
Line 72 in 6377321