bw2 / ConfigArgParse

A drop-in replacement for argparse that allows options to also be set via config files and/or environment variables.
MIT License
719 stars 121 forks source link

version 1.5.5 on PyPI claim Python 2 support #282

Open paran1 opened 1 year ago

paran1 commented 1 year ago

Hope this is the right place for this.

Version 1.5.5 is published on PyPI as having Python 2.7 support, which it does not have as there is code using f-strings.

This means that if you do pip install ConfigArgParse on 2.7 you get a version that cannot be imported. The previous version, 1.5.3, works fine.

I am all for dropping 2.7 support, but if it is possible to fix the metadata on PyPI for 1.5.5 that would be helpful. I ran into this when updating an internal tool, still using python2 where this made the CI jobs fail. Easy enough to fix and explicitly require 1.5.3 but still.

This shows the problem using the docker hub python:2 image

$ podman run -it -h py2 python:2 /bin/bash
root@py2:/# python --version
Python 2.7.18
root@py2:/# pip -qqq install ConfigArgParse
root@py2:/# pip show ConfigArgParse
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Name: ConfigArgParse
Version: 1.5.5
Summary: A drop-in replacement for argparse that allows options to also be set via config files and/or environment variables.
Home-page: https://github.com/bw2/ConfigArgParse
Author: None
Author-email: None
License: MIT
Location: /usr/local/lib/python2.7/site-packages
Requires: 
Required-by: 
root@py2:/# python -c 'import configargparse'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/configargparse.py", line 406
    raise ValueError(f"Error trying to unquote the quoted string: {text}: {e}") from e
                                                                             ^
SyntaxError: invalid syntax
root@py2:/# 
root@py2:/# 
root@py2:/# # downgrading to 1.5.3 works
root@py2:/# pip -qqq install ConfigArgParse==1.5.3
root@py2:/# python -c 'import configargparse'