#16017: createsuperuser fails if Python can't detect default locale
-------------------------------------+-------------------------------------
     Reporter:  prestontimmons       |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Core (Management     |                  Version:  1.4
  commands)                          |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  dceu2011             |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  1
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  1                    |
-------------------------------------+-------------------------------------

Comment (by bill@…):

 Hey, I'm a Django newbie, so my judgement may not be sound.  But I want to
 offer an opinion (or two...)

 There are valid secondary questions about Django behavior and Python
 behavior regarding the default locale values.  The primary question (to
 me) is this:  There is a bug in Django, because the Django code does not
 check the validity of the expression it passes into decode().  What is the
 best way to fix it?

 I suggest making a one-token change as follows.  Add TypeError to the
 kinds of exceptions that are caught and handled at this point in the code:
 {{{
   NEW  line 86:        except (TypeError, ImportError, KeyError,
 UnicodeDecodeError):

   PRESENT line 86:     except ( ImportError, KeyError,
 UnicodeDecodeError):
 }}}

 My thinking is that (1) the code is prepared to receive exceptions at this
 point, and gracefully recovers from them (see line 91), this is a
 reasonable workaround for the lack of checking of the argument to
 decode(), and (3) this fix allows manage.py and the tutorial to run
 without error.

 ---

 In my opinion, it is crucially important that Django fix this ASAP.  I
 really want to use Django, because people I respect say it is great.  But
 the tutorial is dead in the water without a fix for this.  And great code
 does not have a dead tutorial.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16017#comment:38>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to