Opened 17 years ago
Closed 17 years ago
#5960 closed (fixed)
AutoEscaping change breaks python 2.3.5 compatability due to use of decode function on unicode objects
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Keywords: | decode, unicode, escape | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
http://code.djangoproject.com/browser/django/trunk/django/utils/safestring.py?rev=6671
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/utils/safestring.py", line 92, in SafeUnicode
decode = curry(_proxy_method, method = unicode.decode)
AttributeError: type object 'unicode' has no attribute 'decode'
Under python 2.3.5 u"a".decode("rot13") throws, under 2.4 it succeeds.
Change History (6)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Confirmed same behavior, SVN, RHEL 4, Python 2.3.4
Fixed by reverting to 0.96.1
comment:3 by , 17 years ago
What do I have to do to trigger this problem in Django? It's not immediately clear how we're getting to that code path, so a short example of how to repeat the bug is necessary.
comment:4 by , 17 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:5 by , 17 years ago
Ignore comment 3. I worked it out (things fail just trying to start up when you run the tests).
comment:6 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Python 2.3.5 (#1, Aug 19 2006, 21:31:42)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
AttributeError: 'unicode' object has no attribute 'decode'