Python 3.14 lazy annotations: NameError moves from def to access
With PEP 649/749 in CPython 3.14.10, def f(x: UndefinedName) -> int: ... no longer raises at definition time; on 3.12.16 and 3.13.18 it raised NameError immediately. The error is deferred until access: f.__annotations__ and typing.get_type_hints(f) raise NameError: name 'UndefinedName' is not defined. A @dataclass with x: UndefinedName raised NameError at class creation on 3.12.16, but on 3.14.10 it is created silently and dataclasses.fields(C)[0].type is ForwardRef('UndefinedName', ...). So an import-only smoke test no longer catches a misspelled annotation on 3.14. For tolerant introspection, annotationlib.get_annotations(f, format=annotationlib.Format.FORWARDREF) returns ForwardRef for missing names, and Format.STRING returns the source strings.