#25868: Importing django.test.utils.get_runner fails on Django 1.9 with Python 
3.3
-----------------------------------+--------------------
     Reporter:  sobotklp           |      Owner:  nobody
         Type:  Bug                |     Status:  new
    Component:  Testing framework  |    Version:  1.9
     Severity:  Normal             |   Keywords:
 Triage Stage:  Unreviewed         |  Has patch:  0
Easy pickings:  0                  |      UI/UX:  0
-----------------------------------+--------------------
 The following code:
 {{{
 from django.test.utils import get_runner
 }}}

 Errors out with the following traceback in Django 1.9 with Python 3.3:

 {{{
 Traceback (most recent call last):
   File "runtests.py", line 116, in <module>
     runtests(failfast=options.failfast, verbosity=options.verbosity,
 coverage=options.coverage, *args)
   File "runtests.py", line 92, in runtests
     from django.test.utils import get_runner
   File "/usr/local/lib/python3.3/site-packages/django/test/__init__.py",
 line 5, in <module>
     from django.test.client import Client, RequestFactory
   File "/usr/local/lib/python3.3/site-packages/django/test/client.py",
 line 12, in <module>
     from django.apps import apps
   File "/usr/local/lib/python3.3/site-packages/django/apps/__init__.py",
 line 1, in <module>
     from .config import AppConfig
   File "/usr/local/lib/python3.3/site-packages/django/apps/config.py",
 line 6, in <module>
     from django.utils.module_loading import module_has_submodule
   File "/usr/local/lib/python3.3/site-
 packages/django/utils/module_loading.py", line 67, in <module>
     from importlib.util import find_spec as importlib_find
 ImportError: cannot import name find_spec
 }}}

 Apparently importlib.util.find_spec appeared in Python 3.4 and thus fails
 to import in Python 3.2 and 3.3:
 https://docs.python.org/3/library/importlib.html#importlib.util.find_spec

--
Ticket URL: <https://code.djangoproject.com/ticket/25868>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.4b8d53adb67f66521f5bc0f208226f85%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to