Restored Makernote as a deprecated enum#8629
Conversation
| Exif = 0x8769 | ||
| GPSInfo = 0x8825 | ||
| MakerNote = 0x927C | ||
| Makernote = 0x927C # Deprecated |
There was a problem hiding this comment.
Can we raise a deprecation warning when accessed?
We've had problems before, removing VERSION after only deprecating in docs.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Do you mean just restore the enum value, and add a comment? Done.
There was a problem hiding this comment.
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``.|
Something to be aware of - with the current state of this PR, from PIL import ExifTags
print(ExifTags.IFD.Makernote)will give |
#8615 replaced
ExifTags.IFD.MakernotewithExifTags.IFD.MakerNote.#8614 (comment) has requested that we keep
ExifTags.IFD.Makernotefor now, as a deprecated enum.