# some library i use that needs to work on older python versions:
import typing_extensions
def fn[T](typ: typing_extensions.TypeForm[T]): ...
# my project that uses python 3.15
import typing
typ: typing.TypeForm[int | None] = int | None
fn(typ) # error: "TypeForm[int | None]" is not assignable to "TypeForm[T@fn]"
playground
the fix would be to do this, which is consistent with everything else in typing_extensions.pyi:
if sys.version_info >= (3, 15):
from typing import TypeForm as TypeForm
else:
TypeForm: _SpecialForm
playground
the fix would be to do this, which is consistent with everything else in
typing_extensions.pyi: