-
-
Notifications
You must be signed in to change notification settings - Fork 32k
[3.12] EnumMeta.__getattr__
removed without deprecation
#106762
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
Comments
It's actually |
Enum.__getattr__
removed without deprecationEnumMeta.__getattr__
removed without deprecation
It was the original method of looking up enum members, but it was quite slow; a more performant method is being used now. Do you have a situation where |
Yes, I found it when trying to pass the pylint test suite against Python 3.12. Apparently the presence of a
So, not called directly, but more like A deprecation period would give just a little more runway to deal with that, but the patch probably isn't particularly involved. |
What about just keeping |
Where is |
It's in an upstream dependency # python 3.11
(Pdb) self
<ClassDef.Color l.2 at 0x106fb0910>
(Pdb) self.metaclass()
<ClassDef.EnumType l.468 at 0x1072c9450>
(Pdb) '__getattr__' in self.metaclass().locals
True |
cc/ @Yhg1s to put on your radar for rc1. |
…H-107466) (cherry picked from commit de51ded) Co-authored-by: Jacob Walls <[email protected]>
) (GH-107509) gh-106762: Add news for `EnumMeta.__getattr__` removal (GH-107466) (cherry picked from commit de51ded) Co-authored-by: Jacob Walls <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Bug report
3.11
3.12b4
I see that
__getattr__
is documented, so I would have expected either a deprecation notice or an entry in What's New for Python 3.12.Linked PRs
EnumMeta.__getattr__
removal #107466EnumMeta.__getattr__
removal (GH-107466) #107509The text was updated successfully, but these errors were encountered: