Skip to content

0.1.2

Choose a tag to compare

@astral-releases-bot astral-releases-bot released this 05 Oct 02:46
Immutable release. Only release title and notes can be modified.
3b335bb

Released on 2026-10-05.

Serc 0.1.2 improves CPython bytecode compatibility and speeds up compilation and
serialization.

Bug fixes

  • Preserve shared returns and cleanup exits when constant-true assertions are
    folded on Python 3.12 (#975;
    #975)
  • Match CPython control flow when optimization removes nested assertions or
    branch prefixes (#989;
    #989) (#991;
    #991) (#998;
    #998) (#1005;
    #1005) (#1027;
    #1027)
  • Match CPython control flow in coroutines and nested iterators after assertion
    removal (#995; #995)
    (#1016; #1016)
  • Preserve implicit returns after optimization erases terminal loop assertions
    (#1012; #1012)
  • Match CPython loop bytecode when optimization removes else assertions after
    assignments, comprehensions, and inner loops (#1004;
    #1004) (#1006;
    #1006) (#1007;
    #1007) (#1008;
    #1008)
  • Match CPython loop bytecode after assertion removal inside try blocks and
    context managers (#993;
    #993) (#999;
    #999) (#1019;
    #1019) (#1020;
    #1020)
  • Match CPython loop bytecode in coroutines and async loops after awaits and
    assertion removal (#994;
    #994) (#1002;
    #1002) (#1010;
    #1010) (#1011;
    #1011)
  • Match CPython cleanup ordering when break or continue exits through
    finally blocks (#977;
    #977) (#981;
    #981) (#1022;
    #1022)
  • Match CPython exception tables for returns and conditional cleanup in
    finally blocks (#982;
    #982) (#983;
    #983) (#984;
    #984)
  • Match CPython exception tables for returns and nested cleanup in async context
    managers (#985; #985)
  • Match CPython iterator cleanup when finally blocks call methods or local
    callables (#986; #986)
    (#992; #992)
  • Match CPython local-variable loads after conditional cleanup, try/else
    breaks, and exception-handler exits (#976;
    #976) (#1000;
    #1000) (#1003;
    #1003) (#1009;
    #1009)
  • Match CPython local-variable loads after conditional loops in finally blocks
    (#1001; #1001)
  • Match CPython exception tables for conditional tuple returns inside try
    blocks (#1015; #1015)
  • Match CPython bytecode and source locations for exception-handler cleanup and
    closure setup (#979; #979)
    (#980; #980)
  • Match CPython exception tables when break or return exits nested exception
    handlers and finally blocks (#1023;
    #1023) (#1024;
    #1024) (#1025;
    #1025) (#1026;
    #1026)
  • Match CPython cleanup for sequence patterns with multiple wildcards and match
    statements inside unnamed exception handlers (#1018;
    #1018) (#1021;
    #1021)
  • Keep later global references independent from temporary comprehension targets
    (#972; #972)
  • Calculate the correct stack size for later except* handlers containing
    calls, suspension, or nested cleanup on Python 3.14 and 3.15
    (#974; #974)
  • Compile deeply nested statement suites without overflowing small thread stacks
    (#971; #971)
  • Preserve the final operand’s source line in chained None comparisons on
    Python 3.12 and 3.13 (#973;
    #973)
  • Match CPython startup string interning and marshal identity on Linux for the
    documented native reference profile across Python 3.12 through 3.15
    (#978; #978)
  • Match CPython constant tables and bytecode when folding Boolean expressions
    and starred collection literals (#987;
    #987) (#988;
    #988)

Performance