-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
setuptools could respect python_requires #1633
Comments
Similarly, a “universal” declaration should fail if any extension modules are present. Interestingly, the need for this feature goes away entirely when Python 2 support is dropped. |
This has some problems, which are essentially the same problems that invoking Another issue is that It would make sense if this information were stored in |
Another situation reported by pytest users in pytest-dev/pytest#4770: This is causing some grief to Python 2.7 pytest users which execute |
@nicoddemus I think that I don't know if it's a big deal to fix it, though. If it's easy enough to do we might as well do it, but on the other hand I think almost anything that hits an |
Fair enough, thanks @pganssle! I think deprecating it would be a good start so people can move to more friendly and stable setups with |
There is also something wrong with the For example: selenium 4.0.0b1 requires python 3.7, but when running this on python 3.6 we get selenium 4.0.0b1 installed anyway:
|
The Task Standard package uses `TypedDict`s. These require the `typing_extensions` module due to limitations in `typing` <= Python 3.12 (see METR/task-standard#29), but the package doesn't currently depend on the `typing-extensions` package, which is required to provide `typing_extensions`. Note that although `typing-extensions` requires Python >=3.8, we can't require Python versions in `setup.py` due to a [known limitation of setuptools](pypa/setuptools#1633). Details: Add `typing-extensions` to `install_requires` in `setup.py`. Testing: - unsure (covered by automated tests?)
Example:
setup.py
Example steps to reproduce:
Expected: Command fails with an error explaining that the Python version isn't supported.
Some packages workaround this by adding the following to the top of their
setup.py
:Rather than relying on each package to implement this, it could be handled once by setuptools.
An important use case, after porting a package to Python-3-only, one may mistakenly do:
On a system where
python
is Python 2 (most Linux systems), this produces a Python 2 wheel instead of a Python 3 wheel. This is clearly a mistake by the user, but if setuptools were to bail early, the mistake wouldn't make it to PyPI.The text was updated successfully, but these errors were encountered: