0001-python3-use-six.class_types-to-check-for-classes-365.patch
wcs/monkeypatch.py | ||
---|---|---|
17 | 17 |
import threading |
18 | 18 |
import types |
19 | 19 | |
20 |
from django.utils import six |
|
20 | 21 |
from django.utils.six.moves.urllib import parse as urlparse |
21 | 22 | |
22 | 23 |
import quixote |
... | ... | |
88 | 89 |
_thread_local.publisher = None |
89 | 90 | |
90 | 91 | |
91 |
for key, value in locals().items():
|
|
92 |
if type(value) in (types.FunctionType, types.TypeType, types.ClassType):
|
|
92 |
for key, value in list(locals().items()):
|
|
93 |
if type(value) in (types.FunctionType,) + six.class_types:
|
|
93 | 94 |
setattr(quixote, key, value) |
94 | 95 |
setattr(quixote.publish, key, value) |
95 |
- |