[Distutils] unparseable sdist filenames

holger krekel holger at merlinux.eu
Mon Sep 30 21:31:23 CEST 2013


On Mon, Sep 30, 2013 at 10:55 -0700, Marcus Smith wrote:
> so, take a case like so  "pytest-xdist-dev.tar.gz" (or any sdist with "-"
> in the project name, and a version starting with a string)
> 
> I think it's like so:
> - pkg_resources.Distribution.from_location will treat "xdist-dev" as the
> version.
> - distlib.util.split_filename won't parse it because versions have to start
> with [0-9].
> - pip will accept this as a "pytest" archive and install it potentially if
> no other version matches greater.
> 
> what's the right answer?

IMO it should be ignored, i.e. be rejected as a candidate for installation.
(If pointing pip to the local file it's different of course).
This particular name isn't a real-life use case, is it?

best,
holger

> The historical-compatible answer is to be confused when projects have "-".
> so stay confused? or get rigid like distlib?


> 
> Marcus

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



More information about the Distutils-SIG mailing list