-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python-3.13.0b1 changes behavior on exec() versus Python-3.12 and before ... is it normal ? #118938
Comments
hugovk
added
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
labels
May 11, 2024
Thanks for testing the beta! Perhaps related to #118888? |
I am rather sure this is a duplicate. |
I had read PEP 667, looks logically nice until that effect, but how to rewrite my code ?` ha, this way: d={}
a="""def py_helloa():
"hello world"
return ("Hello, a World !");""";
exec(a, globals(), locals());
ae=eval('py_helloa');
print(ae())
def test():
b="""def py_hellob():
"hello world"
return ("Hello, b World !");""";
exec(b, globals(), d);
be=eval('py_hellob', d);
print(be())
test() |
seems to work in Python-3.12 too... |
so I did a fix to work on Python-3.13.0b1 for my package, but it's not clear if I should have done it now, with #118921 |
Further discussion should be on the original issue #118888. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
this code works on Python-3.12 and gives
on Python-3.13.0b1 it fails on the b part:
CPython versions tested on:
3.12, 3.13
Operating systems tested on:
Windows
The text was updated successfully, but these errors were encountered: