#9307: Pickling support for Oracle Query classes
---------------------------------------------------+------------------------
          Reporter:  mtredinnick                   |         Owner:  mtredinnick
            Status:  new                           |     Milestone:             
         Component:  Database layer (models, ORM)  |       Version:  1.0        
        Resolution:                                |      Keywords:             
             Stage:  Unreviewed                    |     Has_patch:  0          
        Needs_docs:  0                             |   Needs_tests:  0          
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Changes (by jbronn):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I applied the patch and ran the `queries` regression tests.  It failed
 with the following error:
 {{{
 File "C:\django\trunk\tests\regressiontests\queries\models.py", line ?, in
 regressiontests.queries.models.__test__.API_TESTS
 Failed example:
     out = pickle.dumps(Item.objects.all())
 Exception raised:
     Traceback (most recent call last):
       File "C:\django\trunk\django\test\_doctest.py", line 1267, in __run
         compileflags, 1) in test.globs
       File "<doctest
 regressiontests.queries.models.__test__.API_TESTS[212]>", line 1, in
 <module>
         out = pickle.dumps(Item.objects.all())
       File "C:\Python25\lib\pickle.py", line 1366, in dumps
         Pickler(file, protocol).dump(obj)
       File "C:\Python25\lib\pickle.py", line 224, in dump
         self.save(obj)
       File "C:\Python25\lib\pickle.py", line 331, in save
         self.save_reduce(obj=obj, *rv)
       File "C:\Python25\lib\pickle.py", line 419, in save_reduce
         save(state)
       File "C:\Python25\lib\pickle.py", line 286, in save
         f(self, obj) # Call unbound method with explicit self
       File "C:\Python25\lib\pickle.py", line 649, in save_dict
         self._batch_setitems(obj.iteritems())
       File "C:\Python25\lib\pickle.py", line 663, in _batch_setitems
         save(v)
       File "C:\Python25\lib\pickle.py", line 331, in save
         self.save_reduce(obj=obj, *rv)
       File "C:\Python25\lib\pickle.py", line 401, in save_reduce
         save(args)
       File "C:\Python25\lib\pickle.py", line 286, in save
         f(self, obj) # Call unbound method with explicit self
       File "C:\Python25\lib\pickle.py", line 562, in save_tuple
         save(element)
       File "C:\Python25\lib\pickle.py", line 286, in save
         f(self, obj) # Call unbound method with explicit self
       File "C:\Python25\lib\pickle.py", line 753, in save_global
         (obj, module, name))
     PicklingError: Can't pickle <class
 'django.db.models.sql.query.Query'>: it's not the same object as
 django.db.models.sql.query.Query
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9307#comment:1>
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 django-updates@googlegroups.com
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