fix[cartesian]: remove usage of deprecated ast types - #2772
Merged
Conversation
Python 3.14 will remove support for a couple of (long) deprecated `ast` types. Currently produces warnigns like ```none DeprecationWarning: ast.Ellipsis is deprecated and will be removed in Python 3.14; use ast.Constant instead ``` or ```none DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead ``` This PR updates the (cartesian) gtscript frontent to not use those types anymore and instead rely on things that are futureproof.
romanc
marked this pull request as ready for review
August 11, 2026 07:06
6 tasks
egparedes
added a commit
that referenced
this pull request
Aug 13, 2026
Three files conflicted, all against #2772 and #2754. 'gtscript_frontend.py': #2772 removed the same deprecated 'ast' usage this branch fixes, but replaced the ellipsis check with 'isinstance(cn, types.EllipsisType)', which never matches — that is the type of the '...' object, not of its AST node ('ast.Constant' with an 'Ellipsis' value). Kept this branch's '_is_ellipsis_node' helper, which does match, and took #2772's better 'visit_Expr': it drops only *string* constant statements rather than every constant, matching the documented intent. The two cartesian test hunks were pure additions on both sides (the ellipsis tests here, the IntEnum tests from #2323) and are both kept. 'test_diagnostic_messages.py': #2754 added PEP 695 alias tests; this branch deleted 'test_add_note_folded_into_str_on_py310', whose 'skipif(version_info >= (3, 11))' means it runs on no supported version. Both intents are preserved, which leaves 'import sys' unused — dropped. #2754 also added test cases spelled with the deprecated 'typing' aliases this branch removes ('List[SampleIntAlias]', 'type SampleGenericAlias[T] = Tuple[T, T]', ...). Those are migrated to the builtin spelling, which git could not do since the two changes touch different lines.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Python 3.14 will remove support for a couple of (long) deprecated
asttypes. Currently produces warnings likeor
This PR updates the (cartesian) gtscript frontend to not use those types anymore and instead rely on things that are future proof, thus eliminating the warning messages.
Requirements
Covered by existing tests cases.
N/A