fix(internals): Act upon and resolve Python 3.15 AST deprecations#1668
Merged
fix(internals): Act upon and resolve Python 3.15 AST deprecations#1668
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1668 +/- ##
==========================================
- Coverage 93.55% 93.49% -0.07%
==========================================
Files 133 133
Lines 12641 12704 +63
==========================================
+ Hits 11826 11877 +51
- Misses 815 827 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Member
Member
Author
Contributor
|
| Branch | ks-fix-ast-name-field-types |
| Testbed | Linux |
Click to view all benchmark results
| Benchmark | hugr_bytes | Benchmark Result bytes x 1e3 (Result Δ%) | Upper Boundary bytes x 1e3 (Limit %) | hugr_nodes | Benchmark Result nodes x 1e3 (Result Δ%) | Upper Boundary nodes x 1e3 (Limit %) |
|---|---|---|---|---|---|---|
| tests/benchmarks/test_big_array.py::test_big_array_compile | 📈 view plot 🚷 view threshold | 158.77 x 1e3(0.00%)Baseline: 158.77 x 1e3 | 160.36 x 1e3 (99.01%) | 📈 view plot 🚷 view threshold | 6.64 x 1e3(0.00%)Baseline: 6.64 x 1e3 | 6.71 x 1e3 (99.01%) |
| tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_compile | 📈 view plot 🚷 view threshold | 27.53 x 1e3(0.00%)Baseline: 27.53 x 1e3 | 27.81 x 1e3 (99.01%) | 📈 view plot 🚷 view threshold | 1.07 x 1e3(0.00%)Baseline: 1.07 x 1e3 | 1.08 x 1e3 (99.01%) |
hsemenenko
requested changes
Apr 20, 2026
hsemenenko
approved these changes
Apr 20, 2026
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.
Closes #1316.
Resolves warnings like these:
Summary
_field_typeshandling for customast.Name,ast.Call, andast.FunctionDefsubclasses inguppylang_internals.nodes3.15now validates themsuper().__init__(**node.__dict__)forDagger,Control, andPowerset_location_from(...)Why
Python
3.14warns about AST constructor patterns that will become errors in Python3.15, including:_field_typesThis change updates the affected custom AST nodes in
guppylang_internals.nodesso they no longer rely on deprecated constructor behavior.Validation
uv run pytest -W default::DeprecationWarningNotes
The only remaining
DeprecationWarningentries from the full test run are Python stdlibmultiprocessingfork()warnings intests/test_guppy_decoupled.py, not AST-node warnings from Guppy.