1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Refs #24007 -- Removed an apps.populate() call in model unpickling that can cause deadlocks.

This commit is contained in:
Tim Graham
2016-01-26 07:03:54 -05:00
parent db9f21f0ad
commit 10a162809f
3 changed files with 11 additions and 49 deletions

View File

@@ -461,6 +461,16 @@ Since the introduction of migrations for the contrib apps in Django 1.8, the
tables of these custom user test models were not created anymore making them
unusable in a testing context.
Apps registry is no longer auto-populated when unpickling models outside of Django
----------------------------------------------------------------------------------
The apps registry is no longer auto-populated when unpickling models. This was
added in Django 1.7.2 as an attempt to allow unpickling models outside of
Django, such as in an RQ worker, without calling ``django.setup()``, but it
creates the possibility of a deadlock. To adapt your code in the case of RQ,
you can `provide your own worker script <http://python-rq.org/docs/workers/>`_
that calls ``django.setup()``.
Miscellaneous
-------------