-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python 2 installs broken with next pyparsing release #313
Comments
Packaging needs to remain compatible with Python 2.7 until |
I don't think we need the
$ cat requirements.txt
jinja2
PyYAML
cryptography
packaging
$ pip install -r requirements.txt --pre
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
Collecting jinja2
Using cached Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
Collecting PyYAML
Using cached PyYAML-5.3.1.tar.gz (269 kB)
Collecting cryptography
Downloading cryptography-2.9.2-cp27-cp27m-macosx_10_9_x86_64.whl (1.8 MB)
|████████████████████████████████| 1.8 MB 1.5 MB/s
Collecting packaging
Using cached packaging-20.4-py2.py3-none-any.whl (37 kB)
Collecting MarkupSafe>=0.23
Using cached MarkupSafe-1.1.1-cp27-cp27m-macosx_10_6_intel.whl (17 kB)
Collecting ipaddress; python_version < "3"
Using cached ipaddress-1.0.23-py2.py3-none-any.whl (18 kB)
Collecting enum34; python_version < "3"
Using cached enum34-1.1.10-py2-none-any.whl (11 kB)
Collecting six>=1.4.1
Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting cffi!=1.11.3,>=1.8
Using cached cffi-1.14.0-cp27-cp27m-macosx_10_9_x86_64.whl (173 kB)
Collecting pyparsing>=2.0.2
Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting pycparser
Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Building wheels for collected packages: PyYAML
Building wheel for PyYAML (setup.py) ... done
Created wheel for PyYAML: filename=PyYAML-5.3.1-cp27-cp27m-macosx_10_14_x86_64.whl size=45648 sha256=8ae54e677c93103d55f4c8d1db4217d9cadda45e5da4218b2749fe75a596501f
Stored in directory: /Users/pradyunsg/Library/Caches/pip/wheels/d1/d5/a0/3c27cdc8b0209c5fc1385afeee936cf8a71e13d885388b4be2
Successfully built PyYAML
Installing collected packages: MarkupSafe, jinja2, PyYAML, ipaddress, enum34, six, pycparser, cffi, cryptography, pyparsing, packaging
Successfully installed MarkupSafe-1.1.1 PyYAML-5.3.1 cffi-1.14.0 cryptography-2.9.2 enum34-1.1.10 ipaddress-1.0.23 jinja2-2.11.2 packaging-20.4 pycparser-2.20 pyparsing-2.4.7 six-1.15.0 OP is using
|
yeah, that's a fair point. Their github didn't tag the pre-release the same as the other ones, but PyPI release page reflects that python 2 isn't allowed. I see the argument for wanting the dependency resolver to handle this instead. |
pip's current resolver should handle this just fine TBH (as long as it doesn't see a |
Ah, good catch @pradyunsg. Seems like there's nothing we need to do here then. |
Thanks for filing this issue @AlanCoding! ^.^ |
I am about to push out pyparsing 3.0.0a2 as another pre-release. Let me know if there are any additional steps I need to take. (The most recent Py2-compatible version is 2.4.7, released |
The upcoming pyparsing 3 release will require Python 3.5 or later, see: pypa/packaging#313 Unfortunately pip 8.x and earlier versions do not support python version requirements, which is why this constraint is needed.
The upcoming pyparsing 3 release will require Python 3.5 or later, see: pypa/packaging#313 Unfortunately pip 8.x and earlier versions do not support python version requirements, which is why this constraint is needed.
@ptmcg Nothing needed -- I think w.r.t. this issue, pyparsing doesn't really need to change any of the declared metadata. All's good on pyparsing's side. :) |
On April 5, 2020 your dependency
pyparsing
released version3.0.0a1
to PyPIhttps://pypi.org/project/pyparsing/#history
You might have guessed this from the version number, but it dropped python2 support
The way I hit this is by trying to do a manual
python setup.py install
of Ansible on a fresh RHEL7 machine. This results in the error:in stderr
The requirements for the
ansible
package are:https://github.com/ansible/ansible/blob/devel/requirements.txt
This is passed into its
setup.py
fileinstall_requires
option, mostly as-is (it might remove the cryptography dependency but nothing that would matter).It's totally fine if you want to remove python 2 support #305, but it would be nice to have a final python 2 version that will keep working, and the lack of maximum version pins of dependencies is going to create a big problem for anything trying to keep an environment on life support still working.
Exactly how to do the pin is tricky, the minimum pin is:
packaging/setup.py
Line 52 in 59e1488
You could add an entry with
pyparsing<3.0; python_version < '3.0'
. That won't work with all versions of pip and setuptools, or you could add code to handle more cases. These decisions are why I am filing an issue and not creating a PR.The text was updated successfully, but these errors were encountered: