Skip to content

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

Closed
zooba wants to merge 21 commits into
python:masterfrom
zooba:mattip-py_version_nodot
Closed

zooba wants to merge 21 commits into
python:masterfrom
zooba:mattip-py_version_nodot

Conversation

@zooba

@zooba zooba commented Oct 21, 2020

Copy link
Copy Markdown
Member

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 matti.picus@gmail.com

https://bugs.python.org/issue40747

Comment thread PC/pyconfig.h
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
Copy Markdown
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
Copy Markdown
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).

Comment thread PCbuild/pcbuild.proj Outdated
Comment thread PCbuild/python.props Outdated

@ericsnowcurrently ericsnowcurrently left a comment

Copy link
Copy Markdown
Member

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

zooba commented Oct 22, 2020

Copy link
Copy Markdown
Member Author

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).

Comment thread Doc/extending/windows.rst Outdated
@encukou

encukou commented Oct 29, 2020

Copy link
Copy Markdown
Member

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
Copy Markdown
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

zooba commented Nov 2, 2020

Copy link
Copy Markdown
Member Author

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
Copy Markdown
Member

@hroncok

hroncok commented Nov 24, 2020

Copy link
Copy Markdown
Contributor

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

zooba commented Dec 11, 2020

Copy link
Copy Markdown
Member Author

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