Skip to content
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

PyPi assumes that a Release Version pertains to a particular Python version #16033

Closed
venkatkasirajan opened this issue May 31, 2024 · 6 comments
Labels
bug 🐛 requires triaging maintainers need to do initial inspection of issue

Comments

@venkatkasirajan
Copy link

Describe the bug
PyPi assumes that a Release Version pertains to a particular Python version. If I have a release version 0.5.0 and twine upload wheel files, some of them with a different Python version requirement, PyPi assumes that all wheel files uploaded under version 0.5.0 require the same Python version. This causes installation problems.

Expected behavior
PyPi recognizes the Python version requirement for each wheel file under the same release version correctly. Pip install chooses the correct wheel files and installation proceeds normally.

To Reproduce
Consider the following wheel files:

MyLib-0.5.0-cp311-cp311-manylinux_2_27_x86_64.whl
MyLib-0.5.0-cp310-cp310-manylinux_2_34_x86_64.whl
MyLib-0.5.0-cp311-cp311-win_amd64.whl
MyLib-0.5.0-cp310-cp310-manylinux_2_34_x86_64.whl
MyLib-0.5.0-cp36-cp36m-manylinux_2_28_x86_64.whl
MyLib-0.5.0-cp312-cp312-manylinux_2_34_x86_64.whl

Each of these binary distribution wheel files have different Python requirement. However, the release version is 0.5.0.

PyPi assumes Python requirements for all these as 3.10.

If we examine the Jason response (https://pypi.org/pypi/MyLib/0.5.0/json), it is:

        "python_version": "cp311",
        "requires_python": "==3.10.*",

and so on.

This causes problems with pip, as it is not able to find the matching wheel files.

My Platform
My Platforms are variant,
Windows & several variants of Linux with varying Python and glibc installations.

Additional context
Same release with wheel files having different Python requirements.

@venkatkasirajan venkatkasirajan added bug 🐛 requires triaging maintainers need to do initial inspection of issue labels May 31, 2024
@miketheman
Copy link
Member

Please provide a real example other than a sample mylib that doesn't have the issue you're showing to help reproduce the issue.

@venkatkasirajan
Copy link
Author

venkatkasirajan commented May 31, 2024 via email

@venkatkasirajan
Copy link
Author

venkatkasirajan commented May 31, 2024

Please see this problem in the test environment:

https://test.pypi.org/pypi/QuantumRingsLib/0.5.0/json

You can see the same problem in the production environment as well.

Thanks and best regards
-Venkat-

@miketheman
Copy link
Member

Do you have an example from the production PyPI instead? The behaviors of TestPyPI may differ, specifically in the end user behavior, and are not always the same as a real production PyPI project.

@venkatkasirajan
Copy link
Author

venkatkasirajan commented Jun 3, 2024

Hi Mike,
Thanks for your attention on this problem.
I deleted the 0.5.0 files, since we had to send the link to some of our users. The json link gives the same response, which means the internals of both PyPI and TestPyPI should be the same, for this problem.

I created some subversions where the wheel files for each corresponding Python version will reside.
ex:
0.5.1 --> all Python 3.11
0.5.12 --> Python 3.12
0.5.6 --> Python 3.6
0.5.10 --> Python 3.10

This temporarily solves and pip is able to find the right wheel file and install.

I will upload again and let you know.

Thanks for the help.

@di
Copy link
Member

di commented Sep 19, 2024

Closing this as a duplicate of #8090, which is the root cause of this issue.

@di di closed this as completed Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 requires triaging maintainers need to do initial inspection of issue
Projects
None yet
Development

No branches or pull requests

3 participants