Re: [Django] #26462: UnicodeEncodeError when warning about too long caching keys on Python 2

2016-04-05 Thread Django
#26462: UnicodeEncodeError when warning about too long caching keys on Python 2
-+
 Reporter:  suligap  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (Cache system)  |  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"90ce5d46bf62a74d7c78a61c1a7bab64f7cb1735" 90ce5d46]:
 {{{
 #!CommitTicketReference repository=""
 revision="90ce5d46bf62a74d7c78a61c1a7bab64f7cb1735"
 Fixed #26462 -- Fixed Python 2 UnicodeEncodeError when warning about long
 cache keys.
 }}}

--
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.6c230cae4242db3b30d2b8f594a2df31%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26462: UnicodeEncodeError when warning about too long caching keys on Python 2

2016-04-04 Thread Django
#26462: UnicodeEncodeError when warning about too long caching keys on Python 2
-+
 Reporter:  suligap  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Cache system)  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by charettes):

 * version:  1.9 => master
 * type:  Uncategorized => Bug
 * stage:  Unreviewed => Accepted


--
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.5c145a2cd143822aec9d2c452d09b05a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26462: UnicodeEncodeError when warning about too long caching keys on Python 2

2016-04-04 Thread Django
#26462: UnicodeEncodeError when warning about too long caching keys on Python 2
-+-
 Reporter:  suligap  |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Core (Cache system)  |  Version:  1.9
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by suligap):

 * needs_better_patch:   => 0
 * component:  Uncategorized => Core (Cache system)
 * needs_tests:   => 0
 * needs_docs:   => 0


--
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.34edbcc52221b13c84c3007fed208faa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #26462: UnicodeEncodeError when warning about too long caching keys on Python 2

2016-04-04 Thread Django
#26462: UnicodeEncodeError when warning about too long caching keys on Python 2
---+
 Reporter:  suligap|  Owner:  nobody
 Type:  Uncategorized  | Status:  new
Component:  Uncategorized  |Version:  1.9
 Severity:  Normal |   Keywords:
 Triage Stage:  Unreviewed |  Has patch:  1
Easy pickings:  0  |  UI/UX:  0
---+
 On Python 2 `warnings.warn()` expects a `message` that can be coerced to a
 `str`.

 {{{
 Python 2.7.10 (default, Oct 14 2015, 16:09:02)
 [GCC 5.2.1 20151010] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import warnings
 >>> warnings.warn(u'清')
 Traceback (most recent call last):
   File "", line 1, in 
   File "/usr/lib/python2.7/warnings.py", line 33, in _show_warning
 file.write(formatwarning(message, category, filename, lineno, line))
   File "/usr/lib/python2.7/warnings.py", line 42, in formatwarning
 s =  "%s:%s: %s: %s\n" % (filename, lineno, category.__name__,
 message)
 UnicodeEncodeError: 'ascii' codec can't encode character u'\u6e05' in
 position 0: ordinal not in range(128)
 }}}

 `BaseCache.validate_key()`
 
[https://github.com/django/django/blob/d356bb653f4d90ae9809e5a051791ded39010c38/django/core/cache/backends/base.py#L237-L238
 fails to create a proper `message`] by using `"%s"` to interpolate the key
 into the `message` instead of using `"%r"`.

--
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/050.0ab05c6ab2ae3ce800c2a4b984e9e463%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.