Opened 11 years ago

Closed 11 years ago

#5960 closed (fixed)

AutoEscaping change breaks python 2.3.5 compatability due to use of decode function on unicode objects

Reported by: Free Neuron <freeneuron+django@…> Owned by: nobody
Component: Core (Other) Version: master
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


File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/utils/", 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 Changed 11 years ago by Free Neuron <freeneuron+django@…>

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):

File "<stdin>", line 1, in ?

AttributeError: 'unicode' object has no attribute 'decode'

comment:2 in reply to:  description Changed 11 years ago by anonymous

Confirmed same behavior, SVN, RHEL 4, Python 2.3.4
Fixed by reverting to 0.96.1

comment:3 Changed 11 years ago by Malcolm Tredinnick

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 Changed 11 years ago by Malcolm Tredinnick

Triage Stage: UnreviewedAccepted

comment:5 Changed 11 years ago by Malcolm Tredinnick

Ignore comment 3. I worked it out (things fail just trying to start up when you run the tests).

comment:6 Changed 11 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [6685]) Fixed #5960 -- Fixed some Python 2.3 incompatibilities.

Note: See TracTickets for help on using tickets.
Back to Top