[Catalog-sig] Case sensitivity of package names

Phillip J. Eby pje at telecommunity.com
Fri Jul 13 01:35:05 CEST 2007

At 11:38 PM 7/12/2007 +0200, Martin v. Löwis wrote:
> > I really don't like this for setuptools.  My preference is that
> > setuptools should be required to ask for a package with precise
> > spelling.
>I think the way setuptools currently works is this:
>Every name gets converted to its lower-case safe-name equivalent.
>All dependencies, file names, resource identifications etc
>are based on that version of the name, *not* the "true"
>name of the package.

Object comparisons are done case-insensitively, but the objects 
themselves keep the case-insensitive forms ('key' attributes) 
separate from the originally-input names ('project_name' attributes).

>Then, when setuptools tries to find a package whose "true"
>name is in mixed-case, it uses the lower-cased safe-named
>version, and PyPI reports that the package does not exist.
>Then, setuptools queries the entire package list, trying
>to find out the original spelling of the package.

This is almost correct, except that it actually tries to lookup 
whatever the user actually input, then the safe_name() form of 
that.  For index lookups, it does not actually change the case of 
what was entered, so if the user enters something that exactly 
matches what's on PyPI, they'll have a better chance of getting 
everything in one request....  unless there are multiple versions 
listed, of course.

More information about the Catalog-SIG mailing list