Code

Opened 7 years ago

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

Description

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
http://groups.google.com/group/django-users/browse_frm/thread/5b4e6727ed2c69ce/73e5ab44c5f08da0%2373e5ab44c5f08da0

Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/core/servers/basehttp.py", 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/basehttp.py", 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/wsgi.py", line 184, in __call__
    self.load_middleware()
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/core/handlers/base.py", line 29, in load_middleware
    mod = __import__(mw_module, {}, {}, [''])
  File "/Users/xian/Sites/malibu/malibu/../malibu/pages/middleware.py", line 1, in ?
    from malibu.pages.views import show_page
  File "/Users/xian/Sites/malibu/malibu/../malibu/pages/views.py", 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/__init__.py", line 5, in ?
    from django.template import loader
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/template/__init__.py", line 915, in ?
    add_to_builtins('django.template.defaultfilters')
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/template/__init__.py", line 912, in add_to_builtins
    builtins.append(get_library(module_name))
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/template/__init__.py", 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/defaultfilters.py", line 55, in ?
    addslashes = stringfilter(addslashes)
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/template/defaultfilters.py", 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.

Attachments (0)

Change History (1)

comment:1 Changed 7 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@…

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.