Repository navigation
Prove AbstractHooksMeta MRO abstracts and installed @classmethod constructors - #639
Merged
Merged
Conversation
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
Two soundness-preserving proof upgrades driven by live Toad
duplicate_classbench failures (f8000efb5band43705cb1e3):AbstractHooksMetaMRO-wide abstract collection (class_creation_store.py,refactors/class_creation.py,refactors/class_overlap.py):_walk_metaclasses(roots)shared byClassCreationProof.metaclass_ancestryand newClassCreationProof.collects_mro_abstract_methods().abc.ABCMeta(which only readsbase.__abstractmethods__),metaclass_registry.abstract_hooks.AbstractHooksMeta.__init__scansvars(base)acrosscls.__mro__for__isabstractmethod__. When a composer's metaclass chain includesAbstractHooksMetawithoutABCMeta,ComposedAncestry.creation()keeps abstract methods moved onto plain-typecomposed bases as preserved;ABCMetacomposers remain strict and still refuse plain-typeabstract bases.f8000efb5b(PickerPanecomposingSubmitsContract): clears`SubmitsContract` would take abstract ['submit']and reaches the realtextual/message_pump.py:163(_dispatch_declarations) proof boundary.Installed classes and
@classmethodconstructors inRestatedDeclarations.require_no_owner_bound_values(refactors/class_overlap.py):_constructed_class_symbol()resolving both direct scanned/installed class calls (verdicts.ancestorviaimported_name_for_node) and@classmethodconstructors whose own-scope returns all constructcls(...)without rebindingcls(e.g.textual.css.scalar.Scalar.from_number)._require_class_has_no_set_name()closing the MRO across scanned classes, installed classes, and known__set_name__-free bases (typing.NamedTuple, builtins), checkingbase_references_are_complete,class_decorators_are_promotion_safe, and__set_name__.43705cb1e3(SessionTitles/SessionLabelsharingScalar.from_number(1)): clears the bogus owner-bound value refusal and reaches the realtextual/dom.py:1016creation proof.Verification
tests/test_installed_creation_hooks.py: 18/18 passed (including new end-to-end apply+run tests forAbstractHooksMetavsABCMetaand installedNamedTuple@classmethodvs__set_name__).tests/test_class_overlap_codemod.py: 58/58 passed.tests/test_repository_architecture.py: 7/7 passed.REL_IMPORTS=0.