]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-123431: Harmonize extension code checks in pickle (GH-123434)
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 29 Aug 2024 05:26:16 +0000 (08:26 +0300)
committerGitHub <noreply@github.com>
Thu, 29 Aug 2024 05:26:16 +0000 (08:26 +0300)
commit0c3ea3023878f5ad5ca4680d5510da1fe208cbfa
tree0c7a53b10e14015079acd427e32c2db480a73075
parentc9930f5022f5e7a290896522280e47a1fecba38a
gh-123431: Harmonize extension code checks in pickle (GH-123434)

This checks are redundant in normal circumstances and can only work if
the extension registry was intentionally broken.

* The Python implementation now raises exception for the extension code
  with false boolean value.
* Simplify the C code. RuntimeError is now raised in explicit checks.
* Add many tests.
Lib/pickle.py
Lib/test/pickletester.py
Modules/_pickle.c