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

bpo-40747: Make py_version_nodot 3_10 not 310 (PEP 641) #22858

Closed
wants to merge 21 commits into from

Conversation

zooba
Copy link
Member

@zooba zooba commented Oct 21, 2020

Implement PEP 641, and fixes pypa/packaging#308, pypa/wheel#354, and maybe pypa/pip#8312. The current value of 310 is ambiguous so use 3_10 or 3.10 as appropriate.

Also cleans up some woefully out-of-date documentation.

Co-authored-by: mattip [email protected]

https://bugs.python.org/issue40747

@@ -269,11 +269,11 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
file in their Makefile (other compilers are
generally taken care of by distutils.) */
# if defined(_DEBUG)
# pragma comment(lib,"python3_10_d.lib")
# pragma comment(lib,"python3.10_d.lib")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn’t it be better to consistently use _ everywhere? Then no one has to think which to use.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other platforms already use dots in the equivalent filename. We decided on consistency there (though if I can't fix the crashes, we may roll back this part entirely and just change packaging stuff).

PCbuild/pcbuild.proj Outdated Show resolved Hide resolved
PCbuild/python.props Outdated Show resolved Hide resolved
Copy link
Member

@ericsnowcurrently ericsnowcurrently left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (I guess 😄)

Nothing jumped out at me after a quick read through the changes. However, I am not very familiar with this stuff. (Presumably you've exercised all this by hand and it works.) Also, I haven't checked for anything in the code base you might have missed (but am not sure what I'd look for).

If you can find someone more familiar with this stuff you might want another opinion before merging. 😄

@zooba
Copy link
Member Author

zooba commented Oct 22, 2020

Thanks Eric! There's still a PEP to approve, which will attract more eyes I'm sure (plus a discussion at the sprints about whether it's worth changing everything away from "310" or not).

Doc/extending/windows.rst Outdated Show resolved Hide resolved
@encukou
Copy link
Member

encukou commented Oct 29, 2020

It seems not all instances of 310 are actually replaced -- when I built and installed Python with the PR, I still got filenames like __pycache__/os.cpython-310.pyc.

@brettcannon
Copy link
Member

@encukou I honestly don't think the .pyc file names need updating (although they can be if people want to put in the effort). That is entirely an implementation detail that no normal person should ever look at or care about.

@zooba
Copy link
Member Author

zooba commented Nov 2, 2020

I honestly don't think the .pyc file names need updating (although they can be if people want to put in the effort). That is entirely an implementation detail that no normal person should ever look at or care about.

What is the proposed tag for v31.0 then? There are a number of other names that qualify as an implementation detail, so we should be consistent about updating all or none.

Another alternative to this whole patch is to just override the wheel tag generation code (wherever that is...), rather than changing any of the internal variables at all.

@brettcannon
Copy link
Member

@hroncok
Copy link
Contributor

hroncok commented Nov 24, 2020

Another alternative to this whole patch is to just override the wheel tag generation code (wherever that is...)

pypa/packaging#354 or pypa/packaging#355

hroncok added a commit to hroncok/packaging that referenced this pull request Nov 24, 2020
hroncok added a commit to hroncok/packaging that referenced this pull request Nov 24, 2020
@zooba
Copy link
Member Author

zooba commented Dec 11, 2020

The PEP has been rejected.

@zooba zooba closed this Dec 11, 2020
@zooba zooba deleted the mattip-py_version_nodot branch December 11, 2020 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python 3.10: _version_nodot, interpreter_version disagree on how to format it
9 participants