[Distutils] Replacing pkg_resources with distlib in pip

Daniel Holth dholth at gmail.com
Tue Apr 23 22:51:10 CEST 2013


On Tue, Apr 23, 2013 at 4:39 PM, Vinay Sajip <vinay_sajip at yahoo.co.uk> wrote:
> 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

Metadata 2.0 was Metadata 1.3 for a time of course.

The document specifies "warn only when (minor) version is not
recognized" though technically that is not a thing for the 1.x series.

The pkg_resources included in Ubuntu 13.04 understands the killed
key/value Metadata-2.0-with-requirements.


More information about the Distutils-SIG mailing list