question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Latest Release Causes `futures` package to be included in Python3 installs

See original GitHub issue

Hey,

You might see some more traffic here soon. It looks like the latest release, 0.3.5 fixed a type in setup.cfg that caused the futures package to be installed for all installs, not just Python 2.7. aws-cli pins this library to >=0.3.0, <0.4.0 so new installs will automatically grab this version and error out with something similar to the following.

pip, install, awscli) exited with code 1.     ERROR: Command errored out with exit status 1:
     command: /python3/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-dv9sw2br/futures/setup.py'"'"'; __file__='"'"'/tmp/pip-install-dv9sw2br/futures/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-dv9sw2br/futures/pip-egg-info
         cwd: /tmp/pip-install-dv9sw2br/futures/
    Complete output (4 lines):
    This backport is meant only for Python 2.
    It does not work on Python 3, and Python 3 users do not need it as the concurrent.futures package is available in the standard library.
    For projects that work on both Python 2 and 3, the dependency needs to be conditional on the Python version, like so:
    extras_require={':python_version == "2.7"': ['futures']}
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

To fix this issue we had to manually pin s3transfer==0.3.4 for now. Would be awesome if a fix could be released so installing s3transfer on python3 envs works again.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
nateprewittcommented, Mar 18, 2021

Hey @andrewgross, thanks for bringing this to our attention! It looks like this is an unintended side effect of this actually. We started building our wheels with a more modern version that includes Wheel Metadata 2.1. The way this setup.py is written is actually incorrect and causing us to include the metadata twice here:

Metadata-Version: 2.1
Name: s3transfer
Version: 0.3.5
Summary: An Amazon S3 Transfer Manager
Home-page: https://github.com/boto/s3transfer
Author: Amazon Web Services
Author-email: kyknapp1@gmail.com
License: Apache License 2.0
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Requires-Dist: botocore (<2.0a.0,>=1.12.36)
Requires-Dist: futures (<4.0.0,>=2.2.0)
Requires-Dist: futures (<4.0.0,>=2.2.0) ; python_version=="2.7"

We’re working on a fix for this now.

1reaction
nateprewittcommented, Mar 19, 2021

New release has been cut for 0.3.6 which should resolve the issue for those affected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing Packages - Python Packaging User Guide - Python.org
This section covers the basics of how to install Python packages. ... If you do not have Python, please install the latest 3.x...
Read more >
futures - PyPI
futures 3.4.0. pip install futures. Copy PIP instructions. Latest version. Released: Oct 31, 2022.
Read more >
What's New — Python-Future documentation
This release fixes compatibility bugs with CherryPy's Py2/3 compat layer and the latest version of the urllib3 package. It also adds some additional...
Read more >
futures 3.1.2 breaks the world :-) · Issue #83 - GitHub
If you have a python 2/3 compatible package that uses third party dependencies that use concurrent.futures then using 3.1.2 causes an error ...
Read more >
Python PyDictionary Import error from futures - Stack Overflow
Python 3 users should not attempt to install it, since the package is already included in the standard library.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found