Skip to content

gh-137600: Promote ast node constructor deprecation warnings to errors #137601

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Add whatsnew and news entries
  • Loading branch information
brianschubert committed Aug 9, 2025
commit 4f4466f3ccabd103679439617782279109d22ef3
10 changes: 10 additions & 0 deletions Doc/whatsnew/3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,16 @@ hashlib
Removed
=======

ast
---

* The constructors of node types in the :mod:`ast` module now raise a
:exc:`TypeError` when a required argument is omitted or when a
keyword-argument that does not map to a field on the AST node is passed.
These cases had previously raised a :exc:`DeprecationWarning` since Python 3.13.
(Contributed by Brian Schubert and Jelle Zijlstra in :gh:`137600` and :gh:`105858`.)


ctypes
------

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The constructors of node types in the :mod:`ast` module now raise a
:exc:`TypeError` when a required argument is omitted or when a
keyword-argument that does not map to a field on the AST node is passed.
These cases had previously raised a :exc:`DeprecationWarning` since Python
3.13. Patch by Brian Schubert.
Loading