You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A recent PR marked types inside typing.py with TypeAlias, but that object is only available from python 3.10.
We now know how it passed the checks: inside __init__.py we catch import errors, and importing TypeAlias from typing before 3.10 results in an import error, so pygame.typing becomes a missing module with no exception. Once a PR fixing this is merged, the unit test for typing can be merged and issues like this won't appear again.
We can fix this in two ways:
remove the addition of TypeAlias
version check the relevant bits of the files to use TypeAlias on 3.10+ but use the old system otherwise
The one choosing should be @zoldalma999 as they made the original PR.
:3
The text was updated successfully, but these errors were encountered:
Note that typing.py and typing.pyi should exclude TypeAlias in either case, because it is not guaranteed that typing_extensions will be available at runtime.
A recent PR marked types inside
typing.py
withTypeAlias
, but that object is only available from python 3.10.We now know how it passed the checks: inside
__init__.py
we catch import errors, and importing TypeAlias from typing before 3.10 results in an import error, so pygame.typing becomes a missing module with no exception. Once a PR fixing this is merged, the unit test for typing can be merged and issues like this won't appear again.We can fix this in two ways:
TypeAlias
TypeAlias
on 3.10+ but use the old system otherwiseThe one choosing should be @zoldalma999 as they made the original PR.
:3
The text was updated successfully, but these errors were encountered: