[Catalog-sig] Case sensitivity of package names
Jim Fulton
jim at zope.com
Thu Jul 12 21:02:10 CEST 2007
On Jul 12, 2007, at 2:43 PM, Phillip J. Eby wrote:
> At 02:15 PM 7/12/2007 -0400, Jim Fulton wrote:
>> I want to make sure I understand this. I would hope that searching
>> would be case insensitive and otherwise flexible wrt names.
>
> PyPI's searching is indeed case insensitive, and is a substring/
> keyword search as well.
>
>
>> Is there
>> any reason we can't expect URLs and requirement specifications to be
>> precisely spelled? That is, if someone names their package "sPaM", I
>> see no reason why PyPI needs to support anything other than
>> http:// www.python.org/pypi/sPaM as the one URL of the package.
>> Someone
>> should be able to use the search UI to search for "spam" and see a
>> result that includes "sPaM". From then on, they should be able to
>> type the name "sPaM". Or am I missing something?
>
> You're missing that the subject is about similarity of names.
> A typo of say, 'SPam' shouldn't return me some package *other*
> than the one I'm looking for. I
No, I understand that part. I understand the desire to avoid
conflicts that cause problems down the road. I would prefer to
"disallow" this by rejecting new package names that are too similar
to already-registered packages.
> t'd be nice if the resulting page said something besides "Not
> Found", too... like "there's no SPam, but here are a bunch of
> packages whose name contains 'spam'".
I think this would be fine in a human interface.
> If it did that, setuptools would be able to find the right page
> without hitting the main index, too. But redirection, as proposed
> by Martin, also accomplishes the same thing.
I really don't like this for setuptools. My preference is that
setuptools should be required to ask for a package with precise
spelling.
> And again, all this helps human direct users of the index, too.
I think it encourages humans to do bad things. Is someone misspells
ZODB3 as zodb3 and is able to install it with easy_install, then
they'll be tempted to use the name "zodb3" in their requirements
specifications. That is a bad thing IMO. We're talking about
technical users and I think it is reasonable to expect them to be
precise in their specifications.
I could live with case-insensitive package names if we (for some
definition of we, possibly being Guido) decided we want them, but I'd
prefer they be case sensitive. I'd still be in favor of avoiding
confusing duplicates. If we stick with case-sentitive package names,
then I'd prefer that the interaction of setuptools with the index be
case sensitive.
I wouldn't object to setuptools giving people help. So, for example,
if I type "zodb3", I wouldn't object to setuptools letting the user
know that maybe they should use ZODB3.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Catalog-SIG
mailing list