#21555: ValidationError is not picklable
-------------------------------+--------------------
     Reporter:  zanuxzan       |      Owner:  nobody
         Type:  Bug            |     Status:  new
    Component:  Uncategorized  |    Version:  master
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  1
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 I have a use case where I'd like to pickle ValidationError however it
 throws up as error:

 For example, I'd expect the following to work:

 {{{#!python
 import pickle
 from django.core.exceptions import ValidationError
 pickle.loads(pickle.dumps(ValidationError('eggs', 'sausage')))
 }}}

 Results in:

 {{{
 TypeError: __init__() takes at least 2 arguments (1 given)
 }}}

 The reason for this is because ValidationError does not call super.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21555>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.ed2c9866738fff0ab9f4fbdf0d69893a%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to