SIGN IN SIGN UP

[3.13] gh-123431: Harmonize extension code checks in pickle (GH-123434) (#123459)

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.
(cherry picked from commit 0c3ea3023878f5ad5ca4680d5510da1fe208cbfa)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
M
Miss Islington (bot) committed
ab29053784c678f003d832bbf9fa4ca7b63db623
Parent: 5c408e3
Committed by GitHub <noreply@github.com> on 9/2/2024, 11:17:16 AM