#15702: Drop 2.4 compatibility boilerplate code
------------------------------------------+----------------------
               Reporter:  jonash          |        Owner:  nobody
                 Status:  reopened        |    Milestone:
              Component:  Core framework  |      Version:  SVN
             Resolution:                  |     Keywords:  2.4
           Triage Stage:  Accepted        |    Has patch:  1
    Needs documentation:  0               |  Needs tests:  0
Patch needs improvement:  1               |
------------------------------------------+----------------------
Changes (by mk):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 There is a grave bug since r15927 in Django: The decorator in
 django/db/transaction.py is missing a return statement, which causes
 testsuites and everything decorated with any transaction decorator to
 fail, f.e. with a 'NoneType' object has no attribute 'set_cookie' error.

 The fix is so simple that I won't attach a patch for it:

 {{{
 diff --git a/django/db/transaction.py b/django/db/transaction.py
 index cf7350c..6cbe39f 100644
 --- a/django/db/transaction.py
 +++ b/django/db/transaction.py
 @@ -207,7 +207,7 @@ class Transaction(object):
          @wraps(func)
          def inner(*args, **kwargs):
              with self:
 -                func(*args, **kwargs)
 +                return func(*args, **kwargs)
          return inner

  def _transaction_func(entering, exiting, using):
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15702#comment:6>
Django <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