]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-130070: Fix `exec(<string>, closure=<non-None>)` unexpected path (#130071)
authorBartosz Sławecki <bartosz@ilikepython.com>
Thu, 17 Apr 2025 07:14:55 +0000 (09:14 +0200)
committerGitHub <noreply@github.com>
Thu, 17 Apr 2025 07:14:55 +0000 (10:14 +0300)
commit954b2cf031fb84ff3386251d5c45281f47229003
treecec08f4229842376295d9a372480a39844ca0b55
parentd7df7815f555a4a5d6f4308072cbacd1286e8060
gh-130070: Fix `exec(<string>, closure=<non-None>)` unexpected path (#130071)

Fixed an assertion error (so, it could be reproduced only in builds with assertions enabled)
for `exec` when the `source` argument is a string and the `closure` argument is not `None`.

Co-authored-by: sobolevn <mail@sobolevn.me>
Lib/test/test_builtin.py
Misc/NEWS.d/next/Core_and_Builtins/2025-02-13-05-09-31.gh-issue-130070.C8c9gK.rst [new file with mode: 0644]
Python/bltinmodule.c