Skip to content
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

Removed unused TiffImagePlugin IFD_LEGACY_API #8355

Merged
merged 1 commit into from
Sep 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/deprecations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ Removed features
Deprecated features are only removed in major releases after an appropriate
period of deprecation has passed.

TiffImagePlugin IFD_LEGACY_API
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionremoved:: 11.0.0

``TiffImagePlugin.IFD_LEGACY_API`` was removed, as it was an unused setting.

PSFile
~~~~~~

Expand Down
5 changes: 5 additions & 0 deletions docs/releasenotes/11.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ removed. Pillow's C API will now be used on PyPy instead.
``Image.USE_CFFI_ACCESS``, for switching from the C API to PyAccess, was
similarly removed.

TiffImagePlugin IFD_LEGACY_API
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

An unused setting, ``TiffImagePlugin.IFD_LEGACY_API``, has been removed.

Deprecations
============

Expand Down
3 changes: 1 addition & 2 deletions src/PIL/TiffImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
# Set these to true to force use of libtiff for reading or writing.
READ_LIBTIFF = False
WRITE_LIBTIFF = False
IFD_LEGACY_API = True
STRIP_SIZE = 65536

II = b"II" # little-endian (Intel style)
Expand Down Expand Up @@ -1125,7 +1124,7 @@ def __getitem__(self, tag: int) -> Any:
return val


# undone -- switch this pointer when IFD_LEGACY_API == False
# undone -- switch this pointer
ImageFileDirectory = ImageFileDirectory_v1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there still plans to switch this in the future?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

@radarhere radarhere Sep 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've restored the comment that it is 'undone' to 'switch this pointer'



Expand Down
Loading