Skip to content
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

Version 2.9.0 is not compatible with aws-cli #1348

Closed
m4vazquez opened this issue Mar 1, 2024 · 6 comments
Closed

Version 2.9.0 is not compatible with aws-cli #1348

m4vazquez opened this issue Mar 1, 2024 · 6 comments

Comments

@m4vazquez
Copy link

Hello, I have this error on aws-cli execution:

  • aws --version
    Traceback (most recent call last):
    File "/usr/local/bin/aws", line 19, in
    import awscli.clidriver
    File "/usr/local/lib/python3.5/site-packages/awscli/clidriver.py", line 17, in
    import botocore.session
    File "/usr/local/lib/python3.5/site-packages/botocore/session.py", line 29, in
    import botocore.configloader
    File "/usr/local/lib/python3.5/site-packages/botocore/configloader.py", line 19, in
    from botocore.compat import six
    File "/usr/local/lib/python3.5/site-packages/botocore/compat.py", line 26, in
    from dateutil.tz import tzlocal
    File "/usr/local/lib/python3.5/site-packages/dateutil/init.py", line 5, in
    from ._version import version as version
    File "/usr/local/lib/python3.5/site-packages/dateutil/_version.py", line 10
    version: str
    ^
    SyntaxError: invalid syntax

I fixed uninstalling 2.9.0 and install 2.8.2 and it's works but on the pip install aws-cli call any version <3.0.0 so I have to make changes on more that two hundred of piplelines.

@mattmauriello
Copy link

we are having the same issues. another package install updates dateutil to 2.9.0 and we get the exact same stack trace.
running aws-cli/1.18.147 Python/2.7.18

we got it to work again with
pip2 install --force-reinstall -v 'python-dateutil==2.8.2'

seems to be simply because the _version.py file uses type checking which doesn't seem to be supported in python2.7, not until 3.6

@tipabu
Copy link

tipabu commented Mar 1, 2024

Duplicate of #1344 -- looks like the short-term plan is to pin an older version of setuptools_scm (which was responsible for generating _version.py) and get another release out; longer term, see #1347

Until the short-term fix is out, rolling back to python-dateutil==2.8.2 is about all downstream consumers can do.

@pganssle
Copy link
Member

pganssle commented Mar 1, 2024

Also, I think there's no benefit to upgrading to 2.9.0 for any Python versions older than 3.7 unless you are using the internal zoneinfo database (which you hopefully are not, or you are patching in a newer version anyway) — that would only come up on Windows for the most part.

@pganssle
Copy link
Member

pganssle commented Mar 1, 2024

Closing as duplicate.

@pganssle pganssle closed this as completed Mar 1, 2024
@m4vazquez
Copy link
Author

i'm using python 3.5.7 not 2.x why you close the issue if is another python version?

@mattmauriello
Copy link

@m4vazquez , the defect that impacted python2.7 also impacts python3.5, as neither of those versions supported the type setting that the new setuptools created. the fix issued today removes that issue, so dateutil can be loaded in BOTH those versions, and therefore AWSCLI doesn't fail when trying to import it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants