Skip to content

Specify python_requires to prevent installation on Python 3#67

Merged
agronholm merged 1 commit intoagronholm:masterfrom
eli-schwartz:master
Oct 27, 2017
Merged

Specify python_requires to prevent installation on Python 3#67
agronholm merged 1 commit intoagronholm:masterfrom
eli-schwartz:master

Conversation

@eli-schwartz
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Owner

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

@agronholm
Copy link
Copy Markdown
Owner

agronholm commented Oct 27, 2017

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.

This package is *not* python 3 comppatible at all, and depending on the
fact that, usually, it will be shadowed by the stdlib and not get
imported at all is less technically correct than just not installing it
at all.
@eli-schwartz
Copy link
Copy Markdown
Contributor Author

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 agronholm merged commit d0393ad into agronholm:master Oct 27, 2017
@agronholm
Copy link
Copy Markdown
Owner

Thanks.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants