Re: Unicode normalization for username field

2016-05-19 Thread charettes
Hi David, I agree with your reasoning but I think you're missing an important detail about unicode username support: they have been mistakenly enabled on Python 3 since Django added support for it (1.5-1.6). If we were to disallow non-ASCII characters silently from Django 1.10 Python 3 develop

Re: Unicode normalization for username field

2016-05-19 Thread David Tan
> > - I'm afraid this change may result in boilerplate as most custom user > models will revert to Django's historical (and in my opinion sensible) > username validation rules. > That's a tough question to estimate. This might be true for most English monolingual web sites, but not necessaril

Re: Unicode normalization for username field

2016-05-14 Thread Claude Paroz
Le jeudi 12 mai 2016 18:45:15 UTC+2, Tim Graham a écrit : > > Just to be sure, do you mean django.db.migrations (referencing the > appropriate validator in the migration file, I guess?) or some problem a > project would face when migrating from Python 2 to 3? > Both things, hopefully not an issu

Re: Unicode normalization for username field

2016-05-12 Thread Tim Graham
Just to be sure, do you mean django.db.migrations (referencing the appropriate validator in the migration file, I guess?) or some problem a project would face when migrating from Python 2 to 3? On Monday, May 9, 2016 at 4:00:27 PM UTC-4, Claude Paroz wrote: > > Le lundi 9 mai 2016 14:48:06 UTC+2

Re: Unicode normalization for username field

2016-05-09 Thread Claude Paroz
Le lundi 9 mai 2016 14:48:06 UTC+2, Tim Graham a écrit : > > Rather than change the behavior of Python 2 near its last supported > version of Django, I would make the default validator ASCII on Python 2 and > Unicode on Python 3. > I can buy this, providing we don't face migration issues. Claud

Re: Unicode normalization for username field

2016-05-09 Thread Tim Graham
Rather than change the behavior of Python 2 near its last supported version of Django, I would make the default validator ASCII on Python 2 and Unicode on Python 3. On Tuesday, May 3, 2016 at 9:29:06 AM UTC-4, Rick Leir wrote: > > Hi all > Could there be a consensus with > -default to ASCII > -o

Re: Unicode normalization for username field

2016-05-03 Thread Rick Leir
Hi all Could there be a consensus with -default to ASCII -optionally, UTF8 with normalization -based on Claude's code -Python 3 required so we are not distracted by compatibility issues Cheers -- Rick -- You received this message because you are subscribed to the Google Groups "Django developers

Re: Unicode normalization for username field

2016-04-25 Thread Aymeric Augustin
On 25 Apr 2016, at 20:31, Shai Berger wrote: > > On Monday 25 April 2016 21:11:51 Aymeric Augustin wrote: >> >> It’s a -0 from me, not a -1, and it may turn into a +0 as time passes... >> More arguments or opinions, especially backed by data or experience, would >> certainly be useful. > > As f

Re: Unicode normalization for username field

2016-04-25 Thread Shai Berger
On Monday 25 April 2016 21:11:51 Aymeric Augustin wrote: > > It’s a -0 from me, not a -1, and it may turn into a +0 as time passes... > More arguments or opinions, especially backed by data or experience, would > certainly be useful. As far as I can see, the force of the push to use non-ASCII use

Re: Unicode normalization for username field

2016-04-25 Thread Aymeric Augustin
Hi Claude, On 24 Apr 2016, at 20:58, Claude Paroz wrote: > > Le samedi 23 avril 2016 14:33:56 UTC+2, Aymeric Augustin a écrit : > > You added a username_validator attribute instead of documenting how to > override the whole username field. Can you elaborate on this decision? I > simplifies th

Re: Unicode normalization for username field

2016-04-25 Thread Erik Cederstrand
> Den 24. apr. 2016 kl. 20.58 skrev Claude Paroz : > > - I'm afraid this change may result in boilerplate as most custom user models > will revert to Django's historical (and in my opinion sensible) username > validation rules. > > That's a tough question to estimate. This might be true for m

Re: Unicode normalization for username field

2016-04-24 Thread Claude Paroz
Hi Aymeric, Le samedi 23 avril 2016 14:33:56 UTC+2, Aymeric Augustin a écrit : > > > https://github.com/django/django/pull/6494 > > This patch looks pretty good. I have a few questions, not necessarily > because I disagree with your proposal, but to make sure we have considered > alternatives.

Re: Unicode normalization for username field

2016-04-23 Thread Aymeric Augustin
Hi Claude, > Le 23 avr. 2016 à 00:04, Claude Paroz a écrit : > > Le vendredi 22 avril 2016 14:25:59 UTC+2, Here's some code, unpolished, but a > base for discussion. > https://github.com/django/django/pull/6494 This patch looks pretty good. I have a few questions, not necessarily because I di

Re: Unicode normalization for username field

2016-04-22 Thread Claude Paroz
Le vendredi 22 avril 2016 14:25:59 UTC+2, Claude Paroz a écrit : > > I'll see if I can find the time to work on something acceptable, allowing > people to choose either policy without too much hassle and backwards > incompatibility. Of course, anyone else could try it, too. > Here's some code,

Re: Unicode normalization for username field

2016-04-22 Thread Claude Paroz
Le jeudi 21 avril 2016 21:23:16 UTC+2, Aymeric Augustin a écrit : > > For what it’s worth, I’m in favor of restoring the intended behavior of > restricting usernames to ASCII on Python 3 and letting developers who want > something more elaborate implement their own requirements. > I'm sorry to d

Re: Unicode normalization for username field

2016-04-21 Thread Aymeric Augustin
Hello, Judging from the (rather confused) discussion on the users lists, it looks like we’re discussing in the abstract. No one has tested whether the problem can happen with Django. Since the ticket quoted below says Django (unexpectedly) accepts non-ascii usernames on Python 3, it’s just a m

Re: Unicode normalization for username field

2016-04-21 Thread Rick Leir
Thanks. To summarize quickly, (corrections please) 2008 - Usernames in django.contrib.auth are restricted to ASCII alphanumerics. Allowing Unicode seems fairly simple: compile the validator's regular expression with the re.UNICODE flag. but: http://en.wikipedia.org/wiki/Internationalized_doma

Re: Unicode normalization for username field

2016-04-21 Thread Tim Graham
Here is one: https://groups.google.com/d/topic/django-developers/6aAHgP5g0lA/discussion (all I did was search "unicode username") Here's a relevant Trac ticket: https://code.djangoproject.com/ticket/21379 On Thursday, April 21, 2016 at 11:22:54 AM UTC-4, Rick Leir wrote: > > Hi all, > We have di

Unicode normalization for username field

2016-04-21 Thread Rick Leir
Hi all, We have discussed the possibility of username spoofing in the users list. https://groups.google.com/d/msg/django-users/Q0WDYqJsBsY/Sq-P0814LwAJ "It's not important until this happens: https://labs.spotify.com/2013/06/18/creative-usernames/ But my searches did not turn up anything in t