osupython / pip2

Experimental port of pip from distutils to distutils2.
http://pip2.readthedocs.org/
MIT License
18 stars 11 forks source link

Prefer non-stdlib libraries if installed #66

Closed njwilson closed 12 years ago

njwilson commented 12 years ago

Our compat.py currently imports packaging/ unittest.mock from the standard library in Python 3.3+ and the third-party distutils2/mock (not from the standard library) in older versions.

This comment from Éric Araujo on the distutils-sig mailing list makes me think we should always prefer/import the third-party versions (distutils2 and mock) if they are installed, otherwise fall back to the stdlib versions: "In the worst case packaging 1.0 in Python 3.3 will work for simple cases and people will be able to use it to install a newer version of distutils2."

njwilson commented 12 years ago

@merwok, does this seem like the right approach?

merwok commented 12 years ago

Sounds good. If at one time you depend on things that are not in packaging in 3.3, then you will depend on distutils2 X.Y for 3.3 too and remove the import packaging.