Repository navigation
Description
This issue collects a speed analysis of ExtendedType (pyTooling.MetaClasses) compared to classic Python classes,
the improvements found, and the pull requests implementing them. Every class of a data model pays ExtendedType's cost
at import time, e.g. pyVHDLModel's 415 classes or pyEDAA.Reports' code coverage and unit testing models.
Summary
| Measure | Result |
|---|---|
Class creation vs. hand-written __slots__ |
7.5–9.7× on 3.14, 6.6–9.2× on 3.13. A medium class: 51.6 µs vs. 6.6 µs. |
| Instance creation | +40–60 ns per object on 3.14 only (1.1–1.5×), no difference on 3.13. Caused by CPython, not by ExtendedType. |
| Attribute, property and method access | 1.00×, identical to classic slotted classes. isinstance against an ExtendedType class: +30 ns. |
| Memory per instance | Identical to classic slotted classes. |
pyVHDLModel import time spent in ExtendedType |
69 %: 37 of 54 ms for 415 classes (3.14). type.__new__ itself is only 6 ms of it. |
| Measured gain of the exact pure-Python improvements | −17 to −19 % of ExtendedType's time on real models; −37 to −60 % per class with from __future__ import annotations. |
@readonly read |
255 ns vs. 33 ns for @property (3.14); about 66 ns with its overloads under TYPE_CHECKING. |
| Cython | No gain worth it, see below. |
Verified on dev (all exact improvements merged) |
pyVHDLModel −13 to −15 % of ExtendedType's time (3.14; −12 to −14 % on 3.13), pyEDAA.Reports CodeCoverage −15 to −17 %; postponed annotations −54 % per class; @readonly −78 %. See Verified on dev. |
ExtendedType's own Python code is about 85 % of its class creation time. Nearly every step is a full scan that runs
for every class, including classes not using the feature: the @expects method scan walks every dictionary of the MRO,
the abstract-method check walks every base's dictionary, and postponed annotations are eval'd one string at a time.
Method
-
pyTooling
dev@ 165db01, Python 3.14.7 and 3.13.5, Linux x86-64 (WSL2), Intel i9-11950H, pinned to one core. -
Variants generated from one specification per hierarchy, so they are equivalent:
- classic class without
__slots__, - classic class with hand-written
__slots__(mixins with__slots__ = ()), ExtendedTypewithslots=True(mixins withmixin=True).
Every class has annotated fields, an
__init__chain callingsuper().__init__()and setting all fields, methods and
properties. - classic class without
-
Class creation times only the metaclass call; class bodies are executed beforehand. Instances and access via
timeit, warmed up. Memory viatracemallocover 20 000 instances. -
7 interleaved rounds, 2 full runs per Python version, medians. Run-to-run difference: median 2.5 %, p90 < 8 %.
-
Don't compare the two interpreters with each other: 3.14 is a python.org build, 3.13 is Debian's package. This
3.14 is slower even forx = [](19.4 vs. 12.2 ns). All ratios and gains compare within one interpreter.
Survey of real data models
All 507 ExtendedType classes of pyVHDLModel, pyEDAA.Reports (code coverage, unit testing), pyTooling.Graph and
pyTooling.Tree: median 4 fields (inherited included), 0–1 own methods, 1 mixin in the MRO, depth 3. The tail
(p90: 26 fields, 13 methods, 6 mixins, MRO of 11) are document and design-unit classes.
| Bin | Fields | Methods | Properties |
|---|---|---|---|
| tiny | 2 | 1 | 1 |
| small | 5 | 3 | 3 |
| medium | 10 | 6 | 6 |
| large | 25 | 15 | 15 |
| xl | 40 | 30 | 30 |
Hierarchy shapes: straight lines of depth 1, 3 and 6; a fishbone (spine of 4, one mixin per level); a diamond (two
mixins sharing a base); one leaf with 4 or 8 mixins; 20 sibling subclasses of one base.
Class creation
µs per class (bins) or per hierarchy (shapes), median.
| Case | 3.14 classic | 3.14 slots | 3.14 ExtendedType | ratio | 3.13 classic | 3.13 slots | 3.13 ExtendedType | ratio |
|---|---|---|---|---|---|---|---|---|
| tiny | 4.7 | 4.6 | 34.5 | 7.5× | 3.3 | 3.4 | 22.3 | 6.6× |
| small | 4.9 | 5.4 | 41.1 | 7.7× | 3.4 | 3.8 | 28.1 | 7.4× |
| medium | 5.3 | 6.6 | 51.6 | 7.8× | 3.7 | 4.8 | 34.6 | 7.2× |
| large | 6.9 | 10.4 | 81.6 | 7.8× | 5.4 | 7.2 | 53.0 | 7.3× |
| xl | 8.6 | 15.5 | 122.7 | 7.9× | 6.5 | 10.8 | 81.4 | 7.6× |
| line, depth 1 | 9.6 | 12.3 | 106.8 | 8.7× | 7.5 | 8.5 | 75.0 | 8.8× |
| line, depth 3 | 21.0 | 22.9 | 214.7 | 9.4× | 15.1 | 16.8 | 155.0 | 9.2× |
| line, depth 6 | 43.9 | 44.6 | 420.1 | 9.4× | 31.6 | 31.6 | 284.9 | 9.0× |
| fishbone | 40.0 | 39.1 | 357.0 | 9.1× | 28.3 | 29.5 | 250.6 | 8.5× |
| diamond | 27.6 | 27.3 | 248.2 | 9.1× | 18.0 | 20.3 | 173.6 | 8.6× |
| 4 mixins | 30.5 | 30.6 | 258.0 | 8.4× | 23.6 | 23.4 | 173.7 | 7.4× |
| 8 mixins | 52.5 | 51.3 | 415.2 | 8.1× | 37.1 | 37.6 | 280.9 | 7.5× |
| 20 siblings | 111.2 | 118.2 | 1144.9 | 9.7× | 77.3 | 85.0 | 786.1 | 9.2× |
What it scales with, in ExtendedType's own µs per unit (3.14 / 3.13): +4.5 / +1.9 per depth level, +9.1 / +4.9 per
mixin, +6.1 / +4.4 per postponed (string) annotation, +2.2 / +1.1 per abstract method, +1.7 / +1.0 per method,
+1.2 / +0.4 per ClassVar, +0.7 / +0.4 per property, +0.6 / +0.4 per field. An almost empty class costs about 27 µs
(3.14) or 17 µs (3.13) more than with classic slots.
Instance creation
ns per instance of the leaf, C(1) with a full __init__ chain, median.
| Case | 3.14 classic | 3.14 slots | 3.14 ExtendedType | ratio | 3.13 classic | 3.13 slots | 3.13 ExtendedType | ratio |
|---|---|---|---|---|---|---|---|---|
| tiny | 88 | 78 | 118 | 1.51× | 51 | 72 | 70 | 0.97× |
| small | 98 | 85 | 129 | 1.52× | 68 | 85 | 87 | 1.03× |
| medium | 120 | 103 | 146 | 1.42× | 96 | 123 | 118 | 0.96× |
| large | 181 | 159 | 202 | 1.28× | 179 | 222 | 207 | 0.93× |
| xl | 1355 | 213 | 252 | 1.18× | 635 | 299 | 291 | 0.97× |
| line, depth 6 | 403 | 391 | 448 | 1.14× | 329 | 360 | 336 | 0.93× |
| fishbone | 323 | 310 | 373 | 1.20× | 339 | 356 | 354 | 1.00× |
| 8 mixins | 346 | 328 | 380 | 1.16× | 407 | 418 | 418 | 1.00× |
Cause of the +40–60 ns on 3.14: CPython 3.14 specialises C(...) to CALL_ALLOC_AND_ENTER_INIT only if
type(C) is type, because a metaclass could override __call__. With any metaclass, even class Meta(type): pass,
the call stays CALL_NON_PY_GENERAL; a do-nothing metaclass measures the same as ExtendedType. 3.13 doesn't
specialise slotted classes at all, so there is no gap. ExtendedType doesn't override __call__, so this can only be
changed in CPython (e.g. test "the metaclass doesn't override __call__" instead of the exact type).
The xl classic row: a dict-based class with more than 30 attributes leaves CPython's inline-values layout (1160 B
per instance), independent of ExtendedType.
Access and memory
- Reads, writes, properties and method calls of
ExtendedTypeinstances equal classic slotted classes. isinstanceagainst a class whose metaclass is nottypeleaves CPython's fast path (unless it's an exact-type
hit): +30 ns (3.14) / +23 ns (3.13). A do-nothing metaclass shows the same.- Instances are byte for byte classic slotted instances. Exception: a diamond lists the shared mixin's slot twice
(+8 B per instance), fixed by Reject a mixin-class' slot that exists already, and add a diamond's slot once #504. @readonlysubclassespropertyand, since v9.0.0, overrides__get__in Python only so type checkers see the
getter's return type. Every read runs two Python frames plussuper(): 255 ns vs. 33 ns for a@property
(3.14). Moving the__get__overloads underif TYPE_CHECKING:keeps the typing and gives about 66 ns.
pyVHDLModel has 270@readonlyproperties, pyEDAA.Reports 214.
Factors
- Abstract members: +2.2 µs per abstract method at class creation (3.14). Instances of a concrete subclass of an
abstract class cost +145 ns (3.14) / +107 ns (3.13), because_wrapNewMethodIfAbstractinstalls a Python
wrapped_newto undo the inheritedabstract_new(workaround for Cannot setA.__new__back toobject.__new__once it is set to something else. python/cpython#105888).ABCMetaneeds no
per-instance work, it uses CPython's own abstract flag. - Slot initial values:
devdrops them (fixed by MetaClasses: assign a slotted field's initial value in an intermediate __init__ #524). With MetaClasses: assign a slotted field's initial value in an intermediate __init__ #524, each instance pays 1.4 µs for 2 defaults and
2.9 µs for 5 (133 → 884 ns for one default, 6.7×), becausehasattr(self, field)on a not yet assigned slot raises
and swallows anAttributeError(322 ns each), plus the*args, **kwargswrapper. Assigning the defaults in a
__new__wrapper instead keeps the semantics and halves it (452 ns). ClassVars: +1.2 µs each (3.14), annotation resolution and classification.- Postponed annotations (
from __future__ import annotations, in 13 of 24 pyVHDLModel and 16 of 19 pyEDAA.Reports
files): every string is compiled andeval'd in_resolveAnnotation, +6.1 µs per field (3.14). A medium class
doubles from 51 to 108 µs. Compiling costs 7 µs per string, evaluating cached code 0.4 µs. - Mixin contracts: the
expects=class keyword is cheap when used (+2.6 µs for a mixin expecting 2 names). The
method-level@expectssupport is not:_wrapMethodsWithUnfulfilledExpectationsscans every member of every class
in the MRO for every new class, whether anything uses@expectsor not: 7 µs for a flat class, 24–27 µs for a depth-6
or 8-mixin leaf, 16 % of pyVHDLModel'sExtendedTypetime.
Where the time goes
Steps of ExtendedType.__new__ while importing pyVHDLModel (3.14, wrapped with timers, 46 ms in total):
| Step | ms |
|---|---|
_computeSlots (incl. annotation eval 5.9 ms, mixin slot aggregation 2.6 ms) |
14.4 |
_wrapMethodsWithUnfulfilledExpectations |
7.6 |
type.__new__ (CPython) |
5.8 |
_checkForAbstractMethods |
4.7 |
_findMethods |
4.2 |
Depth and mixins scale worst, because the expects scan (all MRO dictionaries), the abstract check (all direct bases'
dictionaries, about 20 injected bookkeeping members each), the inherited-slot map (whole primary MRO) and the mixin
slot aggregation (every inheritance path) recompute from scratch what the bases already knew.
Real models (fresh process per sample):
| Model | Python | Import | in ExtendedType.__new__ |
classes |
|---|---|---|---|---|
| pyVHDLModel | 3.14 | 54 ms | 37.4 ms (69 %) | 415 |
| pyVHDLModel | 3.13 | 42.7 ms | 28.6 ms | 415 |
| pyEDAA.Reports | 3.14 | 104 ms (incl. lxml) | 16.9 ms | 135 |
Improvements (prototyped and measured)
Each change keeps every feature, error message, exception type and note, except 03b. Gain = time inside
ExtendedType.__new__ while importing pyVHDLModel (412 classes, minimum of 15 fresh processes).
| # | Change | 3.14 | 3.13 | Exact |
|---|---|---|---|---|
| 01 | Annotation code cache: each annotation text is compiled once (same result as eval(str)) |
−2.6 % | −8.0 % | yes; −26 to −57 % per class with the future import |
| 02 | Abstract-method check: test the name first; skip the base scan when no base has abstract methods | −5.7 % | −8.2 % | yes |
| 03a | @expects scan skips object |
−2.2 % | −2.7 % | yes |
| 03b | @expects scan cache: each class keeps its marked members (__markedMembers__) |
−14.3 % | −14.6 % | no, decision needed |
| 05 | Non-abstract path of _wrapNewMethodIfAbstract without raise/catch; tuple fast path for expects |
−3.2 % | −2.3 % | yes |
| 07 | Skip the recursive __slots__ walk when every direct base is a slotted ExtendedType class |
−1.6 % | −3.0 % | yes |
| 04, 06, 08 | ThisClass rebinding, unannotated-field check, _findMethods hoisting |
+3.4 … −0.3 % | noise or slower: not proposed | |
| 10 | 01 + 02 + 03a + 05 + 06 + 07 + 08 | −18.5 % | −16.7 % | yes |
| 11 | 10 with 03b instead of 03a | −24.8 % | −23.3 % | 03b |
| pyVHDLModel, 412 classes | dev | exact set (10) | with 03b (11) |
|---|---|---|---|
3.14, in ExtendedType.__new__ |
32.1 ms | 26.1 ms | 23.5 ms |
3.13, in ExtendedType.__new__ |
25.9 ms | 21.6 ms | 19.9 ms |
| 3.14, whole import | 46 ms | 40 ms | 38 ms |
| 3.14, per class | 78 µs | 63 µs | 57 µs |
Class creation per class family (µs per class including the class body):
| Family | 3.14 dev | 3.14 exact set | 3.13 dev | 3.13 exact set |
|---|---|---|---|---|
| small | 36.0 | 28.5 (−21 %) | 22.7 | 19.9 (−12 %) |
| small, future import | 52.9 | 28.8 (−46 %) | 36.5 | 21.2 (−42 %) |
| code coverage like | 71.5 | 63.5 (−11 %) | 56.0 | 48.8 (−13 %) |
| code coverage like, future import | 95.3 | 58.5 (−39 %) | 72.0 | 45.4 (−37 %) |
| large | 106.5 | 94.5 (−11 %) | 72.8 | 68.8 (−5 %) |
| large, future import | 249.5 | 99.8 (−60 %) | 164.3 | 68.9 (−58 %) |
| deep | 51.4 | 42.2 (−18 %) | 39.2 | 34.0 (−14 %) |
| deep, future import | 71.9 | 40.7 (−43 %) | 51.5 | 31.0 (−40 %) |
Instance creation is unchanged by every change (±3 %). All changes pass pyTooling's unit tests (3.14; MetaClasses
tests also on 3.13), pyVHDLModel's and pyEDAA.Reports' tests.
Not considered: __init_subclass__ instead of a metaclass; it runs after type.__new__, too late to set __slots__.
Cython
Question: simple Cython didn't help pyTooling; could more Cython features help ExtendedType?
- What could be compiled:
type.__new__(already C) is 14–16 % ofExtendedType's time ondevand about 24 %
after the improvements; the class body runs in the user's uncompiled module. The rest is Python-level work made of
C-API calls on generic objects (dictionary iteration,getattr/hasattr/isinstance, closures,eval), which
compiled code calls the same way. Only bytecode dispatch is saved. MetaClassescompiled alone (Cython 3.3.0): pyVHDLModel 32.7 → 25.2 ms ondev, 24.1 → 19.4 ms on top of
the improvements (11). But:- without annotation typing no class can be created (
baseClasses: tuple[type]is an exact type check); - with typing (
type→type[Any]), 138 of 2455 tests fail: compiled functions aren'tFunctionType, so abstract
methods are detected wrongly; a__prepare__returning a dict subclass breaks; messages become Cython's; - 24 wheels (3.11–3.14 × 6 systems), 2.7 MB per module (440 KB stripped).
- without annotation typing no class can be created (
- Hot loops compiled with C types: at most 3.6 ms per pyVHDLModel import on
dev, about 1.5 ms after 03b. - Metaclass as
cdef class CMeta(type): compiles, but can't define__new__, only__cinit__, which runs after
the class exists: too late to compute__slots__.
Verdict: no Cython. The pure-Python improvements (24.1 ms) already beat compiled dev (25.2 ms) without any
behaviour change. The per-instance and isinstance costs come from CPython's handling of a metaclass, which Cython
can't change either.
Bugs found on the way
- A mixin's expectation fulfilled one level below rejects constructor arguments.
_wrapNewMethodIfExpectationUnfulfilledrestoresobject.__new__into the fulfilling class' dictionary, which hits
Cannot setA.__new__back toobject.__new__once it is set to something else. python/cpython#105888 (_wrapNewMethodIfAbstractworks around it, this path doesn't).class Root(metaclass=ExtendedType, slots=True): _a: int def __init__(self, a): self._a = a class Mx(metaclass=ExtendedType, mixin=True, expects=("Run",)): pass class Mid(Root, Mx): pass # misses 'Run' class Leaf(Mid): def Run(self): pass Leaf(1) # TypeError: object.__new__() takes exactly one argument (the type to instantiate)
- An unmarked override of an
@expectsmethod gets the base's stub back. The@expectsscan never drops a marked
name when a derived class redefines the method without the marker.class Base(metaclass=ExtendedType, slots=True): @expects("Missing") def Method(self): return "base" class Derived(Base): def Method(self): return "derived" # needs nothing Derived().Method() # UnfulfilledExpectationError: Method 'Derived.Method()' expects members ...
Verified on dev
Base 165db01 (the measurements above) vs. dev b1c6638, measured in one session with interleaved rounds, Python 3.14.7
and 3.13.5. Merged: 01 (#534), 02 (#535), 03a (#536), 05 (#537), 07 (#538), @readonly (#539); not merged: 03b, 06, 08.
Bug fixes merged afterwards that touch class creation: #532, #533, #524 with #544, #504. Today's absolute times are
8–13 % slower than in the original session, so only compare within this section.
Model, time in ExtendedType.__new__ |
base | prototype 10, re-measured | dev |
predicted |
|---|---|---|---|---|
| pyVHDLModel, 412 classes, 3.14 | 34.5 ms | 27.7 ms (−19.7 %) | 29.9 ms (−13.3 %), 83.8 → 72.6 µs per class | −18.5 % |
| pyVHDLModel, 412 classes, 3.13 | 27.2 ms | 23.8 ms (−12.5 %) | 24.2 ms (−10.9 %) | −16.7 % |
| pyEDAA.Reports CodeCoverage, 17 classes, 3.14 | 1.92 ms | 1.61 ms (−16.1 %) | 1.59 ms (−17.2 %) | −17.0 % |
- The merged speed PRs deliver the prediction: the state right after ExtendedType: compile each textual annotation once #534–ExtendedType: skip the recursive
__slots__walk below slotted ExtendedType base-classes #538 is −17.8 % on pyVHDLModel (3.14),
prototype 10 re-measured −18.4 %. - The bug fixes merged afterwards cost about 4–5 % again, on both Pythons: MetaClasses: assign a slotted field's initial value in an intermediate __init__ #524 +0.8 ms per pyVHDLModel import and
Reject a mixin-class' slot that exists already, and add a diamond's slot once #504 +0.4 to +0.9 ms (+1.3 % on 3.13, +2.2 % on 3.14), measured with GC disabled. MetaClasses: keep a class' slot initial values of its whole hierarchy #553 then cached the slot initial
values per class (_wrapInitMethodIfSlotDefaults1.0 → 0.7 ms per import); a cache for Reject a mixin-class' slot that exists already, and add a diamond's slot once #504's checks was declined. - Biggest single wins: postponed annotations −54 % per class (medium class 112.9 → 52.2 µs, 3.14; −51 % on 3.13),
forward references −50 %,@readonlyread 189.5 → 43.8 ns (3.14). Class creation vs. hand-written__slots__:
7.0–9.5× → 6.5–8.3× (3.14); hierarchies −9 to −14 %, flat classes −4 to −10 %. Instance creation unchanged. - Per instance: a concrete subclass of an abstract class still pays about +130 ns (3.14), as
wrapped_newstays.
Fix instantiating a class that fulfills an expectation its base-class missed #532's class pays +52–65 ns. One slot initial value: 456 ns (MetaClasses: assign a slotted field's initial value in an intermediate __init__ #524 alone: 881 ns); base dropped the value. - Breaking for consumers: pyVHDLModel no longer imports on
devbecause Reject a mixin-class' slot that exists already, and add a diamond's slot once #504 rejects three annotations that
repeat a mixin's field (Package._components,Design._allowBlackbox,Library._allowBlackbox). The pyVHDLModel
numbers above use a copy without these three lines; with them removed, its 465 tests pass. - Follow-ups, prepared but not opened: caching the hierarchy's slot initial values per class (step 3.31 → 1.00 µs,
about −0.3 ms per pyVHDLModel import) and the class declaring each slot (_aggregateMixinSlots20.0 → 11.4 µs for depth
7 with 4 mixins, about −0.1 ms per import).
Round 2 (2026-10-12, idle machine, fixed hash seed, warm .pyc; noise 1.9–3.6 %, round 1: 5–10 %):
pyVHDLModel, ExtendedType.__new__ |
3.14 | 3.13 |
|---|---|---|
base → dev, GC enabled (what users see) |
−14.8 % (37.6 → 32.2 ms) | −11.7 % |
base → dev, GC disabled (the code's own cost) |
−13.2 % (34.4 → 30.1 ms) | −13.7 % (26.5 → 22.4 ms) |
| prototype 10, re-measured | −19.2 % | −14.3 % |
| speed PRs #534–#538 alone | −18.4 % | −16.8 % (GC disabled) |
- The "checkout effect" of round 1 was garbage collection: on 3.13 about 3 ms of a 27 ms import are GC pauses, and where a
full collection lands depends on exact allocation counts, which are fixed per code version - so it looked like a few
percent between versions. Path, hash seed and order were ruled out. On 3.13, bytecode compiled during the import makes
ExtendedType.__new__11.7 % faster than the same code from.pyc(3.14: no difference). Round 1's per-merge numbers
(Reject a mixin-class' slot that exists already, and add a diamond's slot once #504 +5 % / +9 %) are therefore replaced by the GC-disabled ones above. - Synthetic matrix: hierarchies −11 to −17 %, flat classes −2 to −7 % on both Pythons; class creation vs. hand-written
__slots__7.2–9.7× → 6.7–8.0× (3.14);@readonly185.3 → 41.3 ns; instance creation unchanged.
The artifact's section Verified on dev has the full tables: synthetic bins and shapes, step profile, per-instance
costs and caveats.
Decisions
- 03b (−14 %): an
@expects-marked method monkey-patched onto a class after its creation is no longer enforced in
classes derived later; adds the class field__markedMembers__. Otherwise 03a. - Instances of concrete subclasses of abstract classes (+145 / +107 ns each): (1) use CPython's own
__abstractmethods__flag: no per-instance cost, but instantiating an abstract class raises CPython'sTypeError
instead ofAbstractClassError; (2) a metaclass__call__for abstract classes only (hacky); (3) keep it. MetaClasses: assign a slotted field's initial value in an intermediate __init__ #524 slot defaults: assign them in aDone in MetaClasses: assign slot initial values without probing each field #544__new__wrapper (452 ns instead of 884 ns per instance).
with an outermost__init__wrapper instead (438 ns, same speed, no interplay with the__new__wrappers).- CPython 3.14's call specialisation for classes with a metaclass: report upstream?
- ExtendedType: compile each textual annotation once #534: the annotation code cache is never cleared (185 entries, about 80 KiB for pyVHDLModel, pyEDAA.Reports and
parts of pyTooling). Keep it unbounded, orlru_cache/ a size limit? - ExtendedType: no raise/catch for a non-abstract class'
__new__; tuple fast path forexpects#537: keeps the exact behaviour for a__new__object whose__getattr__raises for other names (+60 ns per
class compared to a plainhasattr). - Fix instantiating a class that fulfills an expectation its base-class missed #532: a class fulfilling an expectation its base missed now pays the same per-instance
__new__wrapper as a
concrete subclass of an abstract class, so it follows the decision above.
Pull Requests
- 01 Annotation code cache: ExtendedType: compile each textual annotation once #534
- 02 Abstract-method check short cut: ExtendedType: scan base-classes for abstract method implementations only when needed #535
- 03a
@expectsscan skipsobject: ExtendedType: don't search object for methods marked with @expects #536 - 05 No raise/catch in
_wrapNewMethodIfAbstract's non-abstract path: ExtendedType: no raise/catch for a non-abstract class'__new__; tuple fast path forexpects#537 - 07 Skip the recursive
__slots__walk: ExtendedType: skip the recursive__slots__walk below slotted ExtendedType base-classes #538 -
@readonlyoverloads underTYPE_CHECKING:@readonly: declare the__get__overloads for type checkers only #539 - Bug 1, expectation fulfilled one level below: Fix instantiating a class that fulfills an expectation its base-class missed #532
- Bug 2, unmarked override of an
@expectsmethod: Fix an unmarked override of an @expects method getting the base's replacement #533 - 03b
@expectsscan cache: after the decision - MetaClasses: assign a slotted field's initial value in an intermediate __init__ #524 slot defaults without probing each field: MetaClasses: assign slot initial values without probing each field #544
- Slot initial values of the hierarchy cached per class: MetaClasses: keep a class' slot initial values of its whole hierarchy #553
-
Slot declarations cached per class: declined (−0.1 ms per import)
Activity