agronholm / pythonfutures

Backport of the concurrent.futures package to Python 2.6 and 2.7
Other
232 stars 51 forks source link

Specify python_requires to prevent installation on Python 3 #67

Closed eli-schwartz closed 7 years ago

eli-schwartz commented 7 years ago

Rather than merely being pointless to install on Python 3, this package will actually cause syntax errors on Python 3.

This is a problem as installing it anyway will shadow the version in the stdlib.

agronholm commented 7 years ago

It won't shadow it because stdlib imports cannot be overridden, unless very explicit measures are taken.

agronholm commented 7 years ago

Don't drop the condition in setup.py. Remove that change and I'll merge. Though I can't help but to wonder how many projects will break because of this given that the download statistics show over 300k installs on Python 3.6 for this project, meaning it is an unconditional dependency for a lot of projects.

eli-schwartz commented 7 years ago

Well, apparently I should not be doing this late at night. :D Naturally, '' will override the stdlib, and byte-compiling it provides an awkward error message from setuptools (that pip -v might even show).

Still as a matter of technical correctness this should be done. And it would head off bugs like this at the pass, since distros quite naturally do not package futures for python3 and projects should fix themselves.

force-pushed; the warning is useful anyway I guess, for manual clone + install via python3 setup.py install (pip will suppress it unless you escalate to an error).

agronholm commented 7 years ago

Thanks.