Repository navigation
Conversation
Tier-2 erasure per .agents/plans/2026-10-18-tiered-lowering-and-typefacts.md: - 'abc' joins the erased modules; ABC/ABCMeta/Protocol bases and metaclass=ABCMeta drop out of _collect_class, so the classes lower as plain classes. - @abstractmethod/@overload decorators erase through Name or attribute spellings; only the final undecorated @overload implementation lowers, and declaration-only Protocol/abstract bodies (...) are skipped instead of emitted. - Classes collected off a Protocol base are flagged 'protocol'; a Protocol-annotated parameter accepts any subclass of the erased marker class (no structural check, no runtime enforcement). - isinstance/issubclass on a Protocol and @runtime_checkable stay fenced; divergences documented in docs/refused-features.md. - tests/test_t2_abc_protocol.py covers the oracle diffs and the fences that stay; pyjwt fixture pin drops 103 -> 101 fences now that its abc imports erase.
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Deploying pyscriptc with
|
| Latest commit: |
32d5dd5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e7ee7b6a.pyscriptc.pages.dev |
| Branch Preview URL: | https://work-t2-abc-protocol-erasure.pyscriptc.pages.dev |
This branch has not been deployed
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.
Summary
Tier-2 erasure per
.agents/plans/2026-10-18-tiered-lowering-and-typefacts.md— static-typing constructs vanish before emission; no CPython runtime enforcement.abcjoins_ERASED_MODULES(withtyping), soABC/ABCMeta/Protocol/abstractmethodresolve throughtype_aliasesor an erased_resolve_moduletriple for bothfrom abc import Xandabc.Xspellings._collect_classskips_ERASED_BASESbases andmetaclass=ABCMetakeywords; classes off aProtocolbase getinfo["protocol"]and declaration-only members (.../pass/docstring) are skipped rather than emitted._method_decorator/_accept_module_functionfilter_ERASED_DECORATORS(abstractmethod,overload) first:@property @abstractmethodstill resolves to a property, and only the final undecorated@overloadimplementation lowers (resolution stays the checker's job)._expect/_fill_argsrelaxtypes_equalvia_accepts_protocol: aProtocol-annotated slot accepts any subclass of the erased marker class — object-ish, not structural; unrelated classes/scalars still fail.isinstance/issubclasson a Protocol (new PS2001 message),@runtime_checkable(existing PS1201). Divergences (e.g.ABC()instantiates) documented indocs/refused-features.md.tests/test_t2_abc_protocol.py(6 oracle-diff tests, all pass); pyjwt fixture pin drops 103 → 101 since itsfrom abc import ABC, abstractmethodnow erases.Census (frozen
tests/test_census_self.pyuntouched): modules 27, fences 1028 (+5 vs master 1023 — new helpers add self-parse fences), lines 20479. Full suite: 9 failures, 7 verified identical on clean master (plantedexcept X, Y:syntax errors inbenchmarks/compat2/cache.py/examples/gates_probe.pyalso break 8-file collection there); remaining two are the frozen census pin and the pyjwt pin updated here.ruff check/ruff formatclean on changed files.Link to Devin session: https://app.devin.ai/sessions/600cde62c8144a618bf49c577003129d
Open in Devin Desktop: https://app.devin.ai/desktop/session/600cde62c8144a618bf49c577003129d?variant=devin
Requested by: @espetro