<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>PyPI already endures case insensitive uniqueness and considers - and _ the same for uniqueness checks</div><div><br>On May 15, 2013, at 12:08 PM, James Carpenter <<a href="mailto:nawkboy@gmail.com">nawkboy@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">While your at it, you might consider not allowing variation in case and dash vs. underscore when specifying a dependency. A project should have only one concrete name, without fuzziness. A fuzzy match should result in a match failure. Fuzzy matches for a manual search is a different thing.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 15, 2013 at 9:31 AM, Daniel Holth <span dir="ltr"><<a href="mailto:dholth@gmail.com" target="_blank">dholth@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
How to avoid confusables.<br>
<br>
These scripts are recommended for use in identifiers:<br>
<a href="http://www.unicode.org/reports/tr31/#Table_Recommended_Scripts" target="_blank">http://www.unicode.org/reports/tr31/#Table_Recommended_Scripts</a><br>
<br>
This report details a confusables detection algorithm:<br>
<a href="http://www.unicode.org/reports/tr39/#Confusable_Detection" target="_blank">http://www.unicode.org/reports/tr39/#Confusable_Detection</a><br>
<br>
And ICU implements it:<br>
<a href="http://www.icu-project.org/apiref/icu4c/uspoof_8h.html" target="_blank">http://www.icu-project.org/apiref/icu4c/uspoof_8h.html</a> (see also<br>
PyICU).<br>
<br>
The package index would enforce uniqueness of the "skeleton" of each<br>
registered package which is just an internal normalization based on<br>
confusability. if skeleton(identifier1) == skeleton(identifier2) then<br>
id1 and id2 are confusable.<br>
<br>
The tooling could get away with a simpler rule like<br>
re.sub("[^\w\d.]+", "_", distribution, re.UNICODE)<br>
<br>
As a bonus to including the world, this should be able to prevent<br>
people from exchanging zeroes for capital O.<br>
<div class="HOEnZb"><div class="h5"><br>
On Wed, May 15, 2013 at 7:17 AM, Eric V. Smith <<a href="mailto:eric@trueblade.com">eric@trueblade.com</a>> wrote:<br>
> On 05/15/2013 07:10 AM, Donald Stufft wrote:<br>
>>>>> Anyone want to run a scan over the PyPI package set to see<br>
>>>>> how many packages would cause problems for a "[a-zA-Z0-9_.-]"<br>
>>>>> only filter?<br>
>>>><br>
>>>> See my previous email where I did queries against my local DB.<br>
>>>> It's 225 total projects that wouldn't be allowed.<br>
>>><br>
>>> Can you send the list of those projects?<br>
>>><br>
>>> Eric.<br>
>>><br>
>><br>
>> Here you go <a href="https://gist.github.com/dstufft/5583225" target="_blank">https://gist.github.com/dstufft/5583225</a> used a Python<br>
>> oneliner and the PyPI API so others can reproduce easily if they<br>
>> wish.<br>
><br>
> Perfect. Thanks.<br>
><br>
> It looks like space causes most of the issues. I'm not sure how<br>
> "Twisted Flow >= 1.0" would be expected to parse.<br>
><br>
> Eric.<br>
><br>
><br>
> _______________________________________________<br>
> Distutils-SIG maillist - <a href="mailto:Distutils-SIG@python.org">Distutils-SIG@python.org</a><br>
> <a href="http://mail.python.org/mailman/listinfo/distutils-sig" target="_blank">http://mail.python.org/mailman/listinfo/distutils-sig</a><br>
_______________________________________________<br>
Distutils-SIG maillist - <a href="mailto:Distutils-SIG@python.org">Distutils-SIG@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/distutils-sig" target="_blank">http://mail.python.org/mailman/listinfo/distutils-sig</a><br>
</div></div></blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Distutils-SIG maillist - <a href="mailto:Distutils-SIG@python.org">Distutils-SIG@python.org</a></span><br><span><a href="http://mail.python.org/mailman/listinfo/distutils-sig">http://mail.python.org/mailman/listinfo/distutils-sig</a></span><br></div></blockquote></body></html>