[Distutils] Replacing pkg_resources with distlib in pip

Vinay Sajip vinay_sajip at yahoo.co.uk
Tue Apr 23 22:39:18 CEST 2013


Donald Stufft <donald <at> stufft.io> writes:


> > released distlib is treated as 2.0, whereas for pip I had to change it to
> > 1.3.
> 
> This part worries me. I don't think should maintain any patches for things
inside of pip.vendor.

Well, the pip test data includes some distributions which include the
post-1.2 metadata fields and have a metadata version of "1.3". The upstream
distlib version is 2.0 (though the format is still key-value, pending
changes to PEP 426). My aim was to limit changes to pip to just
pkg_resources -> pip.vendor.distlib.pkg_resources. Without my renaming "2.0"
to "1.3", some of the pip tests fail because Metadata version 1.3 is
unrecognised.

Note that pip.vendor.distlib.pkg_resources is a custom shim module to cover
pip's use of pkg_resources - it's not a generic replacement for
pkg_resources (because I am only currently interested in supplanting use of
pkg_resources by pip, and not in a wider sphere). Thus it is not part of
upstream distlib (of course, it could be moved to somewhere else in the pip
package hierarchy).

Regards,

Vinay Sajip



More information about the Distutils-SIG mailing list