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 — ClassVar + Final · Issue #2371 · python/typing Open Labels topic: otherOther topics not coveredOther topics not covered DescriptionIn the spec, we say (qualifier.rst):
But in the conformance suite we have: bad9: Final[ClassVar[int]] = 3 # E: ClassVar cannot be nested with Final (classes_classvar.py) And: VALUE2: ClassVar[Final] = 1 # E: Final cannot be used with ClassVar VALUE3: Final[ClassVar] = 1 # E: Final cannot be used with ClassVar (qualifiers_final_annotation.py) At runtime, this was an error (if the annotation is evaluated) before 3.12, but it is allowed in 3.13+. We made this runtime change to allow usage in dataclasses. So the spec makes this an optional error, but the conformance suite requires the error. Most type checkers currently do emit the error, but mypy when targeting 3.13+ allows the nesting (with some bugs: python/mypy#21906). I would propose to make the errors in the conformance suite optional to match the spec text, but I'd be open to other solutions too. Activity
MetadataMetadataAssigneesLabelstopic: otherOther topics not coveredOther topics not covered 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. |