Skip to content

feat(lower): N3 small-gaps batch - enum-as-int, enum subclass, bool fields, one-field tuples - #1329

Open
espetro wants to merge 2 commits into
masterfrom
work/imp1314
Open

espetro wants to merge 2 commits into
masterfrom
work/imp1314

Conversation

@espetro

@espetro espetro commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Closes #1314

@espetro espetro added this to the v0.11.0 milestone Nov 18, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Deploying pyscriptc with  Cloudflare Pages  Cloudflare Pages

Latest commit: 638c05f
Status: ✅  Deploy successful!
Preview URL: https://49f38585.pyscriptc.pages.dev
Branch Preview URL: https://work-imp1314.pyscriptc.pages.dev

View logs

Agent added 2 commits November 18, 2026 22:53
…ields, one-field tuples

The rank-3 batch of the library-blocks design note (issue #1314): four
PS2002/PS1001 fences turn into lowering.

- An IntEnum class annotates as int and its members take part in
  arithmetic. The `class C(int, Enum)` mixin spelling erases the int
  base only when an enum base rides along; a bare `class C(int)`
  keeps its fence.
- An enum body with no member is a base another enum extends (CPython
  allows exactly that shape); the subclass inherits the base's members
  and continues its auto() counter. An empty enum nothing extends and
  a base that already carries members keep the fence.
- A class field annotates bool; the struct slot lowers as i1.
- A tuple literal or annotation spells one field; the empty tuple
  still fences.

The differential probe probes/differential/enum_int_mixin.py
byte-compares the compiled surface against CPython. Divergence 52's
'cannot be a one-field tuple' reason is reworded: the batched subset
returns lists by its own definition now, not because the IR refuses
the shape.
…l-gaps batch

The N3 lowerings move five differential probes legitimately
(memoryview.shape/strides, functools.WRAPPER_UPDATES,
types.get_original_bases, venv.CORE_VENV_DEPS): regenerate the TIR_HASHES
baseline with the A/B discipline on Linux (runs A and B byte-identical),
touching only those five entries. The stdlib.sys.base_* entries fold the
host interpreter path and stay pinned at the CI values.

Rebuild data/compat/compat.json and data/compat/support.json over the
rebased tree so the docs-seams lane (test_compat_json, test_support_docs)
compares against current measurements: the new lowerings drop fenced
definitions and shift the blocking families the seams render.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(lower): small-gaps batch N3 (enum-as-int, bool fields, tuple arity, resumable try/with)

1 participant