<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 22, 2014, at 3:20 PM, Marcus Smith <<a href="mailto:qwcode@gmail.com" class="">qwcode@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class="">In PEP440,  foo-X.Y.Z does not satisfy the specifier  "foo>X.Y" (although it satisfies "foo>=X.Y")<br class=""><br class=""></div><div class="">for example,  foo-1.7.2 will not satisfy  "foo>1.7", but it will satisfy "foo>=1.7"</div><div class=""><br class=""></div>for '>' and '<', PEP440 states that they are  "interpreted as implying the prefix based version
exclusion clause
     <tt class="">
      != V.*"</tt><br class=""><br class=""></div><div class="">the rationale from Donald for this is explained here:  <a href="https://bitbucket.org/pypa/setuptools/issue/301/101-in-requirementparse-foo-10-results" target="_blank" class="">https://bitbucket.org/pypa/setuptools/issue/301/101-in-requirementparse-foo-10-results</a><br class=""><br class=""></div><div class="">in brief, this was done to avoid pre-releases (i.e. something like "foo-1.7a1") satisfying "foo<1.7".   <br class=""><br class=""></div><div class="">It seems to me we've just traded one confusion for another, and this seems worse (to me at least, although I'm trying to let it sink in)<br class=""><br class="">1.7.2 is greater than 1.7, and the specifiers should honor that.  It's hard to accept otherwise.<br class=""><br class=""></div><div class="">Yes, it's true in the past, when people would get a pre-release installed (for example 1.7a1), when they really wanted something in the 1.6.X series, that was also confusing.  But now that pip now excludes pre-releases by default, it seems that confusion is mostly solved practically speaking, so why solve it (and create a new confusion)?<br class=""></div><div class=""><br class=""></div></div></div></blockquote><br class=""></div><div>It’s true that pip doesn’t install pre-releases by default (assuming there is any final releases available), but that doesn’t actually solve the underlying problem - it just masks it. When people put ``foo<8`` in their install_requires they generally do not expect to get ``8.0.dev0``, and in my opinion, they shouldn’t get ``8.0.dev0`` even if someone uses —pre.</div><div><br class=""></div><div>In a way, we have replaced one confusion for another, although I do not believe it to be that bad and I believe that the current situation is better because:</div><div><br class=""></div><div>* In my searches of github and my experience, use of the > instead of >= is fairly limited, meanwhile use of < to mean how it’s interpreted now is far more common.</div><div>* The new behavior maintains consistency between < and >, so that specifiers that “look” the same act the same, maintaining consistency between them.</div><div>* I think that having the > and < behavior vary is a *worse* confusion, and I believe that the behavior of < is far better than previous.</div><div><br class=""></div><div>In particular, <, >, ~=, and, when using a .*, the != and == use the number of dots in the given specifier to indicate the precision of the specifier.</div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">---</div><div class="">Donald Stufft</div><div class="">PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA</div></div></div>
</div>
<br class=""></body></html>