]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-130070: Fix `exec(<string>, closure=<non-None>)` unexpected path (GH-130071...
authorBartosz Sławecki <bartosz@ilikepython.com>
Thu, 17 Apr 2025 09:21:56 +0000 (11:21 +0200)
committerGitHub <noreply@github.com>
Thu, 17 Apr 2025 09:21:56 +0000 (09:21 +0000)
commit582d1ef4639ae2284a4302955582c45bd41ba834
tree4cd909d3c0f531a43db960421b15a000fae29640
parentdb7ad1c89f8b8f0319ec2f3a20f2f3c226a406ed
[3.13] gh-130070: Fix `exec(<string>, closure=<non-None>)` unexpected path (GH-130071) (#132627)

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>
(cherry picked from commit 954b2cf031fb84ff3386251d5c45281f47229003)
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