Visitar URL original
Core: store multidata/multisave enums by value on py3.11 by black-sliver · Pull Request #1783 · ArchipelagoMW/Archipelago · GitHub
Skip to content

Core: store multidata/multisave enums by value on py3.11 - #1783

Merged
black-sliver merged 1 commit into
ArchipelagoMW:mainfrom
black-sliver:enum-by-value-mixin
May 2, 2023
Merged

black-sliver merged 1 commit into
ArchipelagoMW:mainfrom
black-sliver:enum-by-value-mixin

Conversation

@black-sliver

Copy link
Copy Markdown
Member

What is this fixing or adding?

Python 3.11 changed to pickle/store enums by name rather than by value. This breaks our safe unpickle, it produces bigger pickles and it makes it impossible to rename keys in enums after the fact.
Changing it back to ByValue produces the same output as py<=3.10.

Change in python is here: python/cpython#26658

How was this tested?

$ python --version
Python 3.11.3
$ Generate.py
$ MultiServer.py ...
/send Player1 A Shrubbery
/save
$ MultiServer.py ...
Loaded save file with 1 received items for 1 players

This is what py3.10 did and should be better for AP than the new default
@black-sliver
black-sliver merged commit 39c7c72 into ArchipelagoMW:main May 2, 2023
@black-sliver
black-sliver deleted the enum-by-value-mixin branch May 2, 2023 06:23
kindasneaki pushed a commit to kindasneaki/Archipelago that referenced this pull request Jun 28, 2023
…MW#1783)

This is what py3.10 did and should be better for AP than the new default
wcoldren pushed a commit to wcoldren/Archipelago that referenced this pull request Jun 17, 2026
…MW#1783)

This is what py3.10 did and should be better for AP than the new default
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.

2 participants