#25361: Unpickling of QuerySet fails in presence of abstract intermediate model
-------------------------------------+-------------------------------------
     Reporter:  Torsten Bronger      |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.8
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Baptiste Mispelon):

 I believe this got fixed somewhat accidentally.

 Using the same model definitions as in the report, I wrote the following
 testcase:
 {{{#!python
 class TicketTestCase(TestCase):
     def test_ticket(self):
         my_pizza = MyPizza.objects.create()
         my_pizza.toppings.create()

         pickled = pickle.dumps(my_pizza.toppings.all())

         with self.assertRaises(LookupError):
             response = pickle.loads(pickled)
 }}}

 This allowed me to bisect and find the commit that apparently fixed the
 issue: 67cf5efa31acb2916034afb15610b700695dfcb0.

 I'm not very familiar with pickling in Python and that commit doesn't seem
 to have anything to do with pickling (though it does relate to abstract
 models) so I'm a bit hesitant to mark this ticket as fixed.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/25361#comment:3>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.8f1e5d9f093e59fdf64038d39578f2a1%40djangoproject.com.

Reply via email to