From 6f5d594ca2fedd00e2da3ccc2762fb083eb4bb7c Mon Sep 17 00:00:00 2001 From: Vincent Philippon Date: Tue, 11 Apr 2017 09:17:01 -0400 Subject: [PATCH] PEP-508: Fix imprecisions about `python_version` (#240) * Change the specification example to be clearer. Previously, we compared python_version < "2.7.10". As python_version only keeps the major and minor number (2.7, 3.2), it could lead to unexpected behaviour when comparing to 3-parts versions. Changing the example might reduce the risk of making that small but confusing mistake. * Fix mistake in Backwards Compatibility about python_version. In this section, it said: "handle version comparisons with python_version "2.7.10" differently." while is should have mentionned python_full_version, as python_version will never have a 3-part version value. --- pep-0508.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pep-0508.txt b/pep-0508.txt index 945bdbcc9..a431edee9 100644 --- a/pep-0508.txt +++ b/pep-0508.txt @@ -53,7 +53,7 @@ Examples All features of the language shown with a name based lookup:: - requests [security,tests] >= 2.8.1, == 2.8.* ; python_version < "2.7.10" + requests [security,tests] >= 2.8.1, == 2.8.* ; python_version < "2.7" A minimal URL based lookup:: @@ -324,8 +324,8 @@ permitted to be present in PyPI uploaded distributions anyway. Secondly, PEP-426 markers which have had some reasonable deployment, particularly in wheels and pip, will handle version comparisons with -``python_version`` "2.7.10" differently. Specifically in 426 "2.7.10" is less -than "2.7.9". This backward incompatibility is deliberate. We are also +``python_full_version`` "2.7.10" differently. Specifically in 426 "2.7.10" is +less than "2.7.9". This backward incompatibility is deliberate. We are also defining new operators - "~=" and "===", and new variables - ``platform_release``, ``platform_system``, ``implementation_name``, and ``implementation_version`` which are not present in older marker