aws-elastic-beanstalk-cli
aws-elastic-beanstalk-cli copied to clipboard
Python 2 support broken with latest release of Pyrsistent
Description
Python 2 support is broken.
In release 17.1, the ebcli dependency Pyrsistent drops support for Python 2.x. This project, as with the AWS-SDK, supports both Python 2.7+ and 3.4+.
Steps to reproduce
I ran into this in a CI environment that runs Debian Buster. Specifically, the node:lts-buster Docker image. To reproduce, you can run the following commands:
apt-get update
apt-get -y install python-pip
pip install awsebcli
Observed result
The failure happens while deps are being resolved. Happy to provide more info if needed.
...
Collecting pyrsistent>=0.14.0 (from jsonschema<4,>=2.5.1->docker-compose<1.26.0,>=1.25.2->awsebcli)
Downloading https://files.pythonhosted.org/packages/7d/ae/90ddcf28fb8eee5d4990920586d2856342e42faa95f39223f0b9762ef264/pyrsistent-0.17.2.tar.gz (106kB)
pyrsistent requires Python '>=3.5' but the running Python is 2.7.16
ERROR: Job failed: exit code 1
We're seeing this as well. It broke our automated elastic beanstalk deployments via Github Actions.
Issue I think is that the latest 3 versions of Pyrsistent were yanked (https://pypi.org/project/pyrsistent/#history), but pip is not ignoring those yanked versions of Pyrsistent (see https://github.com/pypa/pip/issues/8262 ?) and instead attempts to install the latest yanked 0.17.2 and fails instead of installing the last valid version 0.16.0.
This hit us today as well. Apparently older versions of pip do not understand yanked packages, so they'll install them regardless. See this issue for more context: https://github.com/tobgu/pyrsistent/issues/208.
A workaround for now:
pip install awsebcli pyrsistent==0.16.0
Actually I would prefer to use Python 3, but I cannot because of a UnicodeDecodeError described here but I can't follow the suggestion of using 3.10.0 because that instead throws a MissingServiceIdError about The model being used for the service elasticbeanstalk is missing the serviceId metadata property, which is required. :(
Hi @baer are you still facing the issue ?I've recently checked the latest dependencies of awsebcli version 3.20.10, and I can confirm that pyrsistent is no longer a dependency . Can you please recheck and confirm if you are still facing the issue ?
@NihalM99 I do not work in that codebase anymore, so I can't verify. However, if it's no longer a dep, this issue should get closed out.