Skip to content
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

[3.11] gh-91456: [Enum] Deprecate default auto() behavior with mixed value types (GH-91457) #94156

Merged
merged 1 commit into from
Jun 23, 2022

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 23, 2022

When used with plain Enum, auto() returns the last numeric value assigned, skipping any incompatible member values (such as strings); starting in 3.13 the default auto() for plain Enums will require all the values to be of compatible types, and will return a new value that is 1 higher than any existing value.

Co-authored-by: Ethan Furman ethan@stoneleaf.us
(cherry picked from commit fb1e950)

Co-authored-by: Oscar R 89599049+oscar-LT@users.noreply.github.com

…alue types (pythonGH-91457)

When used with plain Enum, auto() returns the last numeric value assigned, skipping any incompatible member values (such as strings); starting in 3.13 the default auto() for plain Enums will require all the values to be of compatible types, and will return a new value that is 1 higher than any existing value.

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
(cherry picked from commit fb1e950)

Co-authored-by: Oscar R <89599049+oscar-LT@users.noreply.github.com>
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

@bedevere-bot bedevere-bot added type-bug An unexpected behavior, bug, or error awaiting review labels Jun 23, 2022
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 321acd4 into python:3.11 Jun 23, 2022
@miss-islington miss-islington deleted the backport-fb1e950-3.11 branch June 23, 2022 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants