Re: [Django] #19745: Wrong prompt for `createuser` management command ()

2013-02-08 Thread Django
#19745: Wrong prompt for `createuser` management command
()
-+-
 Reporter:  bmispelon|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  contrib.auth |  Version:
 Severity:  Release blocker  |  1.5-beta-1
 Keywords:  createuser repr py3  |   Resolution:  fixed
Has patch:  1| Triage Stage:  Ready for
  Needs tests:  1|  checkin
Easy pickings:  0|  Needs documentation:  0
 |  Patch needs improvement:  0
 |UI/UX:  0
-+-

Comment (by Claude Paroz ):

 In [changeset:"933e956ba4b1ad5f8823f0a294ffc795e949edf1"]:
 {{{
 #!CommitTicketReference repository=""
 revision="933e956ba4b1ad5f8823f0a294ffc795e949edf1"
 [1.5.x] Fixed #19745 -- Forced resolution of verbose names in
 createsupersuser

 Thanks Baptiste Mispelon for the report and Preston Holmes for the review.
 Backport of 2390fe3f4 from master.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19745: Wrong prompt for `createuser` management command ()

2013-02-06 Thread Django
#19745: Wrong prompt for `createuser` management command
()
-+-
 Reporter:  bmispelon|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  contrib.auth |  Version:
 Severity:  Release blocker  |  1.5-beta-1
 Keywords:  createuser repr py3  |   Resolution:  fixed
Has patch:  1| Triage Stage:  Ready for
  Needs tests:  1|  checkin
Easy pickings:  0|  Needs documentation:  0
 |  Patch needs improvement:  0
 |UI/UX:  0
-+-

Comment (by Claude Paroz ):

 In [changeset:"933e956ba4b1ad5f8823f0a294ffc795e949edf1"]:
 {{{
 #!CommitTicketReference repository=""
 revision="933e956ba4b1ad5f8823f0a294ffc795e949edf1"
 [1.5.x] Fixed #19745 -- Forced resolution of verbose names in
 createsupersuser

 Thanks Baptiste Mispelon for the report and Preston Holmes for the review.
 Backport of 2390fe3f4 from master.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19745: Wrong prompt for `createuser` management command ()

2013-02-06 Thread Django
#19745: Wrong prompt for `createuser` management command
()
-+-
 Reporter:  bmispelon|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  contrib.auth |  Version:
 Severity:  Release blocker  |  1.5-beta-1
 Keywords:  createuser repr py3  |   Resolution:  fixed
Has patch:  1| Triage Stage:  Ready for
  Needs tests:  1|  checkin
Easy pickings:  0|  Needs documentation:  0
 |  Patch needs improvement:  0
 |UI/UX:  0
-+-
Changes (by Claude Paroz ):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"2390fe3f4f8f52e24157d79b0c60247207c9716f"]:
 {{{
 #!CommitTicketReference repository=""
 revision="2390fe3f4f8f52e24157d79b0c60247207c9716f"
 Fixed #19745 -- Forced resolution of verbose names in createsupersuser

 Thanks Baptiste Mispelon for the report and Preston Holmes for the review.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19745: Wrong prompt for `createuser` management command ()

2013-02-05 Thread Django
#19745: Wrong prompt for `createuser` management command
()
-+-
 Reporter:  bmispelon|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.auth |  Version:
 Severity:  Release blocker  |  1.5-beta-1
 Keywords:  createuser repr py3  |   Resolution:
Has patch:  1| Triage Stage:  Ready for
  Needs tests:  1|  checkin
Easy pickings:  0|  Needs documentation:  0
 |  Patch needs improvement:  0
 |UI/UX:  0
-+-
Changes (by ptone):

 * stage:  Accepted => Ready for checkin


Comment:

 The assert is a great way to sort out the what is in the prompt (I was
 stuck in coming at it from the test funcs perspective). And the patch
 looks solid in all other ways.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19745: Wrong prompt for `createuser` management command ()

2013-02-05 Thread Django
#19745: Wrong prompt for `createuser` management command
()
-+-
 Reporter:  bmispelon|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.auth |  Version:
 Severity:  Release blocker  |  1.5-beta-1
 Keywords:  createuser repr py3  |   Resolution:
Has patch:  1| Triage Stage:  Accepted
  Needs tests:  1|  Needs documentation:  0
Easy pickings:  0|  Patch needs improvement:  0
 |UI/UX:  0
-+-

Comment (by claudep):

 Just attached my suggested fix. Preston's patch was in the right
 direction, but the removal of `force_str` is wrong, in my opinion (as
 `input` does need an encoded string on Python 2).

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19745: Wrong prompt for `createuser` management command ()

2013-02-05 Thread Django
#19745: Wrong prompt for `createuser` management command
()
-+-
 Reporter:  bmispelon|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.auth |  Version:
 Severity:  Release blocker  |  1.5-beta-1
 Keywords:  createuser repr py3  |   Resolution:
Has patch:  1| Triage Stage:  Accepted
  Needs tests:  1|  Needs documentation:  0
Easy pickings:  0|  Patch needs improvement:  0
 |UI/UX:  0
-+-

Comment (by ptone):

 stumped on testing - the call_command setting stdout and the associated
 OutputWrapper in BaseCommand.execute is not accessible to write the prompt
 to from inside the test or the test decorator.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19745: Wrong prompt for `createuser` management command ()

2013-02-05 Thread Django
#19745: Wrong prompt for `createuser` management command
()
-+-
 Reporter:  bmispelon|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.auth |  Version:
 Severity:  Release blocker  |  1.5-beta-1
 Keywords:  createuser repr py3  |   Resolution:
Has patch:  1| Triage Stage:  Accepted
  Needs tests:  1|  Needs documentation:  0
Easy pickings:  0|  Patch needs improvement:  0
 |UI/UX:  0
-+-
Changes (by ptone):

 * has_patch:  0 => 1
 * needs_tests:  0 => 1


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19745: Wrong prompt for `createuser` management command ()

2013-02-05 Thread Django
#19745: Wrong prompt for `createuser` management command
()
-+-
 Reporter:  bmispelon|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.auth |  Version:
 Severity:  Release blocker  |  1.5-beta-1
 Keywords:  createuser repr py3  |   Resolution:
Has patch:  0| Triage Stage:  Accepted
  Needs tests:  0|  Needs documentation:  0
Easy pickings:  0|  Patch needs improvement:  0
 |UI/UX:  0
-+-

Comment (by aaugustin):

 Yes that's the problem.

 Unfortunately these lazy translations are in user code, not in Django;
 otherwise we'd just use gettext instead of ugettext.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19745: Wrong prompt for `createuser` management command ()

2013-02-05 Thread Django
#19745: Wrong prompt for `createuser` management command
()
-+-
 Reporter:  bmispelon|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.auth |  Version:
 Severity:  Release blocker  |  1.5-beta-1
 Keywords:  createuser repr py3  |   Resolution:
Has patch:  0| Triage Stage:  Accepted
  Needs tests:  0|  Needs documentation:  0
Easy pickings:  0|  Patch needs improvement:  0
 |UI/UX:  0
-+-

Comment (by bmispelon):

 Actually the first two are present in 1.5b as well.

 The commit is a different one though (not sure why):
 f5232597ea31bf274b02983f32ba89be4f7bf02b.

 Is the problem the fact that lazy translations define `__unicode__` and
 not `__str__`, which therefore falls back on using `__repr__`?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19745: Wrong prompt for `createuser` management command ()

2013-02-05 Thread Django
#19745: Wrong prompt for `createuser` management command
()
-+-
 Reporter:  bmispelon|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.auth |  Version:
 Severity:  Release blocker  |  1.5-beta-1
 Keywords:  createuser repr py3  |   Resolution:
Has patch:  0| Triage Stage:  Accepted
  Needs tests:  0|  Needs documentation:  0
Easy pickings:  0|  Patch needs improvement:  0
 |UI/UX:  0
-+-
Changes (by aaugustin):

 * needs_docs:   => 0
 * needs_better_patch:   => 0
 * severity:  Normal => Release blocker
 * needs_tests:   => 0
 * stage:  Unreviewed => Accepted


Comment:

 Django should resolve lazy translations here.

 Forcing unicode isn't the right solution because `stdout` is bytes in
 Python 2 and unicode in Python 3; wrapping in `str()` should work (to be
 tested).

 Marking as a release blocker since the third bug is in 1.5 beta 1.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[Django] #19745: Wrong prompt for `createuser` management command ()

2013-02-05 Thread Django
#19745: Wrong prompt for `createuser` management command
()
--+-
 Reporter:  bmispelon |  Owner:  nobody
 Type:  Bug   | Status:  new
Component:  contrib.auth  |Version:  1.5-beta-1
 Severity:  Normal|   Keywords:  createuser repr py3
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+-
 Using a fresh checkout, I created a new project, using all the default
 settings (except for DATABASES).

 When running `syncdb` for the first time (or running `createsuperuser`
 anytime), the prompts are wrong.

 Here's what it looks like with python 2.7:

 {{{
 $ python manage.py createsuperuser
  (leave blank
 to use 'bmispelon'): newuser
 : f...@example.com
 Password:
 Password (again):
 Superuser created successfully.


 $ python manage.py createsuperuser
  (leave blank
 to use 'bmispelon'): newuser
 Error: That  is
 already taken.
  (leave blank
 to use 'bmispelon'): ^C
 Operation cancelled.
 }}}

 By comparison, here is what it looks like using python 3.2 (correct
 output):

 {{{
 $ python3 manage.py createsuperuser
 Username (leave blank to use 'bmispelon'): newuser2
 Email address: f...@example.com
 Password:
 Password (again):
 Superuser created successfully.


 $ python3 manage.py createsuperuser
 Username (leave blank to use 'bmispelon'): newuser2
 Error: That username is already taken.
 Username (leave blank to use 'bmispelon'): ^C
 Operation cancelled.
 }}}


 There are three issues here:

 1) The name of the username field is displayed wrong
 2) The name of the email field is displayed wrong
 3) The error message when using an existing username is wrong.


 The code in question is located in
 `django/contrib/auth/management/commands/createsuperuser.py`.
 The first two were introduced by commit
 55c585f1c7a9c91308193f0648caf36203174564 while the third one was
 introduced with an older one: b3b3db3d954a5226f870a0b4403343c78efae8dc


 The issue can be fixed by wrapping the strings being formatted with six.u,
 like so:
 {{{
 from django.utils.six import u
 # ...
 input_msg = u("%s (leave blank to use '%s')") % (input_msg,
 default_username) # L87
 }}}

 However, I'm not sure of the implications of such a fix.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.