On 19 May 2014 23:44, "Donald Stufft" <don...@stufft.io> wrote: > > Currently PEP440 has a version specifier syntax like > ``foo (2,~=2,==2,!=2,>=2,<=2,>2,<2)``. This is a hold over from PEP 345 of > which I cannot locate a rationale for this change.
It's at least in part to reduce ambiguity when listing multiple dependencies as a list, rather than as line separated: foo(~=2,!=2.3.x), bar(~=3,!=3.5.4.x) That's why my initial reaction to the various aspects of the proposal was: +1 to dropping the default comparison operator now we have "~=" as an explicit spelling +1 for dropping the space between the package name and the opening parenthesis (to be honest, I thought it was already at least optional , but the PEP may not make that clear) +0 for making the parentheses optional when only using a single comparison operator -0.5 for making the parentheses optional when using multiple comparison operators On reflection, however, I'm switching back to "-1" for the latter two points. That's a UI issue for user facing formats that has no place in the data interchange specification. By contrast, the space is entirely redundant given the parentheses, so it makes sense to me to drop it from the interchange format. Allowing users to optionally include whitespace in version specifiers then joins the ability to omit the parentheses as a tooling UI decision that doesn't apply to the interchange standards. Remember, the metadata PEPs are about specifying the *normalised* forms that are exchanged between automated tools. User facing tools are free to be more liberal in what they accept and handle the normalisation on their users' behalf. Cheers, Nick.
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig