Re: [Django] #21019: force_text fails on class object with __unicode__ instance method

2013-09-03 Thread Django
#21019: force_text fails on class object with __unicode__ instance method
+--
 Reporter:  drtyrsa |Owner:  drtyrsa
 Type:  Bug |   Status:  closed
Component:  Utilities   |  Version:  1.5
 Severity:  Normal  |   Resolution:  invalid
 Keywords:  force_text  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  1   |UI/UX:  0
+--

Comment (by claudep):

 Currently, `force_text`/`smart_text` are meant to receive instances, not
 classes. I'd say that for your specific use case, you may test your
 argument before passing it to `force_text`, for example with the
 `inspect.isclass` method.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.bbf3899e5627d831e4c9472d2a50f8f7%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21019: force_text fails on class object with __unicode__ instance method

2013-09-02 Thread Django
#21019: force_text fails on class object with __unicode__ instance method
+--
 Reporter:  drtyrsa |Owner:  drtyrsa
 Type:  Bug |   Status:  closed
Component:  Utilities   |  Version:  1.5
 Severity:  Normal  |   Resolution:  invalid
 Keywords:  force_text  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  1   |UI/UX:  0
+--

Comment (by drtyrsa):

 What are valid use cases for `smart_text` then? As I understand it takes
 some object and returns its str (unicode) representation. Why can not this
 object be class itself?

 I am using it to log the args of the function (some args can be models
 classes). Isn't it valid use case?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.7b3d47eb2259ff3ed9bb396dafd17d02%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21019: force_text fails on class object with __unicode__ instance method

2013-09-02 Thread Django
#21019: force_text fails on class object with __unicode__ instance method
+--
 Reporter:  drtyrsa |Owner:  drtyrsa
 Type:  Bug |   Status:  closed
Component:  Utilities   |  Version:  1.5
 Severity:  Normal  |   Resolution:  invalid
 Keywords:  force_text  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  1   |UI/UX:  0
+--
Changes (by claudep):

 * status:  assigned => closed
 * resolution:   => invalid


Comment:

 I think that calling `force_text` on the class itself is not a valid use
 case, unless you can demonstrate the opposite.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.fa4f0b05bb1a9dda841f6d161fd5b578%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21019: force_text fails on class object with __unicode__ instance method

2013-09-02 Thread Django
#21019: force_text fails on class object with __unicode__ instance method
+--
 Reporter:  drtyrsa |Owner:  drtyrsa
 Type:  Bug |   Status:  assigned
Component:  Utilities   |  Version:  1.5
 Severity:  Normal  |   Resolution:
 Keywords:  force_text  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  1   |UI/UX:  0
+--
Changes (by drtyrsa):

 * owner:  nobody => drtyrsa
 * needs_better_patch:   => 0
 * status:  new => assigned
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 https://code.djangoproject.com/ticket/21019

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.1d649fc0679e42026db42c1b73e5aadd%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21019: force_text fails on class object with __unicode__ instance method

2013-09-02 Thread Django
#21019: force_text fails on class object with __unicode__ instance method
+--
 Reporter:  drtyrsa |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Utilities   |  Version:  1.5
 Severity:  Normal  |   Resolution:
 Keywords:  force_text  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  1   |UI/UX:  0
+--
Changes (by drtyrsa):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 https://code.djangoproject.com/ticket/21019

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.b520e5df53dbcc3fd5bb98ba312e478f%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21019: force_text fails on class object with __unicode__ instance method

2013-09-02 Thread Django
#21019: force_text fails on class object with __unicode__ instance method
+--
 Reporter:  drtyrsa |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Utilities   |  Version:  1.5
 Severity:  Normal  |   Resolution:
 Keywords:  force_text  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  1   |UI/UX:  0
+--
Changes (by drtyrsa):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 https://github.com/django/django/pull/1543

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.704c7d0ec60127e4a3a5d2df1a8133b5%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21019: force_text fails on class object with __unicode__ instance method

2013-09-02 Thread Django
#21019: force_text fails on class object with __unicode__ instance method
+--
 Reporter:  drtyrsa |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Utilities   |  Version:  1.5
 Severity:  Normal  |   Resolution:
 Keywords:  force_text  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  1   |UI/UX:  0
+--
Changes (by drtyrsa):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 https://github.com/django/django/pull/1543

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.05ef54f1a99c6fed86a8d64f9727da5d%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.