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.
This commit is contained in:
Vincent Philippon 2017-04-11 09:17:01 -04:00 committed by Donald Stufft
parent 7ca8985b8f
commit 6f5d594ca2
1 changed files with 3 additions and 3 deletions

View File

@ -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