MAINT Add python_requires>=3.5 to setup.py#13861
MAINT Add python_requires>=3.5 to setup.py#13861jnothman merged 3 commits intoscikit-learn:masterfrom
Conversation
|
Indeed I had thought about that an completely forgotten about it. 0.21.0.post0 is probably enough just for the tarball package. No need to change the wheels. |
|
From https://packaging.python.org/guides/distributing-packages-using-setuptools/,
I think it should be fine. Another this is I'm not sure we should actually fail explicitly in |
|
I think this should fix it, but it would be good if someone could double check.
Right, if one can remove just one file from PyPy without removing the release that could work. |
|
We can check locally by:
It should ignore the local tarball and install the latest python 2.7 compatible wheel (scikit-learn 0.20.3) from PyPI. The same command from an empty python 3 venv should install from the local sdist. |
|
Hum, that might not be enough: |
|
Actually my test is probably not doing what it's supposed to do and is probably not going to work as long as the broken tarball is the most recent tarball uploaded on pypi.org ... We might need to delete the 0.21.0 source dist from pypi.org |
I also think so #13860 (comment) |
|
I will push a fix to your PR soon (to remove the numpy / python 3 dependency just to get egg_info). |
|
If you try to pip install a tarball generated with the generated by pip's own |
|
To get more details in your tests you can do: Unfortunately it does not seem to fallback to the online PyPI index but it's probably expected when using |
|
I just deleted the 0.20.0 tarball from PyPI to avoid causing this problem to python 2 users and CI servers around the world while we are fixing the metadata. |
|
A better long term solution that does not involve keeping Python 2 compat for the I am not sure how to do that without introducing too much redundancy so better keep that for the next release. |
jnothman
left a comment
There was a problem hiding this comment.
I've not tested but this lgtm
…aking python2.7 setup.py egg_info)
* Add python_requires to setup.py * FIX make it possible to run egg_info from Python 2 without numpy * Informative error message for python2.7 setup.py install (without breaking python2.7 setup.py egg_info)
* Add python_requires to setup.py * FIX make it possible to run egg_info from Python 2 without numpy * Informative error message for python2.7 setup.py install (without breaking python2.7 setup.py egg_info)
* Add python_requires to setup.py * FIX make it possible to run egg_info from Python 2 without numpy * Informative error message for python2.7 setup.py install (without breaking python2.7 setup.py egg_info)
Closes #13860
Marks the package as requiring python3.5+ in
setup.py, so that it is not selected when istalled by pip from PyPi