Skip to content
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
8 changes: 8 additions & 0 deletions docs/deprecations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@ deprecated and will be removed in Pillow 12 (2025-10-15). They were used for obt
raw pointers to ``ImagingCore`` internals. To interact with C code, you can use
``Image.Image.getim()``, which returns a ``Capsule`` object.

ExifTags.IFD.Makernote
^^^^^^^^^^^^^^^^^^^^^^

.. deprecated:: 11.1.0

``ExifTags.IFD.Makernote`` has been deprecated. Instead, use
``ExifTags.IFD.MakerNote``.

Removed features
----------------

Expand Down
7 changes: 4 additions & 3 deletions docs/releasenotes/11.1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ TODO
Deprecations
============

TODO
^^^^
ExifTags.IFD.Makernote
^^^^^^^^^^^^^^^^^^^^^^

TODO
``ExifTags.IFD.Makernote`` has been deprecated. Instead, use
``ExifTags.IFD.MakerNote``.

API Changes
===========
Expand Down
1 change: 1 addition & 0 deletions src/PIL/ExifTags.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ class IFD(IntEnum):
Exif = 0x8769
GPSInfo = 0x8825
MakerNote = 0x927C
Makernote = 0x927C # Deprecated
Copy link
Member

Choose a reason for hiding this comment

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

Can we raise a deprecation warning when accessed?

We've had problems before, removing VERSION after only deprecating in docs.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've tried __getattr__, __getitem__ and @property, and I don't think so, no.

It was only added in #6748 in Pillow 9.4.0, so I would expect this to have smaller use.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for checking.

Yeah, I expect this should cause much less breakage.

Still, if we can't warn in code, perhaps we should just deprecate this without planning to remove it? It doesn't cost anything to keep this one line.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you mean just restore the enum value, and add a comment? Done.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, and we can also document it as deprecated, but don't mention any removal date:

-``ExifTags.IFD.Makernote`` has been deprecated and will be removed in Pillow 13
-(2026-10-15). Instead, use ``ExifTags.IFD.MakerNote``.
+``ExifTags.IFD.Makernote`` has been deprecated. Instead, use ``ExifTags.IFD.MakerNote``.

Interop = 0xA005
IFD1 = -1

Expand Down
Loading