Skip to content

Conversation

bje-
Copy link

@bje- bje- commented Jul 30, 2025

Use node.value, not node.s which has was previously deprecated but has now been removed in Python 3.14.

Remove obsolete AST types that are supplanted by ast.Constant.

now been removed in Python 3.14.

Remove obsolete ast types that are supplanted by ast.Constant.
@bje-
Copy link
Author

bje- commented Jul 30, 2025

Fixes #1287

@sigmavirus24
Copy link
Member

This seems to meaningfully change the results of some scans. Can you please look at the test failures? I don't have sufficient time to dig into them myself but maybe @ericwb does

Comment on lines -208 to -210
elif isinstance(literal, ast.Ellipsis):
# what do we want to do with this?
literal_value = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary to remove?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

% uvx python3.14 -c"import ast ; ast.Ellipsis"

Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import ast ; ast.Ellipsis
                 ^^^^^^^^^^^^
AttributeError: module 'ast' has no attribute 'Ellipsis'

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

Successfully merging this pull request may close these issues.

3 participants