-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
gh-116021: Deprecate support for instantiating abstract AST nodes #137865
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
base: main
Are you sure you want to change the base?
Changes from all commits
1b767fc
b72a362
c8dda97
e550c2a
90b7428
16db374
2f390c8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1889,7 +1889,8 @@ def test_pythontypes(self): | |
check = self.check_sizeof | ||
# _ast.AST | ||
import _ast | ||
check(_ast.AST(), size('P')) | ||
with self.assertWarns(DeprecationWarning): | ||
check(_ast.AST(), size('P')) | ||
Comment on lines
-1892
to
+1893
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should probably be rewritten, but I'm not sure I understand the goal of this test well enough to do that. Suggestions welcome! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's to check that objects in For now, leave it here. A separate issue should be opened. |
||
try: | ||
raise TypeError | ||
except TypeError as e: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Support for creating instances of abstract AST nodes from the :mod:`ast` module | ||
is deprecated and scheduled for removal in Python 3.19. Patch by Brian Schubert. |
Uh oh!
There was an error while loading. Please reload this page.