> On Dec 16, 2014, at 10:25 PM, Ethan Furman <et...@stoneleaf.us> wrote:
> 
> On 12/16/2014 06:48 PM, Donald Stufft wrote:
>> 
>> Now if you have 1.3+debian1 installed via apt-get (or any means really), and 
>> you’ll get the following behaviors (show with pip):
>> 
>> - pip install yourthing -> 1.3+debian1 satisfies the constraint of anything, 
>> so it stays installed.
>> - pip install yourthing==1.3 -> 1.3+debian1 satisfies the constraint of 
>> ==1.3, so it stays installed.
>> - pip install yourthing>=1.3 -> 1.3+debian1 satisfies the constraint of >= 
>> 1.3, so it stays installed.
>> - pip install yourthing>=1.4 -> 1.3+debian1 does not satisfy the constraint 
>> of >=1.4, so pip will upgrade it to 1.4.
>> - pip install —upgrade youthing -> You’ve requested an upgrade, so pip will 
>> see 1.4 exists and will install it.
>> - pip install —upgrade yourthing==1.3 -> You’ve requested an upgrade, but 
>> there’s nothing newer than 1.3+debian1 that matches the constraint so it 
>> stays installed
>> - pip install -upgrade youthing>=1.3 -> You’ve requested an upgrade, pip 
>> will see 1.4 exists and satisfies the constraint and will install it.
>> - pip install —upgrade yourthing>1.4 -> you’ve requested an upgrade and 
>> 1.3+debian1 is not >= 1.4, so pip will see 1.4 exists and install it.
>> 
>> Does that make sense?
> 
> Yes.  Thank you for that _very_ thorough explanation.  :)
> 
> To continue with Maurits' use-case, in order to get /exactly/ 1.3, '===' is 
> the operator to use?  Or are we still
> discussing that?  Personally, I think
> 
>  pip install yourthing is 1.3
> 

Currently the === operator will give you that, but it’s not really designed for 
that. It’s designed as an escape hatch for versions we can’t parse. An example 
of where this matters is that ==1.3 will match version 1.3.0, but ===1.3 will 
not. So if we want something better than that for “give me exactly 1.3 without 
any patches” then that’s under discussion.

And to answer your other question yes, there is no promises that 1.4 contains 
whatever patches 1.3+debian1 is carrying ontop of 1.3. Those patches might not 
even be acceptable changes upstream. For instance pip bundles it’s dependencies 
but debian unbundles them. That kind of patch would not be accepted upstream so 
in pip’s case Debian would always have a local version (assuming they actually 
use the local versions and don’t just ignore them).

---
Donald Stufft
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to