python-chess icon indicating copy to clipboard operation
python-chess copied to clipboard

Drop support for Python 3.9

Open niklasf opened this issue 5 years ago • 4 comments

  • [ ] int.bit_count
  • [x] ~~typing.TypeAlias instead of aliases configured in doc/conf.py~~
  • [ ] typing.Union syntax

niklasf avatar May 30 '20 14:05 niklasf

TypeAlias can already be used from typing_extensions (with no need of actually having typing_extensions installed, mypy looks up the stub in the typeshed and sees it as a part of the standard library).

johnslavik avatar Apr 10 '24 18:04 johnslavik

@bswck Interesting. Won't import typing_extensions fail at runtime if it's not present, or is there a way to avoid that?

niklasf avatar Apr 18 '24 14:04 niklasf

@bswck Interesting. Won't import typing_extensions fail at runtime if it's not present, or is there a way to avoid that?

Won't fail if we don't perform the import at runtime at all, i.e. in the if typing.TYPE_CHECKING: block. Then we can enable PEP 563 behavior to not evaluate type annotations at runtime.

johnslavik avatar Apr 18 '24 14:04 johnslavik

Ah, cool. Done.

niklasf avatar Apr 18 '24 16:04 niklasf