pyglet / pyglet

pyglet is a cross-platform windowing and multimedia library for Python, for developing games and other visually rich applications.
http://pyglet.org
BSD 3-Clause "New" or "Revised" License
1.78k stars 294 forks source link

Fix math typing on Python 3.8 #1081

Closed pushfoo closed 2 months ago

pushfoo commented 2 months ago

TL;DR: Add back Python 3.8 support since it won't EOL until October

My reasoning for this:

  1. Python 3.8 won't EOL until October 1st
  2. Pipe syntax on annotations was added in 3.9 (ctrl-f | on the 3.8 typing summary vs the 3.9 typing summary)
  3. Discord discussion gave me the impression we're releasing 2.1 well before October
  4. This improves the type checking situation for pyglet
  5. It's easy to git revert $SQUASHED_HASH once 3.8 EOLs

P.S. Sorry about the commit messages. The PEP for it was drafted for 3.10 but it seems to have been shipped ahead of schedule in 3.9. I'm assuming we'll rewrite / squash.