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

bpo-44342: [Enum] change pickling from by-value to by-name #26658

Merged
merged 1 commit into from Jun 10, 2021

Conversation

@ethanfurman
Copy link
Member

@ethanfurman ethanfurman commented Jun 10, 2021

by-value lookups could fail on complex enums, necessitating a check for
reduce and possibly sabotaging the final enum;

by-name lookups should never fail, and sabotaging is no longer necessary
for class-based enum creation.

https://bugs.python.org/issue44342

by-value lookups could fail on complex enums, necessitating a check for
__reduce__ and possibly sabotaging the final enum;

by-name lookups should never fail, and sabotaging is no longer necessary
for class-based enum creation.
@ethanfurman ethanfurman merged commit 62f1d2b into python:main Jun 10, 2021
12 of 13 checks passed
@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 10, 2021

Thanks @ethanfurman for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒🤖

miss-islington added a commit to miss-islington/cpython that referenced this issue Jun 10, 2021
…-26658)

by-value lookups could fail on complex enums, necessitating a check for
__reduce__ and possibly sabotaging the final enum;

by-name lookups should never fail, and sabotaging is no longer necessary
for class-based enum creation.
(cherry picked from commit 62f1d2b)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Jun 10, 2021

GH-26660 is a backport of this pull request to the 3.10 branch.

ethanfurman added a commit that referenced this issue Jun 10, 2021
GH-26660)

by-value lookups could fail on complex enums, necessitating a check for
__reduce__ and possibly sabotaging the final enum;

by-name lookups should never fail, and sabotaging is no longer necessary
for class-based enum creation.
(cherry picked from commit 62f1d2b)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
@ethanfurman ethanfurman deleted the issue44342-enum-fix_pickling branch Jun 11, 2021
JuniorJPDJ added a commit to JuniorJPDJ/cpython that referenced this issue Aug 12, 2021
…-26658)

by-value lookups could fail on complex enums, necessitating a check for
__reduce__ and possibly sabotaging the final enum;

by-name lookups should never fail, and sabotaging is no longer necessary
for class-based enum creation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants