Skip to content

[3.11] gh-93820: Fix copy() regression in enum.Flag (GH-93876) - #93886

Merged
serhiy-storchaka merged 1 commit into
python:3.11from
miss-islington:backport-05b32c1-3.11
Jun 17, 2022
Merged

serhiy-storchaka merged 1 commit into
python:3.11from
miss-islington:backport-05b32c1-3.11

Conversation

@miss-islington

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@miss-islington

Copy link
Copy Markdown
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

4 participants