Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
ethanfurman merged 3 commits intopython:3.12fromitamaro:gh-104271
May 23, 2023

Conversation

itamaro
Copy link
Contributor

@itamaroitamaro commentedMay 7, 2023
edited by bedevere-bot
Loading

gh-91457 changed the behavior ofauto() in case of mixed type Enums.
the fallback behavior (before deprecation) was supposed to be backwards compatible (I think), but iterating the sortedlast_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.

@ethanfurmanethanfurman self-assigned thisMay 23, 2023
@ethanfurmanethanfurman added stdlibPython modules in the Lib dir 3.11only security fixes 3.12only security fixes needs backport to 3.11only security fixes labelsMay 23, 2023
@ethanfurmanethanfurman changed the titlegh-104271: Fix auto() fallback in case of mixed type Enum[3.12] gh-104271: Fix auto() fallback in case of mixed type EnumMay 23, 2023
@ethanfurmanethanfurman changed the base branch frommain to3.12May 23, 2023 01:02
@ethanfurmanethanfurman merged commitf4e2049 intopython:3.12May 23, 2023
@miss-islington
Copy link
Contributor

Thanks@itamaro for the PR, and@ethanfurman for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry@itamaro and@ethanfurman, I had trouble checking out the3.11 backport branch.
Please retry by removing and re-adding the "needs backport to 3.11" label.
Alternatively, you can backport usingcherry_picker on the command line.
cherry_picker f4e2049f14d40c1b893c68530eec5e341cf3d929 3.11

@itamaro
Copy link
ContributorAuthor

@ethanfurman how do we port it also to main branch now? should it be a new PR for main?

@ethanfurman
Copy link
Member

It doesn't need to go in main (which is now 3.13) because mixed types are no longer supported by the default_generate_next_value_().

itamaro reacted with thumbs up emoji

@ethanfurmanethanfurman added needs backport to 3.11only security fixes and removed needs backport to 3.11only security fixes labelsMay 23, 2023
@miss-islington
Copy link
Contributor

Thanks@itamaro for the PR, and@ethanfurman for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-104809 is a backport of this pull request to the3.11 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.11only security fixes labelMay 23, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 23, 2023
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
ethanfurman pushed a commit that referenced this pull requestMay 23, 2023
…104809)[3.12]gh-104271: Fix auto() fallback in case of mixed type Enum (GH-104279)(cherry picked from commitf4e2049)Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
@itamaroitamaro deleted the gh-104271 branchApril 9, 2024 15:29
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ethanfurmanethanfurmanethanfurman approved these changes

Assignees

@ethanfurmanethanfurman

Labels
3.11only security fixes3.12only security fixesskip newsstdlibPython modules in the Lib dir
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@itamaro@miss-islington@ethanfurman@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp