X Tutup
Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
46491ba
Initial proof-of-concept for yielding synchronous functions.
ZeroIntensity Mar 7, 2026
075a6ab
Get the parser working with "async yield from".
ZeroIntensity Mar 7, 2026
67783c0
Fix the symtable and other things.
ZeroIntensity Mar 7, 2026
fd254b4
Get things somewhat working in the eval loop.
ZeroIntensity Mar 7, 2026
a6f9c5f
Yay it mostly works.
ZeroIntensity Mar 7, 2026
c37cb05
Fix exception handling.
ZeroIntensity Mar 7, 2026
8cb5166
Support return values in async yield from.
ZeroIntensity Mar 7, 2026
17eea03
Remove tests for async gen syntax restrictions.
ZeroIntensity Mar 7, 2026
923305e
Fix more tests.
ZeroIntensity Mar 7, 2026
24603b1
Merge branch 'main' of https://github.com/python/cpython into async-y…
ZeroIntensity Mar 7, 2026
c3b318e
Fix `async yield from` on non-iterator iterable objects in async gens
johnslavik Mar 7, 2026
6145c26
Merge pull request #7 from johnslavik/hyperawait-secret-conspiracy
ZeroIntensity Mar 7, 2026
b64b563
Add tests
johnslavik Mar 9, 2026
8346a0c
Ignore `test_async_yield_from` in Ruff
johnslavik Mar 9, 2026
fa53189
Remove unnecessary `aiter()`
johnslavik Mar 9, 2026
3bfc2da
Fix commented out `test_delegating_generators_claim_to_be_running_wit…
johnslavik Mar 9, 2026
bb59a0f
Merge pull request #8 from johnslavik/hyperawait-secret-conspiracy-tests
ZeroIntensity Mar 9, 2026
6f9877e
Fix a problem in CLEANUP_ASYNC_THROW I think.
ZeroIntensity Mar 9, 2026
7d033a7
Fix a small refleak.
ZeroIntensity Mar 9, 2026
ff55764
Fix missing incref.
ZeroIntensity Mar 9, 2026
85c1087
Remove unused variable.
ZeroIntensity Mar 9, 2026
d3b6d66
Fix delegation of exceptions with athrow().
ZeroIntensity Mar 10, 2026
f0c1ecc
Temporarily skip that test.
ZeroIntensity Mar 11, 2026
bb5324c
Fix return value crash
johnslavik Mar 11, 2026
7f836e3
Merge pull request #9 from johnslavik/hyperawait-hyperfix
ZeroIntensity Mar 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Get the parser working with "async yield from".
  • Loading branch information
ZeroIntensity committed Mar 7, 2026
commit 075a6abaeeee3687618e61ddb75f91a026d40a23
3 changes: 2 additions & 1 deletion Grammar/python.gram
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ simple_stmt[stmt_ty] (memo):
| &'raise' raise_stmt
| &'pass' pass_stmt
| &'del' del_stmt
| &'yield' yield_stmt
| &('yield' | 'async') yield_stmt
| &'assert' assert_stmt
| &'break' break_stmt
| &'continue' continue_stmt
Expand Down Expand Up @@ -724,6 +724,7 @@ if_expression[expr_ty]:
yield_expr[expr_ty]:
| 'yield' 'from' a=expression { _PyAST_YieldFrom(a, EXTRA) }
| 'yield' a=[star_expressions] { _PyAST_Yield(a, EXTRA) }
| 'async' 'yield' 'from' a=expression { _PyAST_AsyncYieldFrom(a, EXTRA) }

star_expressions[expr_ty]:
| a=star_expression b=(',' c=star_expression { c })+ [','] {
Expand Down
16 changes: 11 additions & 5 deletions Include/internal/pycore_ast.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Include/internal/pycore_ast_state.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Parser/Python.asdl
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ module Python
| Await(expr value)
| Yield(expr? value)
| YieldFrom(expr value)
| AsyncYieldFrom(expr value)
-- need sequences for compare to distinguish between
-- x < 4 < 3 and (x < 4) < 3
| Compare(expr left, cmpop* ops, expr* comparators)
Expand Down
Loading
X Tutup