]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-44342: [Enum] changed pickling from by-value to by-name (GH-26658)
authorEthan Furman <ethan@stoneleaf.us>
Thu, 10 Jun 2021 22:52:09 +0000 (15:52 -0700)
committerGitHub <noreply@github.com>
Thu, 10 Jun 2021 22:52:09 +0000 (15:52 -0700)
commit62f1d2b3d7dda99598d053e10b785c463fdcf591
treeca0da643fcceb26b1ed655b190794e47b6abbd00
parent05073036dcecefc00b0c3e7397601809da41e2f1
bpo-44342: [Enum] changed pickling from by-value to by-name (GH-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.
Lib/enum.py
Lib/test/test_enum.py
Misc/NEWS.d/next/Library/2021-06-10-15-06-47.bpo-44342.qqkGlj.rst [new file with mode: 0644]