Skip to content

Releases: astral-experiments/serc

0.1.11

Choose a tag to compare

@github-actions github-actions released this 03 Nov 02:16
1c1db6e

Release Notes

Released on 2026-11-03.

Other changes

  • Publish standalone archives and installers to GitHub Releases with Serc's
    repository token (#2378,
    #2378).

Install serc 0.1.11

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/serc/releases/download/0.1.11/serc-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/serc/releases/download/0.1.11/serc-installer.ps1 | iex"

Download serc 0.1.11

File Platform Checksum
serc-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum
serc-x86_64-apple-darwin.tar.gz Intel macOS checksum
serc-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
serc-i686-pc-windows-msvc.zip x86 Windows checksum
serc-x86_64-pc-windows-msvc.zip x64 Windows checksum
serc-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum
serc-i686-unknown-linux-gnu.tar.gz x86 Linux checksum
serc-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum
serc-riscv64gc-unknown-linux-gnu.tar.gz RISCV Linux checksum
serc-s390x-unknown-linux-gnu.tar.gz S390x Linux checksum
serc-x86_64-unknown-linux-gnu.tar.gz x64 Linux checksum
serc-armv7-unknown-linux-gnueabihf.tar.gz ARMv7 Linux checksum
serc-aarch64-unknown-linux-musl.tar.gz ARM64 MUSL Linux checksum
serc-i686-unknown-linux-musl.tar.gz x86 MUSL Linux checksum
serc-riscv64gc-unknown-linux-musl.tar.gz RISCV MUSL Linux checksum
serc-x86_64-unknown-linux-musl.tar.gz x64 MUSL Linux checksum
serc-arm-unknown-linux-musleabihf.tar.gz ARMv6 MUSL Linux (Hardfloat) checksum
serc-armv7-unknown-linux-musleabihf.tar.gz ARMv7 MUSL Linux checksum

Verifying GitHub Artifact Attestations

The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:

gh attestation verify <file-path of downloaded artifact> --repo astral-experiments/serc

You can also download the attestation from GitHub and verify against that directly:

gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>

0.1.9

Choose a tag to compare

@astral-releases-bot astral-releases-bot released this 28 Oct 17:46
Immutable release. Only release title and notes can be modified.
e98b14f

Release Notes

Released on 2026-10-28.

Serc 0.1.9 expands source-encoding support and improves byte-for-byte
compatibility with CPython.

Enhancements

  • Compile source files encoded with Big5 or Windows-1252 using
    CPython-compatible codec aliases and strict decoding behavior
    (#2266; #2266)

Bug fixes

  • Produce CPython-compatible bytecode for additional real-world package sources
    (#2266; #2266)
  • Preserve CPython-compatible source positions and exception-table coverage when
    optimization copies, threads, or fuses bytecode (#1718;
    #1718)
  • Restore byte-for-byte compatibility with CPython 3.14.5 across the pinned
    compatibility corpus at all optimization levels (#1365;
    #1365)
  • Reject identifiers whose Unicode normalization produces True, False, or
    None, matching CPython 3.13–3.15 while preserving Python 3.12 behavior
    (#1371; #1371)
  • Reject oversized starred assignment targets and named sequence captures with
    CPython-compatible diagnostics (#1370;
    #1370)
  • Match CPython bytecode for sequence patterns that combine captures with
    trailing wildcards (#1372;
    #1372)
  • Parse bare raise statements and uses of the match soft keyword after
    semicolons consistently with CPython (#2266;
    #2266)
  • Preserve exception-table coverage when yield from appears in an
    exception-handler type expression (#1376;
    #1376)
  • Emit CPython-compatible RESUME exception depth for explicit yield
    expressions in exception-handler type expressions and except* bodies
    (#1375; #1375)

Install serc 0.1.9

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/serc/releases/download/0.1.9/serc-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/serc/releases/download/0.1.9/serc-installer.ps1 | iex"

Download serc 0.1.9

File Platform Checksum
serc-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum
serc-x86_64-apple-darwin.tar.gz Intel macOS checksum
serc-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
serc-i686-pc-windows-msvc.zip x86 Windows checksum
serc-x86_64-pc-windows-msvc.zip x64 Windows checksum
serc-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum
serc-i686-unknown-linux-gnu.tar.gz x86 Linux checksum
serc-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum
serc-riscv64gc-unknown-linux-gnu.tar.gz RISCV Linux checksum
serc-s390x-unknown-linux-gnu.tar.gz S390x Linux checksum
serc-x86_64-unknown-linux-gnu.tar.gz x64 Linux checksum
serc-armv7-unknown-linux-gnueabihf.tar.gz ARMv7 Linux checksum
serc-aarch64-unknown-linux-musl.tar.gz ARM64 MUSL Linux checksum
serc-i686-unknown-linux-musl.tar.gz x86 MUSL Linux checksum
serc-riscv64gc-unknown-linux-musl.tar.gz RISCV MUSL Linux checksum
serc-x86_64-unknown-linux-musl.tar.gz x64 MUSL Linux checksum
serc-arm-unknown-linux-musleabihf.tar.gz ARMv6 MUSL Linux (Hardfloat) checksum
serc-armv7-unknown-linux-musleabihf.tar.gz ARMv7 MUSL Linux checksum

Verifying GitHub Artifact Attestations

The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:

gh attestation verify <file-path of downloaded artifact> --repo astral-sh/serc

You can also download the attestation from GitHub and verify against that directly:

gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>

0.1.8

Choose a tag to compare

@astral-releases-bot astral-releases-bot released this 20 Oct 18:28
Immutable release. Only release title and notes can be modified.
d5fa2ec

Release Notes

Released on 2026-10-20.

Serc 0.1.8 speeds up fully cached compilation and validates bytecode
destinations before writing.

Bug fixes

  • Reject symlinks and other non-regular .pyc destinations before writing,
    including with --force (#1357;
    #1357)

Performance

  • Speed up fully cached compilation batches by skipping output grouping and
    compilation scheduling when every requested .pyc file is current
    (#1357; #1357)

Install serc 0.1.8

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/serc/releases/download/0.1.8/serc-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/serc/releases/download/0.1.8/serc-installer.ps1 | iex"

Download serc 0.1.8

File Platform Checksum
serc-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum
serc-x86_64-apple-darwin.tar.gz Intel macOS checksum
serc-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
serc-i686-pc-windows-msvc.zip x86 Windows checksum
serc-x86_64-pc-windows-msvc.zip x64 Windows checksum
serc-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum
serc-i686-unknown-linux-gnu.tar.gz x86 Linux checksum
serc-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum
serc-riscv64gc-unknown-linux-gnu.tar.gz RISCV Linux checksum
serc-s390x-unknown-linux-gnu.tar.gz S390x Linux checksum
serc-x86_64-unknown-linux-gnu.tar.gz x64 Linux checksum
serc-armv7-unknown-linux-gnueabihf.tar.gz ARMv7 Linux checksum
serc-aarch64-unknown-linux-musl.tar.gz ARM64 MUSL Linux checksum
serc-i686-unknown-linux-musl.tar.gz x86 MUSL Linux checksum
serc-riscv64gc-unknown-linux-musl.tar.gz RISCV MUSL Linux checksum
serc-x86_64-unknown-linux-musl.tar.gz x64 MUSL Linux checksum
serc-arm-unknown-linux-musleabihf.tar.gz ARMv6 MUSL Linux (Hardfloat) checksum
serc-armv7-unknown-linux-musleabihf.tar.gz ARMv7 MUSL Linux checksum

Verifying GitHub Artifact Attestations

The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:

gh attestation verify <file-path of downloaded artifact> --repo astral-sh/serc

You can also download the attestation from GitHub and verify against that directly:

gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>

0.1.7

Choose a tag to compare

@astral-releases-bot astral-releases-bot released this 20 Oct 12:31
Immutable release. Only release title and notes can be modified.
64dbbc2

Release Notes

Released on 2026-10-20.

Serc 0.1.7 improves batch compilation and avoids rebuilding current bytecode
caches.

Enhancements

  • Compile explicit source-file lists with --files-from, using
    newline-delimited paths by default or NUL-delimited paths with --null,
    without scanning directories (#1355;
    #1355)
  • Skip current .pyc files by default when their target format, invalidation
    mode, and source fingerprint match; use --force to rebuild them, while
    --check always compiles without writing bytecode (#1355;
    #1355)
  • Report compiled and skipped file counts with --output-format json
    (#1355; #1355)

Install serc 0.1.7

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/serc/releases/download/0.1.7/serc-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/serc/releases/download/0.1.7/serc-installer.ps1 | iex"

Download serc 0.1.7

File Platform Checksum
serc-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum
serc-x86_64-apple-darwin.tar.gz Intel macOS checksum
serc-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
serc-i686-pc-windows-msvc.zip x86 Windows checksum
serc-x86_64-pc-windows-msvc.zip x64 Windows checksum
serc-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum
serc-i686-unknown-linux-gnu.tar.gz x86 Linux checksum
serc-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum
serc-riscv64gc-unknown-linux-gnu.tar.gz RISCV Linux checksum
serc-s390x-unknown-linux-gnu.tar.gz S390x Linux checksum
serc-x86_64-unknown-linux-gnu.tar.gz x64 Linux checksum
serc-armv7-unknown-linux-gnueabihf.tar.gz ARMv7 Linux checksum
serc-aarch64-unknown-linux-musl.tar.gz ARM64 MUSL Linux checksum
serc-i686-unknown-linux-musl.tar.gz x86 MUSL Linux checksum
serc-riscv64gc-unknown-linux-musl.tar.gz RISCV MUSL Linux checksum
serc-x86_64-unknown-linux-musl.tar.gz x64 MUSL Linux checksum
serc-arm-unknown-linux-musleabihf.tar.gz ARMv6 MUSL Linux (Hardfloat) checksum
serc-armv7-unknown-linux-musleabihf.tar.gz ARMv7 MUSL Linux checksum

Verifying GitHub Artifact Attestations

The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:

gh attestation verify <file-path of downloaded artifact> --repo astral-sh/serc

You can also download the attestation from GitHub and verify against that directly:

gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>

0.1.6

Choose a tag to compare

@astral-releases-bot astral-releases-bot released this 19 Oct 22:26
Immutable release. Only release title and notes can be modified.
3f09005

Release Notes

Released on 2026-10-19.

Serc 0.1.6 adds standalone release binaries, improves CPython compatibility, and
reduces compilation overhead.

Enhancements

  • Download standalone Serc binaries for uv’s 18 release targets from checksummed
    archives or shell and PowerShell installers, with provenance attestations and
    a release mirror (#1352;
    #1352)

Bug fixes

  • Preserve CPython-compatible control-flow joins and exception ownership when
    optimization removes assertions in conditionals, nested handlers, and context
    managers (#1304; #1304)

Performance

  • Improve release-wheel and archive performance with profile-guided optimization
    on macOS ARM64, Windows x64, and GNU/Linux x64 and ARM64 (#1352;
    #1352)
  • Speed up -O and -OO compilation by reusing function scope analysis when
    assertion removal cannot change bindings or local ordering
    (#1305; #1305)
    (#1321; #1321)
  • Reduce optimized-compilation scope analysis by retaining original scope state
    and skipping collection when no comprehension locals need reconciliation
    (#1309; #1309)
    (#1333; #1333)
  • Speed up folding large string frozensets and reusing repeated frozenset
    constants (#1287; #1287)
    (#1290; #1290)
  • Speed up integer-set folding by avoiding temporary numeric representations,
    including for large integers (#1292;
    #1292) (#1297;
    #1297)
  • Speed up tuple-heavy compilation by indexing tuple-folding witnesses during
    constant remapping and operand resolution (#1332;
    #1332) (#1334;
    #1334)
  • Reduce Python 3.12 cleanup overhead by skipping unused setup indexes and
    walking legacy NOP instructions directly (#1293;
    #1293) (#1294;
    #1294)
  • Reduce legacy cleanup overhead by indexing instructions by block and avoiding
    copies when a pass makes no changes (#1301;
    #1301) (#1339;
    #1339)
  • Speed up source validation on Python 3.12 and 3.13 by bounding prefixed-string
    scans and reusing parser tokens (#1299;
    #1299) (#1306;
    #1306)
  • Reduce optimized-compilation time and memory use by rewriting the parsed
    syntax tree in place (#1310;
    #1310)
  • Avoid extra depth and cleanup passes for optimized expression trees
    (#1314; #1314)
    (#1320; #1320)
  • Skip repeated constant-folding work for binary expressions and chains that
    require runtime evaluation (#1341;
    #1341) (#1343;
    #1343)
  • Skip inapplicable sequence and tuple-folding passes on Python 3.13 and 3.15
    (#1307; #1307)
    (#1340; #1340)
  • Speed up Python 3.15 assembly by reusing compact-layout and borrowing fast
    paths and caching opcode encodings (#1311;
    #1311) (#1336;
    #1336)
  • Reduce assembler ownership and local-simulation overhead by avoiding
    unnecessary scans and reusing dense borrowing boundaries (#1312;
    #1312) (#1319;
    #1319)
  • Skip redundant assembler certificate checks during NOP removal and unchanged
    source-location propagation (#1323;
    #1323) (#1324;
    #1324)
  • Speed up exception-owner analysis by indexing range labels, rejecting
    irrelevant markers before provenance scans, and decoding tail operands once
    (#1330; #1330)
    (#1331; #1331)
    (#1337; #1337)
  • Reduce jump-layout overhead by borrowing inline fixups and reusing
    already-resolved operands (#1313;
    #1313) (#1327;
    #1327)
  • Reduce forward-jump cleanup overhead by skipping first-pass lookups and
    deferring instruction copies (#1335;
    #1335) (#1342;
    #1342)
  • Reduce symbol and scope-name analysis allocations by reusing parsed
    identifiers, streamlining collection, and inlining common mangling checks
    (#1317; #1317)
    (#1326; #1326)
    (#1329; #1329)
  • Reduce source-location lookup overhead for calls, simple assignments, and
    definitions (#1318; #1318)
    (#1322; #1322)
  • Speed up source validation with a fast prefilter for oversized decimal
    literals (#1325; #1325)
  • Skip compiler setup for empty unreachable tails after terminating statements
    (#1328; #1328)
  • Reduce assembler memory use with compact storage for preserved jump targets
    (#1316; #1316)
  • Reduce multi-version assembly overhead by translating operands only when their
    encoding depends on the target Python version (#1295;
    #1295)

Other changes

  • Disable explicit transparent huge-page requests in Serc’s bundled allocator
    (#1315; #1315)

Install serc 0.1.6

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/serc/releases/download/0.1.6/serc-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/serc/releases/download/0.1.6/serc-installer.ps1 | iex"

Download serc 0.1.6

File Platform Checksum
serc-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum
serc-x86_64-apple-darwin.tar.gz Intel macOS checksum
serc-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
serc-i686-pc-windows-msvc.zip x86 Windows checksum
serc-x86_64-pc-windows-msvc.zip x64 Windows checksum
serc-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum
serc-i686-unknown-linux-gnu.tar.gz x86 Linux checksum
serc-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum
serc-riscv64gc-unknown-linux-gnu.tar.gz RISCV Linux checksum
serc-s390x-unknown-linux-gnu.tar.gz S390x Linux [checksum](https://releases.astral.sh/github/serc/releases/download/0.1.6/serc-s390x-...
Read more

0.1.5

Choose a tag to compare

@astral-releases-bot astral-releases-bot released this 14 Oct 16:29
Immutable release. Only release title and notes can be modified.
e5a4571

Released on 2026-10-14.

Serc 0.1.5 improves compilation performance and reduces memory use when
compiling for Python 3.12.

Performance

  • Speed up -O and -OO compilation when the syntax tree needs no changes
    (#1275; #1275)
  • Speed up compilation of functions with many sequential try/except blocks
    on Python 3.12 (#1277;
    #1277)
  • Speed up compilation of mapping patterns with many captures on Python 3.14 and
    3.15 (#1284; #1284)
  • Speed up compilation of functions with many async context managers
    (#1281; #1281)
  • Reduce source-validation overhead when targeting Python 3.12 and 3.13
    (#1279; #1279)
  • Reduce memory use when compiling for Python 3.12 (#1280;
    #1280)
  • Reduce code-object construction and copying overhead (#1262;
    #1262) (#1263;
    #1263) (#1265;
    #1265)
  • Reduce scope-analysis and closure-lowering overhead (#1260;
    #1260) (#1261;
    #1261)
  • Reduce allocations during control-flow analysis (#1273;
    #1273)
  • Reduce assembler overhead for jumps, source locations, and instruction
    processing (#1268; #1268)
    (#1269; #1269)
    (#1266; #1266)
    (#1267; #1267)
    (#1270; #1270)
    (#1258; #1258)
  • Reduce marshal serialization work (#1264;
    #1264)
  • Reduce constant-folding overhead (#1272;
    #1272)

0.1.4

Choose a tag to compare

@astral-releases-bot astral-releases-bot released this 12 Oct 16:01
Immutable release. Only release title and notes can be modified.
7b196a9

Released on 2026-10-12.

Serc 0.1.4 reduces compilation, assembly, and serialization overhead.

Performance

  • Reduce compilation memory use by deferring full provenance allocation for
    linear scopes (#1252;
    #1252)
  • Speed up marshal serialization by indexing the occurrence stream directly
    (#1242; #1242)
  • Reduce name and metadata allocations by reusing interned names and the
    compiler’s name index (#1231;
    #1231) (#1235;
    #1235)
  • Reduce name-cache initialization, lookup, and memory overhead
    (#1234; #1234)
    (#1241; #1241)
  • Speed up assembler graph processing by indexing fusion-owner boundaries and
    avoiding unnecessary cold-block and reversed-store scans (#1236;
    #1236) (#1253;
    #1253) (#1255;
    #1255)
  • Reduce swap optimization work by indexing instructions from the first swap
    (#1250; #1250)
  • Reduce compiler setup overhead by initializing state directly in its final
    heap allocation (#1243;
    #1243)
  • Speed up source-location and scope-exit lookups (#1251;
    #1251) (#1256;
    #1256)
  • Skip long-decimal pre-scanning for source files too short to exceed the
    parsing limit (#1257;
    #1257)
  • Reduce small-code encoding overhead by avoiding instruction copies
    (#1254; #1254)

0.1.3

Choose a tag to compare

@astral-releases-bot astral-releases-bot released this 11 Oct 15:00
Immutable release. Only release title and notes can be modified.
65357f7

Released on 2026-10-11.

Serc 0.1.3 expands CPython bytecode compatibility, especially for Python 3.14
optimized control flow, exception cleanup, and source locations.

Bug fixes

Read more

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

0.1.1

Choose a tag to compare

@astral-releases-bot astral-releases-bot released this 29 Sep 16:17
Immutable release. Only release title and notes can be modified.
9e938ec

Released on 2026-09-29.

Serc 0.1.1 adds Python optimization modes and hash-based bytecode caches,
improves compilation performance, and expands compatibility with CPython.

Enhancements

  • Compile with Python’s -O and -OO optimization modes through CLI flags or
    CompileOptions (#841;
    #841)
  • Generate checked or unchecked hash-based bytecode caches with
    --invalidation-mode or CompiledModule::to_hash_pyc (#840;
    #840)
  • Opt into caller-selected decimal literal parsing limits through new text,
    byte, and path compilation APIs (#911;
    #911)
  • Model the caller’s integer-to-string limit when formatting duplicate
    mapping-key diagnostics through opt-in compilation APIs (#887;
    #887)
  • Reproduce floating-point constant folding from documented CPython 3.14.5 GCC
    and Clang builds on supported GNU/Linux x86-64 hosts by selecting a native
    build profile (#824; #824)

Bug fixes

  • Produce CPython-compatible control flow, source locations, exception tables,
    and constant sharing under -O and -OO (#912;
    #912)
  • Preserve requested .opt-N.pyc cache suffixes for repeated optimization flags
    while applying -OO semantics (#912;
    #912)
  • Compile nested continue statements in finally suites without negative
    stack-depth errors or incorrect exception restoration (#825;
    #825)
  • Compile deeply nested expressions and postponed annotations without
    overflowing the compiler stack (#827;
    #827)
  • Honor selected native build profiles throughout nested constant folding
    (#827; #827)
  • Keep enclosing cleanup and exception handlers active when tracing raises at a
    nested no-op finally suite (#900;
    #900) (#908;
    #908)
  • Convert StopIteration raised by tracing in nested generator finalizers into
    RuntimeError instead of silently terminating the generator
    (#903; #903)
  • Resolve private type-parameter names and their mangled aliases to the same
    binding in generic class headers (#828;
    #828)
  • Preserve marshal object identity for retained native startup names on Python
    3.14 (#830; #830)
  • Remove redundant NOP instructions before module annotations after literal
    and negated conditions on Python 3.14 and 3.15 (#894;
    #894) (#906;
    #906)
  • Match CPython opcode ordering when breaking from an exceptional finally
    suite into nested handler cleanup (#829;
    #829)
  • Preserve async-comprehension assertion exits in terminal conditionals on
    Python 3.12 (#889; #889)
  • Match CPython’s exception-table coverage for markers in nested finalizers
    after a handler returns (#904;
    #904)
  • Match CPython bytecode and exception-table ownership after branching try
    bodies enter nested finalizers (#909;
    #909)
  • Match CPython 3.12 source locations for successful assertions at the end of
    finally suites (#907;
    #907)
  • Reject lambdas and comprehensions in Python 3.12 generic headers when their
    annotation scopes can see an enclosing class namespace (#831;
    #831)
  • Reject repeated explicit keyword arguments in calls, including unreachable
    code (#845; #845)
  • Reject invalid uses of __debug__ in attributes, call and class keywords, and
    class patterns according to the target Python version (#847;
    #847)
  • Reject commas immediately following bare yield expressions while continuing
    to accept parenthesized yields and yield tuples (#846;
    #846)
  • Reject Python sources with more than 99 active indentation levels
    (#834; #834)
  • Enforce CPython’s default 4,300-digit limit for decimal integer literals
    (#835; #835)
  • Reject parameter specification and variadic type-parameter defaults when
    targeting Python 3.12 (#869;
    #869) (#870;
    #870)
  • Include the repeated type-parameter name in duplicate-name diagnostics
    (#850; #850)
  • Match CPython diagnostics for unknown __future__ features
    (#858; #858)
  • Match CPython diagnostics for misplaced __future__ imports
    (#860; #860)
  • Prioritize misplaced __future__ imports over unknown features in the same
    statement (#865; #865)
  • Match CPython diagnostics and source ranges for duplicate mapping-pattern keys
    (#857; #857)
  • Reject large integer mapping-pattern keys that compare equal to floating-point
    or complex keys (#861;
    #861)
  • Preserve lone surrogates when validating and folding mapping-pattern keys
    (#877; #877)
  • Match CPython diagnostics for assignment expressions targeting attributes
    (#871; #871)
  • Match CPython diagnostics for unparenthesized tuples after yield from
    (#872; #872)
  • Preserve type-alias default diagnostics when later syntax errors are also
    present (#867; #867)
  • Report the appropriate comprehension-specific error for yield and
    yield from expressions inside comprehensions (#879;
    #879)
  • Report direct dictionary-comprehension value yield errors before
    corresponding key errors (#880;
    #880)
  • Report nested comprehension yield errors in operand order
    (#884; #884)
  • Prioritize comprehension yield errors over earlier bare starred expressions
    (#885; #885)
  • Prioritize supported comprehension yield errors over async-generator
    value-return errors (#895;
    #895)
  • Match CPython diagnostics for await inside synchronous functions and lambdas
    (#896; #896)
  • Resolve invalid global and nonlocal declarations before reporting
    mapping-pattern errors (#881;
    #881)

Performance

  • Reduce compilation overhead across scope analysis, source handling, assembler
    passes, and marshal serialization (#848;
    #848)