PEP 508, environment markers & the possibility of Python 3.10

Hi folks, In https://github.com/python/peps/issues/560, a user pointed out that the current definition of python_version in PEP 508 assumes single-digit major and minor version numbers: platform.python_version()[:3] There's a reasonable chance we'll see 3.10 rather than 4.0 in a few years time, at which point that definition would break. The suggested fix is to amend that definition to be: ".".join(platform.python_version_tuple()[:2]) This seems like a good suggestion to me, so my inclination is to handle this in a similar way to https://www.python.org/dev/peps/pep-0440/#summary-of-changes-to-pep-440: fix it in place, and add a section at the end of the PEP listing the post-publication changes. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia

+1 to all of that. On Sat, Jan 27, 2018 at 9:44 PM, Nick Coghlan <ncoghlan@gmail.com> wrote:
Hi folks,
In https://github.com/python/peps/issues/560, a user pointed out that the current definition of python_version in PEP 508 assumes single-digit major and minor version numbers:
platform.python_version()[:3]
There's a reasonable chance we'll see 3.10 rather than 4.0 in a few years time, at which point that definition would break.
The suggested fix is to amend that definition to be:
".".join(platform.python_version_tuple()[:2])
This seems like a good suggestion to me, so my inclination is to handle this in a similar way to https://www.python.org/dev/peps/pep-0440/#summary-of-changes-to-pep-440: fix it in place, and add a section at the end of the PEP listing the post-publication changes.
Cheers, Nick.
-- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig
-- Nathaniel J. Smith -- https://vorpus.org

On Sun, 28 Jan 2018 at 11:15 Nick Coghlan <ncoghlan@gmail.com> wrote:
Hi folks,
In https://github.com/python/peps/issues/560, a user pointed out that the current definition of python_version in PEP 508 assumes single-digit major and minor version numbers:
platform.python_version()[:3]
There's a reasonable chance we'll see 3.10 rather than 4.0 in a few years time, at which point that definition would break.
The suggested fix is to amend that definition to be:
".".join(platform.python_version_tuple()[:2])
This seems like a good suggestion to me, so my inclination is to handle this in a similar way to https://www.python.org/dev/peps/pep-0440/#summary-of-changes-to-pep-440: fix it in place, and add a section at the end of the PEP listing the post-publication changes.
Cheers, Nick.
-- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig
+1 from me too! :)

Hasn't Guido said publicly that 4.0 would be the next version from 3.9 (since he hates double digits)? Nick Coghlan kirjoitti 28.01.2018 klo 07:44:
Hi folks,
In https://github.com/python/peps/issues/560, a user pointed out that the current definition of python_version in PEP 508 assumes single-digit major and minor version numbers:
platform.python_version()[:3]
There's a reasonable chance we'll see 3.10 rather than 4.0 in a few years time, at which point that definition would break.
The suggested fix is to amend that definition to be:
".".join(platform.python_version_tuple()[:2])
This seems like a good suggestion to me, so my inclination is to handle this in a similar way to https://www.python.org/dev/peps/pep-0440/#summary-of-changes-to-pep-440: fix it in place, and add a section at the end of the PEP listing the post-publication changes.
Cheers, Nick.

On 28 January 2018 at 22:12, Alex Grönholm <alex.gronholm@nextday.fi> wrote:
Hasn't Guido said publicly that 4.0 would be the next version from 3.9 (since he hates double digits)?
No, he overcame that aversion when we published 2.7.10. So while the assumption was that Guido wouldn't allow 3.10 back when I wrote https://developers.redhat.com/blog/2014/09/17/why-python-4-0-wont-be-like-py..., the current status is that we won't make a firm decision either way until after the 3.9 maintenance branch is created. There are downsides either way, and weighing them up depends on external factors (like the state of Linux distro migrations) where we won't have access to good information until the decision needs to be made. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
participants (4)
-
Alex Grönholm
-
Nathaniel Smith
-
Nick Coghlan
-
Pradyun Gedam