Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Deprecated django.utils.importlib

This was a shim for pre-Python 2.7 support.
  • Loading branch information...
commit fdd7a355bf053217d25b8d2189e37069c1304283 1 parent ac09558
Claude Paroz authored July 29, 2013

Showing 38 changed files with 64 additions and 49 deletions. Show diff stats Hide diff stats

  1. 2  django/conf/__init__.py
  2. 3  django/conf/urls/__init__.py
  3. 2  django/contrib/admin/__init__.py
  4. 2  django/contrib/admindocs/views.py
  5. 2  django/contrib/auth/hashers.py
  6. 2  django/contrib/comments/__init__.py
  7. 2  django/contrib/formtools/tests/wizard/storage.py
  8. 3  django/contrib/formtools/tests/wizard/test_forms.py
  9. 5  django/contrib/gis/geometry/backend/__init__.py
  10. 3  django/contrib/sessions/management/commands/clearsessions.py
  11. 2  django/contrib/sessions/middleware.py
  12. 2  django/contrib/staticfiles/storage.py
  13. 2  django/core/cache/__init__.py
  14. 6  django/core/management/__init__.py
  15. 2  django/core/management/commands/flush.py
  16. 3  django/core/management/commands/startapp.py
  17. 3  django/core/management/commands/startproject.py
  18. 2  django/core/management/commands/syncdb.py
  19. 3  django/core/serializers/__init__.py
  20. 2  django/core/servers/fastcgi.py
  21. 2  django/core/urlresolvers.py
  22. 2  django/db/backends/__init__.py
  23. 12  django/db/models/loading.py
  24. 4  django/db/utils.py
  25. 2  django/template/base.py
  26. 2  django/template/loaders/app_directories.py
  27. 2  django/test/client.py
  28. 2  django/test/simple.py
  29. 4  django/utils/formats.py
  30. 5  django/utils/importlib.py
  31. 2  django/utils/module_loading.py
  32. 2  django/utils/translation/trans_real.py
  33. 2  django/views/i18n.py
  34. 2  docs/internals/deprecation.txt
  35. 9  docs/releases/1.7.txt
  36. 2  tests/i18n/tests.py
  37. 2  tests/test_runner/tests.py
  38. 2  tests/utils_tests/test_module_loading.py
2  django/conf/__init__.py
@@ -6,6 +6,7 @@
6 6
 a list of all possible variables.
7 7
 """
8 8
 
  9
+import importlib
9 10
 import logging
10 11
 import os
11 12
 import sys
@@ -15,7 +16,6 @@
15 16
 from django.conf import global_settings
16 17
 from django.core.exceptions import ImproperlyConfigured
17 18
 from django.utils.functional import LazyObject, empty
18  
-from django.utils import importlib
19 19
 from django.utils.module_loading import import_by_path
20 20
 from django.utils import six
21 21
 
3  django/conf/urls/__init__.py
... ...
@@ -1,7 +1,8 @@
  1
+from importlib import import_module
  2
+
1 3
 from django.core.urlresolvers import (RegexURLPattern,
2 4
     RegexURLResolver, LocaleRegexURLResolver)
3 5
 from django.core.exceptions import ImproperlyConfigured
4  
-from django.utils.importlib import import_module
5 6
 from django.utils import six
6 7
 
7 8
 
2  django/contrib/admin/__init__.py
@@ -17,8 +17,8 @@ def autodiscover():
17 17
     """
18 18
 
19 19
     import copy
  20
+    from importlib import import_module
20 21
     from django.conf import settings
21  
-    from django.utils.importlib import import_module
22 22
     from django.utils.module_loading import module_has_submodule
23 23
 
24 24
     for app in settings.INSTALLED_APPS:
2  django/contrib/admindocs/views.py
... ...
@@ -1,3 +1,4 @@
  1
+from importlib import import_module
1 2
 import inspect
2 3
 import os
3 4
 import re
@@ -13,7 +14,6 @@
13 14
 from django.core import urlresolvers
14 15
 from django.contrib.admindocs import utils
15 16
 from django.contrib.sites.models import Site
16  
-from django.utils.importlib import import_module
17 17
 from django.utils._os import upath
18 18
 from django.utils import six
19 19
 from django.utils.translation import ugettext as _
2  django/contrib/auth/hashers.py
@@ -3,11 +3,11 @@
3 3
 import base64
4 4
 import binascii
5 5
 import hashlib
  6
+import importlib
6 7
 
7 8
 from django.dispatch import receiver
8 9
 from django.conf import settings
9 10
 from django.test.signals import setting_changed
10  
-from django.utils import importlib
11 11
 from django.utils.datastructures import SortedDict
12 12
 from django.utils.encoding import force_bytes, force_str, force_text
13 13
 from django.core.exceptions import ImproperlyConfigured
2  django/contrib/comments/__init__.py
... ...
@@ -1,10 +1,10 @@
  1
+from importlib import import_module
1 2
 import warnings
2 3
 from django.conf import settings
3 4
 from django.core import urlresolvers
4 5
 from django.core.exceptions import ImproperlyConfigured
5 6
 from django.contrib.comments.models import Comment
6 7
 from django.contrib.comments.forms import CommentForm
7  
-from django.utils.importlib import import_module
8 8
 
9 9
 warnings.warn("django.contrib.comments is deprecated and will be removed before Django 1.8.", DeprecationWarning)
10 10
 
2  django/contrib/formtools/tests/wizard/storage.py
... ...
@@ -1,8 +1,8 @@
1 1
 from datetime import datetime
  2
+from importlib import import_module
2 3
 
3 4
 from django.http import HttpRequest
4 5
 from django.conf import settings
5  
-from django.utils.importlib import import_module
6 6
 
7 7
 from django.contrib.auth.models import User
8 8
 
3  django/contrib/formtools/tests/wizard/test_forms.py
... ...
@@ -1,11 +1,12 @@
1 1
 from __future__ import unicode_literals
2 2
 
  3
+from importlib import import_module
  4
+
3 5
 from django import forms, http
4 6
 from django.conf import settings
5 7
 from django.db import models
6 8
 from django.test import TestCase
7 9
 from django.template.response import TemplateResponse
8  
-from django.utils.importlib import import_module
9 10
 
10 11
 from django.contrib.auth.models import User
11 12
 
5  django/contrib/gis/geometry/backend/__init__.py
... ...
@@ -1,11 +1,12 @@
  1
+from importlib import import_module
  2
+
1 3
 from django.conf import settings
2 4
 from django.core.exceptions import ImproperlyConfigured
3  
-from django.utils.importlib import import_module
4 5
 
5 6
 geom_backend = getattr(settings, 'GEOMETRY_BACKEND', 'geos')
6 7
 
7 8
 try:
8  
-    module = import_module('.%s' % geom_backend, 'django.contrib.gis.geometry.backend')
  9
+    module = import_module('django.contrib.gis.geometry.backend.%s' % geom_backend)
9 10
 except ImportError:
10 11
     try:
11 12
         module = import_module(geom_backend)
3  django/contrib/sessions/management/commands/clearsessions.py
... ...
@@ -1,6 +1,7 @@
  1
+from importlib import import_module
  2
+
1 3
 from django.conf import settings
2 4
 from django.core.management.base import NoArgsCommand
3  
-from django.utils.importlib import import_module
4 5
 
5 6
 
6 7
 class Command(NoArgsCommand):
2  django/contrib/sessions/middleware.py
... ...
@@ -1,9 +1,9 @@
  1
+from importlib import import_module
1 2
 import time
2 3
 
3 4
 from django.conf import settings
4 5
 from django.utils.cache import patch_vary_headers
5 6
 from django.utils.http import cookie_date
6  
-from django.utils.importlib import import_module
7 7
 
8 8
 class SessionMiddleware(object):
9 9
     def __init__(self):
2  django/contrib/staticfiles/storage.py
... ...
@@ -1,5 +1,6 @@
1 1
 from __future__ import unicode_literals
2 2
 import hashlib
  3
+from importlib import import_module
3 4
 import os
4 5
 import posixpath
5 6
 import re
@@ -18,7 +19,6 @@
18 19
 from django.utils.datastructures import SortedDict
19 20
 from django.utils.encoding import force_bytes, force_text
20 21
 from django.utils.functional import LazyObject
21  
-from django.utils.importlib import import_module
22 22
 from django.utils._os import upath
23 23
 
24 24
 from django.contrib.staticfiles.utils import check_settings, matches_patterns
2  django/core/cache/__init__.py
@@ -14,6 +14,7 @@
14 14
 
15 15
 See docs/topics/cache.txt for information on the public API.
16 16
 """
  17
+import importlib
17 18
 try:
18 19
     from urllib.parse import parse_qsl
19 20
 except ImportError:     # Python 2
@@ -24,7 +25,6 @@
24 25
 from django.core.cache.backends.base import (
25 26
     InvalidCacheBackendError, CacheKeyWarning, BaseCache)
26 27
 from django.core.exceptions import ImproperlyConfigured
27  
-from django.utils import importlib
28 28
 from django.utils.module_loading import import_by_path
29 29
 
30 30
 
6  django/core/management/__init__.py
... ...
@@ -1,13 +1,13 @@
1 1
 import collections
  2
+import imp
  3
+from importlib import import_module
  4
+from optparse import OptionParser, NO_DEFAULT
2 5
 import os
3 6
 import sys
4  
-from optparse import OptionParser, NO_DEFAULT
5  
-import imp
6 7
 
7 8
 from django.core.exceptions import ImproperlyConfigured
8 9
 from django.core.management.base import BaseCommand, CommandError, handle_default_options
9 10
 from django.core.management.color import color_style
10  
-from django.utils.importlib import import_module
11 11
 from django.utils import six
12 12
 
13 13
 # For backwards compatibility: get_version() used to be in this module.
2  django/core/management/commands/flush.py
... ...
@@ -1,4 +1,5 @@
1 1
 import sys
  2
+from importlib import import_module
2 3
 from optparse import make_option
3 4
 
4 5
 from django.conf import settings
@@ -7,7 +8,6 @@
7 8
 from django.core.management.base import NoArgsCommand, CommandError
8 9
 from django.core.management.color import no_style
9 10
 from django.core.management.sql import sql_flush, emit_post_sync_signal
10  
-from django.utils.importlib import import_module
11 11
 from django.utils.six.moves import input
12 12
 from django.utils import six
13 13
 
3  django/core/management/commands/startapp.py
... ...
@@ -1,6 +1,7 @@
  1
+from importlib import import_module
  2
+
1 3
 from django.core.management.base import CommandError
2 4
 from django.core.management.templates import TemplateCommand
3  
-from django.utils.importlib import import_module
4 5
 
5 6
 
6 7
 class Command(TemplateCommand):
3  django/core/management/commands/startproject.py
... ...
@@ -1,7 +1,8 @@
  1
+from importlib import import_module
  2
+
1 3
 from django.core.management.base import CommandError
2 4
 from django.core.management.templates import TemplateCommand
3 5
 from django.utils.crypto import get_random_string
4  
-from django.utils.importlib import import_module
5 6
 
6 7
 
7 8
 class Command(TemplateCommand):
2  django/core/management/commands/syncdb.py
... ...
@@ -1,3 +1,4 @@
  1
+from importlib import import_module
1 2
 from optparse import make_option
2 3
 import itertools
3 4
 import traceback
@@ -9,7 +10,6 @@
9 10
 from django.core.management.sql import custom_sql_for_model, emit_post_sync_signal, emit_pre_sync_signal
10 11
 from django.db import connections, router, transaction, models, DEFAULT_DB_ALIAS
11 12
 from django.utils.datastructures import SortedDict
12  
-from django.utils.importlib import import_module
13 13
 
14 14
 
15 15
 class Command(NoArgsCommand):
3  django/core/serializers/__init__.py
@@ -16,8 +16,9 @@
16 16
 
17 17
 """
18 18
 
  19
+import importlib
  20
+
19 21
 from django.conf import settings
20  
-from django.utils import importlib
21 22
 from django.utils import six
22 23
 from django.core.serializers.base import SerializerDoesNotExist
23 24
 
2  django/core/servers/fastcgi.py
@@ -12,9 +12,9 @@
12 12
 pass to this server.
13 13
 """
14 14
 
  15
+import importlib
15 16
 import os
16 17
 import sys
17  
-from django.utils import importlib
18 18
 
19 19
 __version__ = "0.1"
20 20
 __all__ = ["runfastcgi"]
2  django/core/urlresolvers.py
@@ -8,6 +8,7 @@
8 8
 """
9 9
 from __future__ import unicode_literals
10 10
 
  11
+from importlib import import_module
11 12
 import re
12 13
 from threading import local
13 14
 
@@ -17,7 +18,6 @@
17 18
 from django.utils.encoding import force_str, force_text, iri_to_uri
18 19
 from django.utils.functional import memoize, lazy
19 20
 from django.utils.http import urlquote
20  
-from django.utils.importlib import import_module
21 21
 from django.utils.module_loading import module_has_submodule
22 22
 from django.utils.regex_helper import normalize
23 23
 from django.utils import six
2  django/db/backends/__init__.py
@@ -9,6 +9,7 @@
9 9
     from django.utils.six.moves import _dummy_thread as thread
10 10
 from collections import namedtuple
11 11
 from contextlib import contextmanager
  12
+from importlib import import_module
12 13
 
13 14
 from django.conf import settings
14 15
 from django.db import DEFAULT_DB_ALIAS
@@ -17,7 +18,6 @@
17 18
 from django.db.transaction import TransactionManagementError
18 19
 from django.db.utils import DatabaseErrorWrapper
19 20
 from django.utils.functional import cached_property
20  
-from django.utils.importlib import import_module
21 21
 from django.utils import six
22 22
 from django.utils import timezone
23 23
 
12  django/db/models/loading.py
... ...
@@ -1,17 +1,17 @@
1 1
 "Utilities for loading models and the modules that contain them."
2 2
 
  3
+import imp
  4
+from importlib import import_module
  5
+import os
  6
+import sys
  7
+
3 8
 from django.conf import settings
4 9
 from django.core.exceptions import ImproperlyConfigured
5 10
 from django.utils.datastructures import SortedDict
6  
-from django.utils.importlib import import_module
7 11
 from django.utils.module_loading import module_has_submodule
8 12
 from django.utils._os import upath
9 13
 from django.utils import six
10 14
 
11  
-import imp
12  
-import sys
13  
-import os
14  
-
15 15
 __all__ = ('get_apps', 'get_app', 'get_models', 'get_model', 'register_models',
16 16
         'load_app', 'app_cache_ready')
17 17
 
@@ -100,7 +100,7 @@ def load_app(self, app_name, can_postpone=False):
100 100
         self.nesting_level += 1
101 101
         app_module = import_module(app_name)
102 102
         try:
103  
-            models = import_module('.' + MODELS_MODULE_NAME, app_name)
  103
+            models = import_module('%s.%s' % (app_name, MODELS_MODULE_NAME))
104 104
         except ImportError:
105 105
             self.nesting_level -= 1
106 106
             # If the app doesn't have a models module, we can just ignore the
4  django/db/utils.py
... ...
@@ -1,4 +1,5 @@
1 1
 from functools import wraps
  2
+from importlib import import_module
2 3
 import os
3 4
 import pkgutil
4 5
 from threading import local
@@ -7,7 +8,6 @@
7 8
 from django.conf import settings
8 9
 from django.core.exceptions import ImproperlyConfigured
9 10
 from django.utils.functional import cached_property
10  
-from django.utils.importlib import import_module
11 11
 from django.utils.module_loading import import_by_path
12 12
 from django.utils._os import upath
13 13
 from django.utils import six
@@ -104,7 +104,7 @@ def inner(*args, **kwargs):
104 104
 def load_backend(backend_name):
105 105
     # Look for a fully qualified database backend name
106 106
     try:
107  
-        return import_module('.base', backend_name)
  107
+        return import_module('%s.base' % backend_name)
108 108
     except ImportError as e_user:
109 109
         # The database backend wasn't found. Display a helpful error message
110 110
         # listing all possible (built-in) database backends.
2  django/template/base.py
@@ -2,12 +2,12 @@
2 2
 
3 3
 import re
4 4
 from functools import partial
  5
+from importlib import import_module
5 6
 from inspect import getargspec
6 7
 
7 8
 from django.conf import settings
8 9
 from django.template.context import (Context, RequestContext,
9 10
     ContextPopException)
10  
-from django.utils.importlib import import_module
11 11
 from django.utils.itercompat import is_iterable
12 12
 from django.utils.text import (smart_split, unescape_string_literal,
13 13
     get_text_list)
2  django/template/loaders/app_directories.py
@@ -3,6 +3,7 @@
3 3
 packages.
4 4
 """
5 5
 
  6
+from importlib import import_module
6 7
 import os
7 8
 import sys
8 9
 
@@ -11,7 +12,6 @@
11 12
 from django.template.base import TemplateDoesNotExist
12 13
 from django.template.loader import BaseLoader
13 14
 from django.utils._os import safe_join
14  
-from django.utils.importlib import import_module
15 15
 from django.utils import six
16 16
 
17 17
 # At compile time, cache the directories to search.
2  django/test/client.py
@@ -5,6 +5,7 @@
5 5
 import re
6 6
 import mimetypes
7 7
 from copy import copy
  8
+from importlib import import_module
8 9
 from io import BytesIO
9 10
 try:
10 11
     from urllib.parse import unquote, urlparse, urlsplit
@@ -25,7 +26,6 @@
25 26
 from django.utils.functional import curry
26 27
 from django.utils.encoding import force_bytes, force_str
27 28
 from django.utils.http import urlencode
28  
-from django.utils.importlib import import_module
29 29
 from django.utils.itercompat import is_iterable
30 30
 from django.utils import six
31 31
 from django.test.utils import ContextList
2  django/test/simple.py
@@ -3,6 +3,7 @@
3 3
 version 1.8.
4 4
 
5 5
 """
  6
+from importlib import import_module
6 7
 import json
7 8
 import re
8 9
 import unittest as real_unittest
@@ -15,7 +16,6 @@
15 16
 # django.utils.unittest is deprecated, but so is django.test.simple,
16 17
 # and the latter will be removed before the former.
17 18
 from django.utils import unittest
18  
-from django.utils.importlib import import_module
19 19
 from django.utils.module_loading import module_has_submodule
20 20
 
21 21
 __all__ = ('DjangoTestSuiteRunner',)
4  django/utils/formats.py
... ...
@@ -1,10 +1,10 @@
1 1
 import decimal
2 2
 import datetime
  3
+from importlib import import_module
3 4
 import unicodedata
4 5
 
5 6
 from django.conf import settings
6 7
 from django.utils import dateformat, numberformat, datetime_safe
7  
-from django.utils.importlib import import_module
8 8
 from django.utils.encoding import force_str
9 9
 from django.utils.functional import lazy
10 10
 from django.utils.safestring import mark_safe
@@ -54,7 +54,7 @@ def iter_format_modules(lang):
54 54
         for location in format_locations:
55 55
             for loc in locales:
56 56
                 try:
57  
-                    yield import_module('.formats', location % loc)
  57
+                    yield import_module('%s.formats' % (location % loc))
58 58
                 except ImportError:
59 59
                     pass
60 60
 
5  django/utils/importlib.py
... ...
@@ -1,6 +1,11 @@
1 1
 # Taken from Python 2.7 with permission from/by the original author.
  2
+import warnings
2 3
 import sys
3 4
 
  5
+warnings.warn("django.utils.importlib will be removed in Django 1.9.",
  6
+    PendingDeprecationWarning, stacklevel=2)
  7
+
  8
+
4 9
 def _resolve_name(name, package, level):
5 10
     """Return the absolute name of the module to be imported."""
6 11
     if not hasattr(package, 'rindex'):
2  django/utils/module_loading.py
... ...
@@ -1,10 +1,10 @@
1 1
 import imp
  2
+from importlib import import_module
2 3
 import os
3 4
 import sys
4 5
 
5 6
 from django.core.exceptions import ImproperlyConfigured
6 7
 from django.utils import six
7  
-from django.utils.importlib import import_module
8 8
 
9 9
 
10 10
 def import_by_path(dotted_path, error_prefix=''):
2  django/utils/translation/trans_real.py
@@ -6,10 +6,10 @@
6 6
 import re
7 7
 import sys
8 8
 import gettext as gettext_module
  9
+from importlib import import_module
9 10
 from threading import local
10 11
 import warnings
11 12
 
12  
-from django.utils.importlib import import_module
13 13
 from django.utils.datastructures import SortedDict
14 14
 from django.utils.encoding import force_str, force_text
15 15
 from django.utils.functional import memoize
2  django/views/i18n.py
... ...
@@ -1,3 +1,4 @@
  1
+import importlib
1 2
 import json
2 3
 import os
3 4
 import gettext as gettext_module
@@ -5,7 +6,6 @@
5 6
 from django import http
6 7
 from django.conf import settings
7 8
 from django.template import Context, Template
8  
-from django.utils import importlib
9 9
 from django.utils.translation import check_for_language, to_locale, get_language
10 10
 from django.utils.encoding import smart_text
11 11
 from django.utils.formats import get_format_modules, get_format
2  docs/internals/deprecation.txt
@@ -412,6 +412,8 @@ these changes.
412 412
 
413 413
 * ``django.utils.dictconfig`` will be removed.
414 414
 
  415
+* ``django.utils.importlib`` will be removed.
  416
+
415 417
 * ``django.utils.unittest`` will be removed.
416 418
 
417 419
 * If models are organized in a package, Django will no longer look for
9  docs/releases/1.7.txt
@@ -122,11 +122,12 @@ Miscellaneous
122 122
 Features deprecated in 1.7
123 123
 ==========================
124 124
 
125  
-``django.utils.dictconfig``
126  
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
  125
+``django.utils.dictconfig``/``django.utils.importlib``
  126
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
127 127
 
128  
-``django.utils.dictconfig`` was a copy of :mod:`logging.config` provided for
129  
-Python versions prior to 2.7. It has been deprecated.
  128
+``django.utils.dictconfig`` and ``django.utils.importlib`` were copies of
  129
+respectively :mod:`logging.config` and :mod:`importlib` provided for Python
  130
+versions prior to 2.7. They have been deprecated.
130 131
 
131 132
 ``django.utils.unittest``
132 133
 ~~~~~~~~~~~~~~~~~~~~~~~~~
2  tests/i18n/tests.py
@@ -3,6 +3,7 @@
3 3
 
4 4
 import datetime
5 5
 import decimal
  6
+from importlib import import_module
6 7
 import os
7 8
 import pickle
8 9
 from threading import local
@@ -17,7 +18,6 @@
17 18
 from django.utils.formats import (get_format, date_format, time_format,
18 19
     localize, localize_input, iter_format_modules, get_format_modules,
19 20
     number_format, reset_format_cache, sanitize_separators)
20  
-from django.utils.importlib import import_module
21 21
 from django.utils.numberformat import format as nformat
22 22
 from django.utils._os import upath
23 23
 from django.utils.safestring import mark_safe, SafeBytes, SafeString, SafeText
2  tests/test_runner/tests.py
@@ -3,6 +3,7 @@
3 3
 """
4 4
 from __future__ import absolute_import, unicode_literals
5 5
 
  6
+from importlib import import_module
6 7
 from optparse import make_option
7 8
 import sys
8 9
 import unittest
@@ -13,7 +14,6 @@
13 14
 from django.test import runner, TestCase, TransactionTestCase, skipUnlessDBFeature
14 15
 from django.test.testcases import connections_support_transactions
15 16
 from django.test.utils import IgnoreAllDeprecationWarningsMixin
16  
-from django.utils.importlib import import_module
17 17
 
18 18
 from admin_scripts.tests import AdminScriptTestCase
19 19
 from .models import Person
2  tests/utils_tests/test_module_loading.py
... ...
@@ -1,11 +1,11 @@
1 1
 import imp
  2
+from importlib import import_module
2 3
 import os
3 4
 import sys
4 5
 import unittest
5 6
 from zipimport import zipimporter
6 7
 
7 8
 from django.core.exceptions import ImproperlyConfigured
8  
-from django.utils.importlib import import_module
9 9
 from django.utils.module_loading import import_by_path, module_has_submodule
10 10
 from django.utils._os import upath
11 11
 

0 notes on commit fdd7a35

Simon Charette

This will load the deprecated module since it's in the same package (I'm getting the deprecation warning on Python 2.7 at least).

I know import_module = __import__('importlib').import_module would load the correct module but it's definitely not pretty.

Alex Gaynor

You can add from __future__ import absolute_import.

Simon Charette

Idem, this will load the deprecated module.

Simon Charette

Ahhh I initialy tried that but I was fooled into thinking it wasn't working because of the double warning (see module_loading comment below).

I'll add those two __future__ imports.

Please sign in to comment.
Something went wrong with that request. Please try again.