Opened 10 years ago

Closed 10 years ago

#10796 closed (fixed)

test failure in regressiontests/queries/

Reported by: Carl Meyer Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


On r10524 I'm getting this test failure (on SQLite):

FAIL: Doctest: regressiontests.queries.models.__test__.API_TESTS
Traceback (most recent call last):
  File "/home/carljm/projects/testproj_env/src/django/django/test/", line 2180, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for regressiontests.queries.models.__test__.API_TESTS
  File "/home/carljm/projects/testproj_env/src/django/tests/regressiontests/queries/", line unknown line number, in API_TESTS

File "/home/carljm/projects/testproj_env/src/django/tests/regressiontests/queries/", line ?, in regressiontests.queries.models.__test__.API_TESTS
Failed example:
    _ = pickle.loads(pickle.dumps(qs))
Exception raised:
    Traceback (most recent call last):
      File "/home/carljm/projects/testproj_env/src/django/django/test/", line 1267, in __run
        compileflags, 1) in test.globs
      File "<doctest regressiontests.queries.models.__test__.API_TESTS[250]>", line 1, in <module>
        _ = pickle.loads(pickle.dumps(qs))
      File "/usr/lib/python2.5/", line 1366, in dumps
        Pickler(file, protocol).dump(obj)
      File "/usr/lib/python2.5/", line 224, in dump
      File "/usr/lib/python2.5/", line 331, in save
        self.save_reduce(obj=obj, *rv)
      File "/usr/lib/python2.5/", line 419, in save_reduce
      File "/usr/lib/python2.5/", line 286, in save
        f(self, obj) # Call unbound method with explicit self
      File "/usr/lib/python2.5/", line 649, in save_dict
      File "/usr/lib/python2.5/", line 663, in _batch_setitems
      File "/usr/lib/python2.5/", line 306, in save
        rv = reduce(self.proto)
      File "/usr/lib/python2.5/", line 83, in _reduce_ex
        dict = getstate()
      File "/home/carljm/projects/testproj_env/src/django/django/db/models/sql/", line 370, in __getstate__
        return super(DateQuery, self).__getstate__()
      File "/home/carljm/projects/testproj_env/src/django/django/db/models/sql/", line 128, in __getstate__
        obj_dict['select_fields'] = [ for f in obj_dict['select_fields']]
    AttributeError: 'NoneType' object has no attribute 'name'

Change History (1)

comment:1 Changed 10 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [10526]) Fixed #10796 -- Corrected a pickling problem introduced by [10522]. Thanks to carljm for the report.

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