-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Restored Makernote as a deprecated enum #8629
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
Conversation
@@ -353,6 +353,7 @@ class IFD(IntEnum): | |||
Exif = 0x8769 | |||
GPSInfo = 0x8825 | |||
MakerNote = 0x927C | |||
Makernote = 0x927C # Deprecated |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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``.
Something to be aware of - with the current state of this PR, from PIL import ExifTags
print(ExifTags.IFD.Makernote) will give
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
#8615 replaced
ExifTags.IFD.Makernote
withExifTags.IFD.MakerNote
.#8614 (comment) has requested that we keep
ExifTags.IFD.Makernote
for now, as a deprecated enum.