Open sjoerd-bouma opened 5 months ago
Enhanced Compatibility with Older Python Versions A change was made in the code base of the program to swap out newer "match" statements for more traditional "if-elif" statements. This ensures that the package is usable even for those using older versions of Python programming language.
Explicit Python Version Requirements A new field was introduced in the configuration file which explicitly states that for the package to work smoothly, a Python version of 3.6 or higher is needed. This takes the guesswork out of determining which versions are compatible with our software.
Extended Language Support in Metadata We've updated the 'metadata' - essentially the package's 'label' so to speak - to include Python version support for 3.6 through to 3.9. This means our package is now officially stated to work with more recent versions of Python and can reached a broader user base.
The
__init__.py
currently uses thematch
statement, which was introduced only in Python 3.10. Unfortunately, this meanspygdsm
is incompatible with earlier Python versions, in particular on clusters etc. where upgrading may not be straightforward. As far as I could tell, the match statement was in fact the only source of incompatibility with older Python versions, so here my suggestion to replace it with if/else logic instead.I have verified this works on a local Python 3.6 installation. I have also added the
python_requires
argument to thesetup.cfg
file, as I think this is howpip
can tell which Python versions are supported. I suppose the version number also has to be bumped before this can be released, but I am not sure exactly how/if you would like to proceed from here : )