﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28575	Allow pickling dynamically created Model exception classes (DoesNotExist, MultipleObjectsReturned, RelatedObjectDoesNotExist)	Rachel Tobin	nobody	"Example:
{{{
>>> import django
>>> import pickle
>>> pickle.dumps(django.contrib.auth.models.User.DoesNotExist)
>>> PicklingError: Can't pickle <class 'django.contrib.auth.models.DoesNotExist'>: it's not found as django.contrib.auth.models.DoesNotExist
}}}

*Instances* of `Model.DoesNotExist` are pickleable as fixed in #17776, however, the class itself is not.  This is particularly problematic when using the Django test runner with the `--parallel` option enabled when a `Model.DoesNotExist` exception is raised. The result of this is the test runner bailing with a `pickle.PicklingError`, making it exceptionally difficult to debug the cause of the `Model.DoesNotExist`."	Bug	closed	Database layer (models, ORM)	1.11	Normal	fixed			Accepted	1	0	0	0	0	0
