#2705: [patch] Add optional FOR UPDATE clause to QuerySets
-------------------------------------+-------------------------------------
               Reporter:  Hawkeye    |        Owner:  brunobraga
                   Type:  New        |       Status:  assigned
  feature                            |    Component:  Database layer
              Milestone:             |  (models, ORM)
                Version:  SVN        |     Severity:  Normal
             Resolution:             |     Keywords:
           Triage Stage:  Accepted   |    Has patch:  1
    Needs documentation:  0          |  Needs tests:  0
Patch needs improvement:  0          |
-------------------------------------+-------------------------------------
Changes (by jacob):

 * stage:  Ready for checkin => Accepted


Comment:

 Actually, I'm getting test failures on the latest patch:

 {{{
 Creating test database for alias 'default'...
 Creating test database for alias 'other'...
 Destroying old test database 'other'...
 ...Exception in thread Thread-2:
 Traceback (most recent call last):
   File
 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py",
 line 522, in __bootstrap_inner
     self.run()
   File
 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py",
 line 477, in run
     self.__target(*self.__args, **self.__kwargs)
   File
 
"/Users/jacob/Projects/Django/upstream/tests/modeltests/select_for_update/tests.py",
 line 155, in run_select_for_update
     people[0].name = 'Fred'
 IndexError: list index out of range

 F...s
 ======================================================================
 FAIL: test_nowait_raises_error_on_block
 (modeltests.select_for_update.tests.SelectForUpdateTests)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Users/jacob/Projects/Django/upstream/django/test/testcases.py",
 line 603, in skip_wrapper
     return test_func(*args, **kwargs)
   File
 
"/Users/jacob/Projects/Django/upstream/tests/modeltests/select_for_update/tests.py",
 line 122, in test_nowait_raises_error_on_block
     self.check_exc(status[-1])
   File
 
"/Users/jacob/Projects/Django/upstream/tests/modeltests/select_for_update/tests.py",
 line 83, in check_exc
     self.failUnless(isinstance(exc, DatabaseError))
 AssertionError: False is not True

 ----------------------------------------------------------------------
 Ran 8 tests in 4.173s

 FAILED (failures=1, skipped=1)
 Destroying test database for alias 'default'...
 Destroying test database for alias 'other'...
 }}}

 Patch applied against trunk (r16044), PostgreSQL 9.0.1. Is this PEBKAC, or
 for real?

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