diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-01-12 22:04:22 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-01-12 22:08:46 +0100 |
| commit | d674fe6dee16735dd2670243153326806b7e6cb0 (patch) | |
| tree | 4fe400c9bade0675f91c451e8ee8f17845d150cc /django/utils/module_loading.py | |
| parent | 225a6ed2cfecc609760a36c3b20369daeec52e07 (diff) | |
Used a regular lock for app registry population.
Since the app registry is always populated before the first request is
processed, the situation described in #18251 for the old app cache
cannot happen any more.
Refs #18251, #21628.
Diffstat (limited to 'django/utils/module_loading.py')
| -rw-r--r-- | django/utils/module_loading.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/django/utils/module_loading.py b/django/utils/module_loading.py index bd012cd55b..a6fe7aebcb 100644 --- a/django/utils/module_loading.py +++ b/django/utils/module_loading.py @@ -1,6 +1,5 @@ from __future__ import absolute_import # Avoid importing `importlib` from this package. -from contextlib import contextmanager import copy import imp from importlib import import_module @@ -36,18 +35,6 @@ def import_by_path(dotted_path, error_prefix=''): return attr -@contextmanager -def import_lock(): - """ - Context manager that aquires the import lock. - """ - imp.acquire_lock() - try: - yield - finally: - imp.release_lock() - - def autodiscover_modules(*args, **kwargs): """ Auto-discover INSTALLED_APPS modules and fail silently when |
