[Distutils] Proposal: Restrict the characters in a project name

Donald Stufft donald at stufft.io
Wed May 15 06:45:35 CEST 2013


On May 15, 2013, at 12:36 AM, Daniel Holth <dholth at gmail.com> wrote:

> >= would certainty not be a valid name. So I agree with you about restrictions except possibly on the set of allowed characters.
> 
> Of course the weird names aren't on pypi yet, the current tooling has bad Unicode support.
> 
> Pep 3131 pretty much sums up this issue and the objections exactly, if you search/replace. It begins:
> 
> Python code is written by many people in the world who are not familiar with the English language, or even well-acquainted with the Latin writing system. Such developers often desire to define classes and functions with names in their native languages, rather than having to come up with an (often incorrect) English translation of the concept they want to name. By using identifiers in their native language, code clarity and maintainability of the code among speakers of that language improves.
> 
The contexts are different. It's unlikely that someone in the same codebase is going to attempt to trick you into running function named fοο instead of foo (those are different by the way). However it is a very simple attack to tell newcomers to ``pip install Djangο`` instead of ``pip install Django`` (again different).

-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130515/76627ae6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130515/76627ae6/attachment.pgp>


More information about the Distutils-SIG mailing list