GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Stale entries in MRO cache if MRO contains non-base classes · Issue #127773 · python/cpython Closed Labels 3.12only security fixesonly security fixes3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportFor example the following program fails with either import sys class Base: value = 1 class Meta(type): def mro(cls): return (cls, Base, object) class WeirdClass(metaclass=Meta): pass assert Base.value == 1 assert WeirdClass.value == 1 Base.value = 2 assert Base.value == 2 assert WeirdClass.value == 2 Base.value = 3 assert Base.value == 3 assert WeirdClass.value == 3 Adding intervening calls to
We have code that checks for this case, but it hasn't worked properly in Python 3.10+: Lines 1107 to 1112 in 5c89adf
We also have a test that partly covers this case, but doesn't detect the bug: cpython/Lib/test/test_capi/test_type.py Lines 40 to 66 in 5c89adf
Linked PRsReacted by Ken Jin and Petr Viktorin Activity
MetadataMetadataAssigneesLabels3.12only security fixesonly security fixes3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |