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: UltimaTools/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.
  • 6 commits
  • 18 files changed
  • 1 contributor

Commits on Jun 28, 2026

  1. Add first-class CancellationToken support with Roslyn-mirroring Pytho…

    …nScript API
    
    - Add CancellationToken property to ModuleContext/CodeContext (auto-propagates to nested scopes)
    - Add CancellationCheck helper (AggressiveInlining, calls ThrowIfCancellationRequested)
    - Add InjectCancellationChecks compiler flag (default false, zero overhead for existing callers)
    - Inject cancellation probes at loop back-edges (WhileStatement, ForStatement, TransformFor) and line boundaries (SuiteStatement)
    - Add public PythonScript / PythonScript<T> / ScriptState<T> / ScriptVariable / PythonScriptOptions API
    - Add internal PythonScriptRunner bridge: engine/scope creation, preamble, token attachment, Task.Run offload
    - Add README documentation with code samples
    - Add 17 tests validating cancellation (infinite loops, nested functions, class bodies, comprehensions, generators, line boundaries, pre-compiled) across net462, net8.0, net10.0
    credzba committed Jun 28, 2026
    Configuration menu
    Copy the full SHA
    8930df2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    75a40a7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c45a53f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bae25a4 View commit details
    Browse the repository at this point in the history
  5. Normalize cancellation exception to OperationCanceledException base type

    On slower CI runners (Linux), the CancellationToken can cancel Task.Run
    before the delegate starts, producing TaskCanceledException instead of
    OperationCanceledException. NUnit's Assert.ThrowsAsync uses exact type
    matching, so the test CancellationWorksInsideCalledFunction would fail.
    Now both paths always throw the exact base type.
    credzba committed Jun 28, 2026
    Configuration menu
    Copy the full SHA
    98bf03b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8754bd2 View commit details
    Browse the repository at this point in the history
Loading