]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Fix a SystemError in code.replace() (#27771)
authorGuido van Rossum <guido@python.org>
Mon, 16 Aug 2021 18:34:23 +0000 (11:34 -0700)
committerGitHub <noreply@github.com>
Mon, 16 Aug 2021 18:34:23 +0000 (11:34 -0700)
commit62bd97303eb6d1fb0109e4a57d38c2ba6b0be7ff
tree63ac3d6fbe5a343b65d538b86ddd7f2566ab348e
parenta0a6d39295a30434b088f4b66439bf5ea21a3e4e
Fix a SystemError in code.replace() (#27771)

While the comment said 'We don't bother resizing localspluskinds',
this would cause .replace() to crash when it happened.
(Also types.CodeType(), but testing that is tedious, and this tests all
code paths.)
Lib/test/test_code.py
Objects/codeobject.c