SKaplanOfficial/PyXA

Support older Python versions (3.10, 3.9, ...)

Closed this issue · 1 comments

Currently, PyXA uses particular type hints, match statements, and other features only available in Python 3.11. This simplifies the code in some areas, but it reduces the ability for people to use PyXA in general projects.

  • Is this is worthwhile change?
  • Can multiple versions be supported at a time?
  • How far back should we support (As far back as PyObjC supports?)

In my projects, I try to support "last 3" python versions: hence 3.9, 3.10, 3.11. I find this a good balance between using new features and maintainability. I see no reason to support python versions that are at end of life, currently <= 3.6. For type hints, adding from __future__ import annotations at the top of the file brings in most of the type hint features from newer versions. Some things like match statement would obviously need to be refactored.

If you're already making use of specific 3.11 features then maybe just keep 3.11 and add support for newer versions going forward. e.g. this year you support only 3.11, next year, 3.11 and 3.12, and so on. 3.11 runs great on macOS, most mainstream libraries have by now been upgraded to support 3.11, and 3.11 is much more performant than previous versions.