mirror of https://github.com/celery/kombu.git
import collections.ABCs from correct module (#992)
* import collectionss.ABCs from correct model to silence deprecation warnings * fix imports for legacy python
This commit is contained in:
parent
2dff21c42b
commit
024cbdc4fb
|
@ -5,7 +5,13 @@ import random
|
||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
from collections import Iterable, Mapping, OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
|
try:
|
||||||
|
from collections.abc import Iterable, Mapping
|
||||||
|
except ImportError:
|
||||||
|
from collections import Iterable, Mapping
|
||||||
|
|
||||||
from itertools import count, repeat
|
from itertools import count, repeat
|
||||||
from time import sleep, time
|
from time import sleep, time
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
"""URL Utilities."""
|
"""URL Utilities."""
|
||||||
from __future__ import absolute_import, unicode_literals
|
from __future__ import absolute_import, unicode_literals
|
||||||
|
|
||||||
from collections import Mapping
|
try:
|
||||||
|
from collections.abc import Mapping
|
||||||
|
except ImportError:
|
||||||
|
from collections import Mapping
|
||||||
|
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -8,7 +8,13 @@ import sys
|
||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from collections import Callable, OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
|
try:
|
||||||
|
from collections.abc import Callable
|
||||||
|
except ImportError:
|
||||||
|
from collections import Callable
|
||||||
|
|
||||||
from itertools import count
|
from itertools import count
|
||||||
|
|
||||||
from case import Mock, call, patch, skip
|
from case import Mock, call, patch, skip
|
||||||
|
|
Loading…
Reference in New Issue