Skip to content
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.14: AttributeError: module 'ast' has no attribute 'Str' #430

Open
Tracked by #42
ondrejj opened this issue Oct 30, 2024 · 3 comments
Open
Tracked by #42

Python 3.14: AttributeError: module 'ast' has no attribute 'Str' #430

ondrejj opened this issue Oct 30, 2024 · 3 comments
Labels

Comments

@ondrejj
Copy link

ondrejj commented Oct 30, 2024

According to: https://docs.python.org/dev/whatsnew/3.14.html#id2

Remove the following classes. They were all deprecated since Python 3.8, and
have emitted deprecation warnings since Python 3.12:
ast.Bytes
ast.Ellipsis
ast.NameConstant
ast.Num
ast.Str

Use ast.Constant instead. As a consequence of these removals, user-defined
visit_Num, visit_Str, visit_Bytes, visit_NameConstant and visit_Ellipsis
methods on custom ast.NodeVisitor subclasses will no longer be called when the
NodeVisitor subclass is visiting an AST. Define a visit_Constant method
instead.

https://bugzilla.redhat.com/show_bug.cgi?id=2322715

@diegorusso
Copy link

I confirm I have encountered this error while running pyperformance with CPython main.

@malthe malthe added the bug label Nov 20, 2024
@malthe
Copy link
Owner

malthe commented Nov 20, 2024

Just noting that the final release for 3.14 is October, 2025: https://peps.python.org/pep-0745/.

But time moves fast, so it would be good to be on top of this soonish ...

@diegorusso
Copy link

Just noting that the final release for 3.14 is October, 2025: https://peps.python.org/pep-0745/.

But time moves fast, so it would be good to be on top of this soonish ...

That's correct. I guess from the user point of view there is time, but from the CPython development point of view this causes some issues. Chameleon is used in pyperformance (https://github.com/python/pyperformance/tree/main/pyperformance/data-files/benchmarks/bm_chameleon) and currently it is failing. main branch is mainly where we track our performances and it would be good to have it working again :)
I'll be monitoring this issue and as soon as there is a new release with the fix, I'll update pyperformance.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants