Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
[3.12] gh-104271: Fix auto() fallback in case of mixed type Enum#104279
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Thanks@itamaro for the PR, and@ethanfurman for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry@itamaro and@ethanfurman, I had trouble checking out the |
@ethanfurman how do we port it also to main branch now? should it be a new PR for main? |
It doesn't need to go in main (which is now 3.13) because mixed types are no longer supported by the default |
Thanks@itamaro for the PR, and@ethanfurman for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
bedevere-bot commentedMay 23, 2023
GH-104809 is a backport of this pull request to the3.11 branch. |
pythonGH-104279)(cherry picked from commitf4e2049)Co-authored-by: Itamar Ostricher <itamarost@gmail.com>pythongh-104271: Fix auto() fallback in case of mixed type Enum
Uh oh!
There was an error while loading.Please reload this page.
gh-91457 changed the behavior of
auto()
in case of mixed type Enums.the fallback behavior (before deprecation) was supposed to be backwards compatible (I think), but iterating the sorted
last_values
in order (instead of reversed order) results an incorrect behavior of always reusing values after the firstauto()
, as demonstrated in the test case I extended in this PR.