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-93820: Fix copy() regression in enum.Flag (GH-93876) #93886

Merged
merged 1 commit into from
Jun 17, 2022

Conversation

miss-islington
Copy link
Contributor

GH-26658 introduced a regression in copy / pickle protocol for combined
enum.Flags. copy.copy(re.A | re.I) would fail with
AttributeError: ASCII|IGNORECASE.

enum.Flag now has a __reduce_ex__() method that reduces flags by
combined value, not by combined name.
(cherry picked from commit 05b32c1)

Co-authored-by: Christian Heimes christian@python.org

pythonGH-26658 introduced a regression in copy / pickle protocol for combined
`enum.Flag`s. `copy.copy(re.A | re.I)` would fail with
`AttributeError: ASCII|IGNORECASE`.

`enum.Flag` now has a `__reduce_ex__()` method that reduces flags by
combined value, not by combined name.
(cherry picked from commit 05b32c1)

Co-authored-by: Christian Heimes <christian@python.org>
@miss-islington
Copy link
Contributor Author

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

@miss-islington
Copy link
Contributor Author

@tiran: Status check is done, and it's a success ❌ .

@serhiy-storchaka serhiy-storchaka merged commit 3fbf5c6 into python:3.11 Jun 17, 2022
@miss-islington miss-islington deleted the backport-05b32c1-3.11 branch June 17, 2022 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants