-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
All extension codes must be positive (enforced when using copyreg.add_extension
and in both pickle.py
and _pickle.c
implementations), but pickletools doesn't throw an error if EXT4
has a negative argument.
I can make a pull request to change the argument from int4
to uint4
, but that means pickletools accepts extension codes that are 0x7fffffff
or higher, while pickle.py
and _pickle.c
don't. I could also change those modules so they process the 4 bytes as unsigned also, if no one has any objections to that.
CPython versions tested on:
3.11
Operating systems tested on:
Linux
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
Done