Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: IronLanguages/ironpython3
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: StockSharp/ironpython3
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 9 commits
  • 31 files changed
  • 1 contributor

Commits on Feb 24, 2026

  1. Implement PEP 492: async/await support

    - Tokenizer/Parser: async def, async for, async with, await keywords
    - AST nodes: AwaitExpression, AsyncForStatement, AsyncWithStatement
    - Runtime: PythonCoroutine, CoroutineWrapper types
    - Code generation: coroutines reuse generator state machine via
      yield from desugaring (await → yield from expr.__await__())
    - Fix GeneratorRewriter VisitExtension to reduce one level at a time,
      preventing "must be reducible node" with DebugInfoRemovalExpression
    
    Verified against CPython 3.14: 20/20 comparison tests identical.
    mikasoukhov committed Feb 24, 2026
    Configuration menu
    Copy the full SHA
    09f335b View commit details
    Browse the repository at this point in the history
  2. Add tests for PEP 492 async/await

    23 tests covering async def, await, async with, async for,
    coroutine properties, __await__ protocol, custom awaitables,
    break/continue/else, nested loops, and combined patterns.
    mikasoukhov committed Feb 24, 2026
    Configuration menu
    Copy the full SHA
    a82d993 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    826dfeb View commit details
    Browse the repository at this point in the history
  4. Implement .NET async interop: await Task/ValueTask, async for IAsyncE…

    …numerable, CancelledError
    
    - Add TaskAwaitable/ValueTaskAwaitable wrappers enabling `await` on
      Task, Task<T>, ValueTask and ValueTask<T> from Python async code
    - Add AsyncEnumerableWrapper enabling `async for` over IAsyncEnumerable<T>
    - Map OperationCanceledException to new CancelledError Python exception
    - Add __await__, __aiter__, __anext__ resolvers in PythonTypeInfo
    - Add bridge methods in InstanceOps for the resolver pattern
    - ValueTask/IAsyncEnumerable support gated behind #if NET (requires .NET Core)
    - Handle Task<VoidTaskResult> (internal type arg) by falling back to
      non-generic TaskAwaitable via IsVisible check
    mikasoukhov committed Feb 24, 2026
    Configuration menu
    Copy the full SHA
    a1c1605 View commit details
    Browse the repository at this point in the history
  5. Regenerate code to fix test_cgcheck failures

    - Add 'await' keyword to generate_ops.py kwlist
    - Add CancelledError factory-only exception to generate_exceptions.py
    - Regenerate TokenKind, Tokenizer, PythonWalker, PythonNameBinder
    - Fix CancelledError placement in ToPythonHelper to match generator order
    mikasoukhov committed Feb 24, 2026
    Configuration menu
    Copy the full SHA
    04b48e5 View commit details
    Browse the repository at this point in the history
  6. Fix test_pep352 and test_attrinjector regressions

    Add CancelledError to exception_hierarchy.txt so test_pep352
    test_inheritance accounts for the new builtin exception.
    
    Isolate test_async in a separate process to prevent it from
    loading IronPythonTest assembly which causes duplicate
    SpecialName GetBoundMember on XmlElement in test_attrinjector.
    mikasoukhov committed Feb 24, 2026
    Configuration menu
    Copy the full SHA
    5a09b4d View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2026

  1. Fix AwaitResolver for real async Task<T> subtypes

    The runtime type of async Task<T> is often a subclass like
    AsyncStateMachineBox<TResult, TStateMachine>, not Task<T> itself.
    Walk up the BaseType chain to find Task<T> so that await on real
    async .NET operations (e.g. HttpClient.GetStringAsync) correctly
    returns the result instead of None.
    mikasoukhov committed Feb 25, 2026
    Configuration menu
    Copy the full SHA
    f47c54d View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2026

  1. Non-blocking await for .NET Task in Python async coroutines

    Instead of blocking the thread with GetAwaiter().GetResult(),
    TaskAwaitable.__next__ now yields the Task back to the runner
    when it's not yet completed. The runner can then wait on the Task
    and resume the coroutine, enabling true concurrency between coroutines.
    mikasoukhov committed Feb 27, 2026
    Configuration menu
    Copy the full SHA
    3998f8a View commit details
    Browse the repository at this point in the history
  2. Add PythonCoroutine.AsTask() and GetAwaiter() for C# async interop

    Allows C# code to directly await IronPython coroutines:
      object result = await coroutine;
    mikasoukhov committed Feb 27, 2026
    Configuration menu
    Copy the full SHA
    dfcace5 View commit details
    Browse the repository at this point in the history
Loading