#5808: Cannot pickle the default filters
--------------------------------------+-------------------------------------
   Reporter:  [EMAIL PROTECTED]         |                Owner:  nobody         
       
     Status:  new                     |            Component:  Core framework   
     
    Version:  SVN                     |           Resolution:                   
     
   Keywords:  template pickle filter  |                Stage:  Design decision 
needed
  Has_patch:  1                       |           Needs_docs:  0                
     
Needs_tests:  0                       |   Needs_better_patch:  0                
     
--------------------------------------+-------------------------------------
Comment (by Simon Law <[EMAIL PROTECTED]>):

 I see.  This is related to #3558.

 Since __name__ is read-only in Python 2.3, it still possible for this to
 work by wrapping the patch in a try statement.


 {{{
 try:
     _dec.__name__ = func.__name__
 except TypeError:
     pass
 }}}

 This breaks pickling in Python 2.3, but permits it elsewhere.

 Pickling is useful so that we can cache templates in memcached.  If
 template parsing is non-trivial, you really want to cache these objects.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/5808#comment:3>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to