mirror of https://github.com/django/django.git
[py3] Added compatibility import of thread/_thread
This commit fixes the auto-reload of the development server.
I should have done that change in ca07fda2
.
This commit is contained in:
parent
527f967ec1
commit
4c1286cf78
|
@ -1,7 +1,7 @@
|
||||||
from django.db.utils import DatabaseError
|
from django.db.utils import DatabaseError
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import thread
|
from django.utils.six.moves import _thread as thread
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from django.utils.six.moves import _dummy_thread as thread
|
from django.utils.six.moves import _dummy_thread as thread
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
import os, sys, time, signal
|
import os, sys, time, signal
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import thread
|
from django.utils.six.moves import _thread as thread
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from django.utils.six.moves import _dummy_thread as thread
|
from django.utils.six.moves import _dummy_thread as thread
|
||||||
|
|
||||||
|
|
|
@ -365,4 +365,6 @@ def iterlists(d):
|
||||||
"""Return an iterator over the values of a MultiValueDict."""
|
"""Return an iterator over the values of a MultiValueDict."""
|
||||||
return getattr(d, _iterlists)()
|
return getattr(d, _iterlists)()
|
||||||
|
|
||||||
|
|
||||||
add_move(MovedModule("_dummy_thread", "dummy_thread"))
|
add_move(MovedModule("_dummy_thread", "dummy_thread"))
|
||||||
|
add_move(MovedModule("_thread", "thread"))
|
||||||
|
|
|
@ -122,8 +122,8 @@ Moved modules
|
||||||
Some modules were renamed in Python 3. The :mod:`django.utils.six.moves
|
Some modules were renamed in Python 3. The :mod:`django.utils.six.moves
|
||||||
<six.moves>` module provides a compatible location to import them.
|
<six.moves>` module provides a compatible location to import them.
|
||||||
|
|
||||||
In addition to six' defaults, Django's version provides ``dummy_thread`` as
|
In addition to six' defaults, Django's version provides ``thread`` as
|
||||||
``_dummy_thread``.
|
``_thread`` and ``dummy_thread`` as ``_dummy_thread``.
|
||||||
|
|
||||||
PY3
|
PY3
|
||||||
---
|
---
|
||||||
|
|
Loading…
Reference in New Issue