-
Notifications
You must be signed in to change notification settings - Fork 358
Description
Enhancement request:
What should be added/changed?
We should use a single source of truth for the minimum Python version.
What would it help with?
In 10 months, 3.7 is reaching EOL. If we make the proposed fix now, we'll never have to go through multiple doc pages to update the minimum python version again.
Potential Fixes
tl;dr I can do the same thing I did for pyglet if you want this done fast
Option 1 : The same thing I did for pyglet
I implemented a crude version of this proposal for pyglet: pyglet/pyglet#668. I could do the same for arcade.
Option 2: Option 1 + Add a maximum version
I mentioned maximum version because shapely has issues on 3.11, but I don't know if it's a hard requirement or just an optional one.
If we want to get fancy, we could also do something like this in arcade's __init__.py:
class Version(tuple):
"""A tuple that renders versions neatly to strings.
In addition to printing neatly, constants declared with it can also
be imported and compared against in other files. This would allow
for centralizing control over minimum interpreter versions for
specific features.
It works with string.format and f-strings, but does not work with
% interpolation.
"""
def __new__(cls, *args):
return tuple.__new__(cls, args)
def __str__(self) -> str:
result = []
for val in self:
result.append(str(val))
return '.'.join(result)It was overkill for pyglet since they don't need to track a maximum Python version.
Option 3: Explore additional dependencies
We could also try using sphinx extensions or other dependencies. This might be overkill since we don't offer partial support for Python versions.