Repository navigation
bench(library): pilot 2, iniconfig from PyPI with its fence profile and two lowering slices (#417) - #1372
Merged
Conversation
Deploying pyscriptc with
|
| Latest commit: |
a22559a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5027c99e.pyscriptc.pages.dev |
| Branch Preview URL: | https://work-417-pilot2.pyscriptc.pages.dev |
…le returns (#417) Two refusals on the measured iniconfig 2.3.1 profile (pilot 2): - X: Final = value (bare PEP 591 qualifier) lowers as X = value in module and function scopes; the typing/typing_extensions spellings only. - A tuple display lowers each element against the expected tuple's field type, so return None, x under -> tuple[str | None, str | None] boxes the None arm into the field optional. The self-census repin follows: the tuple change lowers 49 more fences of the compiler's own source (16 modules down, pyscriptc.lower up 1 for the new helper).
A class with no decorator, base or keyword reads FROZEN: Final = 0 as a class constant, so the qualifier erasure covers it (tomli's Flags). A dataclass or NamedTuple body keeps its annotation: there a bare Final is a field.
… a CPython diff (#417) iniconfig_pilot.py is a PEP 723 program naming iniconfig only, pinned by pylock.iniconfig_pilot.toml (2.3.1). pilot2.py resolves it through the deps lane, records the reachable fence profile from the plain compile and, once the profile is empty, diffs the binary against CPython. tests/test_deps_receipt.py gains the network-gated pair: the profile stays under the measured ceiling (27; master 69b5415 reads 33), and the full CPython match is a strict xfail that turns into a failure when the profile reaches zero.
…lices (#417) Records the measured iniconfig/tomli profiles before and after the #417 slices, the five blocker slices left on the pilot's reachable path (#1368, #448, #1369, #1370, #446) and the corrected Final row of the annotation table. The pilot drops IniConfig.get: its multi-arm optional return is a gap of its own the library path does not need.
…slices Corpus fences 3944 to 3904; iniconfig loses its type-mismatch row.
…nto v0.11.0 wave-3
espetro
force-pushed
the
work/417-pilot2
branch
from
November 24, 2026 15:13
2bfca3c to
a22559a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #417. Not
Closes: the pilot does not yet compile end to end. Five blocker slices remain, each tracked (below), and the full CPython match is a strict xfail that flips when they land.What this does
purelane with no transitive dependencies.benchmarks/library/iniconfig_pilot.py(PEP 723,dependencies = ["iniconfig"]), pinned bypylock.iniconfig_pilot.toml. It parses a literal pytest-style ini document through the documented API:ini["s"]["k"], a continuation value,lineof,in, and theParseErrortext.benchmarks/library/pilot2.pyresolves through the deps lane, records the reachable fence profile from the plain compile and, once that profile is empty, diffs the binary against CPython.tests/test_deps_receipt.pygains a network-gated pair:69b54156reads 33 and fails it);iniconfig._versionis pruned.X: Final = valuetakes the value's type (module, function and plain-class scope; a dataclass body still fences);return None, xunder-> tuple[str | None, str | None]boxes into the optional.probes/differential/bare_final_optional_tuple.pybyte-matches CPython 3.14.Fence profile, before / after
69b54156)data/compat/compat.json)pyscriptc.lower+1)Remaining blockers on the pilot path
_sources), which gateIniConfig.__init__: lower: tuple dict keys (dict[tuple[str, str | None], int]) for setitem, get and in #1368ParseError): O4c: exceptions: run user __init__ on raise and carry custom fields in the payload (fixes divergence 9) #448 (evidence comment added)NamedTuplebase (ParsedLine): lower: typing.NamedTuple class base as a tuple record (construct, field read, unpack) #1369None-initialised locals: lower: a None-initialised local widens to T | None from its later typed bindings #1370 (needs an inference-rule decision)__getitem__/__contains__dispatch: O3b: protocol dispatch: container, iter and with protocols (getitem/setitem/len, __iter__/__next__, __enter__/__exit__ beyond the fixed signature) #446 (evidence comment added)The pilot leaves out
IniConfig.get, whose_D | _T | str | Nonereturn is a separate PS1102 gap.Verification
-n auto -m "not linux_container" --ignore=tests/compat2): 4032 passed. Its only 3 failures were stale generated data, regenerated in the last commit; those tests now pass (45 passed).tests/compat2: 139 passed, 1 failed:test_macos_arm64_reference_is_a_separate_slot. It records a perf baseline on Darwin arm64 hosts only and does not touch lowering. CI (Linux) takes the refusal branch.PYSC_NETWORK_TESTS=1 pytest tests/test_deps_receipt.py -k iniconfig: ceiling passes, match xfails on27 == 0.Docs
Finalrow of the annotation table indocs/guide/python-subset.mdis corrected. AGENTS.md namesdocs/guide/typing.mdfor that table, but the file does not exist..agents/docs/benchmarks/library-receipt.md.Owned files
src/pyscriptc/lower/__init__.py(_erase_bare_final,_desugar),src/pyscriptc/lower/_annotations.py(_tuple_expr),src/pyscriptc/lower/_expr.py(one call site),benchmarks/library/{iniconfig_pilot.py,pylock.iniconfig_pilot.toml,pilot2.py,README.md},tests/test_pilot2_slices.py,tests/test_deps_receipt.py,probes/differential/bare_final_optional_tuple.py,.agents/docs/benchmarks/library-receipt.md,.agents/docs/python-style.md,docs/guide/python-subset.md. Regenerated, never hand-merged:tests/census_pins/*(17 shards),data/compat/support.json,data/compat/compat.json.🤖 Generated with Claude Code