cdent / gabbi

Declarative HTTP Testing for Python and anything else
http://gabbi.readthedocs.org/
Other
148 stars 34 forks source link

Gabbi 2.x is being installed by pip on Python2 #280

Closed pshchelo closed 4 years ago

pshchelo commented 4 years ago

AFAIU the reason is that setup.cfg has Programming Language :: Python but not Programming Language :: Python :: 3 :: Only identifiers.

Even latest pip under Python 2.7 attempts to install gabbi 2.x

$ pip -V
pip 20.1.1 from /home/pshchelo/.virtualenvs/sandbox/local/lib/python2.7/site-packages/pip (python 2.7)
$ pip install gabbi
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. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/
latest/development/release-process/#python-2-support
Collecting gabbi
  Using cached gabbi-2.0.1-py2.py3-none-any.whl (208 kB)

One can even see that the wheel is designated as py2.py3

However in fact gabbi is not compatible with Py2 now, as it dropped requirement for testtools which was a 'backport' of unittest std lib to Py2 in some sense. Now running gabby 2.x under Py2 (sometimes? always?) results in errors like AttributeError: 'gabbit' object has no attribute 'assertRegex'

I propose to add Python :: 3 :: Only metadata to setup.cfg, make a new release and pull previous 2.x releases from PyPI to not break / confuse legacy installations (yes, I know Py2 must die, but such is life of a legacy maintainer :-/).

cdent commented 4 years ago

Yeah, thanks, I guess I forgot to update the classifiers. Thanks for noticing and for the patch, I'll release 2.0.2 after merging that.

cdent commented 4 years ago

It ended up being 2.0.3 as universal wheels also needed to be turned off.

pshchelo commented 4 years ago

verified under Py2, 1.49 is installed. Thanks!

cdent commented 4 years ago

Thank you!