Opened 9 years ago

Closed 9 years ago

#3558 closed (fixed)

rev 4558 breaks in Python 2.3

Reported by: xian@… Owned by: adrian
Component: Template system Version: master
Severity: Keywords: template filters
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation:
Needs tests: Patch needs improvement:
Easy pickings: UI/UX:


rev 4558 breaks in Python 2.3 because it tries to write to name which wasn't writable until 2.4. This is a similar problem to what was this one which showed up in 3461

Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/core/servers/", line 272, in run
    self.result = application(self.environ, self.start_response)
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/core/servers/", line 614, in __call__
    return self.application(environ, start_response)
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/core/handlers/", line 184, in __call__
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/core/handlers/", line 29, in load_middleware
    mod = __import__(mw_module, {}, {}, [''])
  File "/Users/xian/Sites/malibu/malibu/../malibu/pages/", line 1, in ?
    from malibu.pages.views import show_page
  File "/Users/xian/Sites/malibu/malibu/../malibu/pages/", line 1, in ?
    from django.shortcuts import render_to_response, get_object_or_404
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/shortcuts/", line 5, in ?
    from django.template import loader
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/template/", line 915, in ?
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/template/", line 912, in add_to_builtins
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/template/", line 901, in get_library
    mod = __import__(module_name, {}, {}, [''])
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/template/", line 55, in ?
    addslashes = stringfilter(addslashes)
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/template/", line 40, in stringfilter
    _dec.__name__ = func.__name__
TypeError: readonly attribute

I haven't had time to look into fixing this or whip up a patch, but I'm guessing whatever fixed the 3461 will work here as well.

Change History (1)

comment:1 Changed 9 years ago by jacob

  • Resolution set to fixed
  • Status changed from new to closed

(In [4562]) Fixed #3558: [4558] broken in Python 2.3; this fixes that breakage. Thanks for the heads-up, xian@…

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