-
Notifications
You must be signed in to change notification settings - Fork 252
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
Python 3.10: _version_nodot, interpreter_version disagree on how to format it #308
Comments
Yeah, this is going to be a tricky one since going against |
Could try: I wonder what other things that will break. Virtualenv? setuptools? |
I'm pretty sure we should fix this upstream in CPython itself. |
CPython issue and PR submitted. |
Hi, I quickly checked the PR against my build suite. It's late and therefore I cannot investigate an in-depth error, but here's what I got when compiling orjson from source File "/tmp/pip-build-env-gkq1mzl2/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 179, in get_tag
assert tag == supported_tags[0], "%s != %s" % (tag, supported_tags[0])
AssertionError: ('cp3_10', 'cp310', 'linux_x86_64') != ('cp310', 'cp310', 'linux_x86_64')
----------------------------------------
ERROR: Failed building wheel for maturin
Failed to build maturin
---------------------------------------- |
@Gelbpunkt when you have some time could you see if the fix in python/cpython#20333 fixes the problem? |
I was using that one and had the issue, that's what I was referring to. |
It turns out my cursory check of bdist_wheel.get_abi_tag was mistaken: it first checks the value of |
Right, but if we start patching around it here it can still lead to skew. As you pointed out, "SOABI" and "py_version_nodot" will not match what others do if they read these directly. The key thing is we be consistent with PEP 425 and in that instance it says CPython uses "py_version_nodot" for the interpreter tag. As for So if this doesn't change upstream then we may need to choose between doing the change ourselves and hope people all agree or revert the |
With the latest changes to the PR, my |
@Gelbpunkt it worked for me, this runs to completion with no error:
and the produced wheel has the name |
@Gelbpunkt |
@mattip try lru-dict, that's pure C and won't require you to use rust-nightly.
I compiled CPython from the master branch with the PR #20333 half an hour ago. |
Are you sure you are using wheel from the HEAD of the git repo? It should not have pep425 in bdist_wheel.py, rather packaging. |
My instructions above were wrong, it should be
|
I'm using that version of wheel (with packaging) and it gives me the error regardless. Probably because I'm doing |
What platform are you on? I am using linux. |
As stated in the original issue, I'm on Linux as well. |
The code in bdist_wheel is pretty straightforward. Could you add a |
@mattip I got further: Cython and other stuff builds, the issue seems to be within maturin itself, which does not even build (probably due to this), which they got from here. Removing the bdist_wheel override in the setup makes it buid as |
This issue is delaying testing of python 3.10. I am not sure if it is more work to remove this clause when determining |
A python 3.10 wheel would produce a wheel with the platform tag as `cp310`, which would be invalid, as only 3_10 is accepted by the wheel package. See: pypa/packaging#308 pypa/wheel#354 python/cpython#20333
I'm going to see if I can't push to get the CPython PR resolved before the end of the core dev sprint. |
Quick report:
|
Can this be closed now that #355 has been merged? |
Yup. |
There is a problem building and using wheels for python 3.10 xref pypa/wheel#354 and pypa/pip#8312. I think the source of the problem is that wheel's
bdist_wheel
callstags.interpreter_version
. Buttags.interpreter_version
seems to be producing310
, which it will take fromsysconfig.get_config_var("py_version_nodot")
(if it exists), and there is no check that is conformant with the3_10
format.Internally, packaging uses
tags._version_nodot
which will always produce3_10
, this is the "correct" value used by pip and intags.sys_tags
.This is the code that generates that value for CPython master. Note there is no '_'
The text was updated successfully, but these errors were encountered: