[Distutils] [Python-Dev] [Python-checkins] peps: PEP 426: replace implied 'version starts with' with new =?utf-8?Q?=7E=3D_?=operator

Donald Stufft donald.stufft at gmail.com
Tue Feb 26 02:06:57 CET 2013


On Saturday, February 23, 2013 at 10:08 PM, Nick Coghlan wrote:
> The core problem with making "==" strict is that it either makes "!="
> useless by allowing "(!=1.3)" to match "1.3.1", or it breaks the
> invariant that "!=" is the logical inverse of "==", by having both
> "(==1.3)" and "(!=1.3)" reject "1.3.1". I don't consider either
> acceptable, which is why I switched the PEP to simple string prefix
> matching for both (this also brings it back into line with the default
> version comparison behaviour specified in PEP 345 - I haven't yet
> reinstated that PEPs commentary about why this makes it important to
> include the ".0" suffix on the first release in a series so people can
> easily depend specifically on that release without allowing later
> releases in the series, but I'm definitely considering it).
> 
> If a true exact version match is needed in order to be completely
> certain about avoiding potentially broken upstream releases, then you
> can use "(X.Y, < X.Y.post0)" rather than "(==X.Y)". Really though,
> that level of pre-emptive quality assurance is better handled by using
> a private curated index (or even a per-application index) where you
> don't allow new versions to be uploaded until you've already tested
> them.
> 
> 

 
!=1.3 allowing 1.3.1 makes sense to me. 1.3 is equivalent to 1.3.0, 1.3.1 != 1.3.0.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130225/8449b46b/attachment.html>


More information about the Distutils-SIG mailing list