[Distutils] New PEP : dependency specification

Robert Collins robertc at robertcollins.net
Fri Nov 6 15:11:41 EST 2015


Here's an update I just pushed into git that addresses the defects found so far.

diff --git a/dependency-specification.rst b/dependency-specification.rst
index f8171d8..486636d 100644
--- a/dependency-specification.rst
+++ b/dependency-specification.rst
@@ -73,7 +73,7 @@ the dependency can be made conditional using
environment markers.
 Grammar
 -------

-We first cover the grammar briefly and the drill into the semantics of each
+We first cover the grammar briefly and then drill into the semantics of each
 section later.

 A distribution specification is written in ASCII text. We use ABNF [#abnf]_ to
@@ -92,7 +92,7 @@ URI is defined in std-66 [#std66]_::

     version-cmp   = "<" / "<=" / "!=" / "==" / ">=" / ">" / "~=" / "==="
     version       = 1*( DIGIT / ALPHA / "-" / "_" / "." / "*" )
-    versionspec   = version-cmp version *(',' version-cmp version)
+    versionspec   = ["("] version-cmp version *(',' version-cmp version) [")"]
     urlspec       = "@" URI

 Environment markers allow making a specification only take effect in some
@@ -179,7 +179,9 @@ Versions
 See PEP-440 [#pep440]_ for more detail on both version numbers and version
 comparisons. Version specifications limit the versions of a distribution that
 can be used. They only apply to distributions looked up by name, rather than
-via a URL. Version comparison are also used in the markers feature.
+via a URL. Version comparison are also used in the markers feature. The
+optional brackets around a version are present for compatibility with PEP-345
+[#pep345]_ but should not be generated, only accepted.

 Environment Markers
 -------------------
@@ -302,7 +304,7 @@ Backwards Compatibility
 Most of this PEP is already widely deployed and thus offers no compatibiltiy
 concerns.

-There are however two key points where the PEP differs from the deployed base.
+There are however a few points where the PEP differs from the deployed base.

 Firstly, PEP-440 direct references haven't actually been deployed in the wild,
 but they were designed to be compatibly added, and there are no known
@@ -320,15 +322,21 @@ permitting reasonably graceful upgrade. The new
version comparisons will cause
 errors, so adoption may require waiting some time for deployment to be
 widespread.

+Thirdly, PEP-345 required brackets around version specifiers. In order to
+accept PEP-345 dependency specifications, brackets are accepted, but they
+should not be generated.
+
 Rationale
 =========

 In order to move forward with any new PEPs that depend on environment markers,
-we needed a specification that included them.
+we needed a specification that included them in their modern form. This PEP
+brings together all the currently unspecified components into a specified
+form.

 The requirement specifier EBNF is lifted from setuptools pkg_resources
-documentation, since we can't sensible depend on a defacto standard.
-
+documentation, since we wish to avoid depending on a defacto, vs PEP
+specified, standard.

 References
 ==========


-Rob

--
Robert Collins <rbtcollins at hp.com>
Distinguished Technologist
HP Converged Cloud


More information about the Distutils-SIG mailing list