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 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 time import sleep, time
|
||||
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
"""URL Utilities."""
|
||||
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
|
||||
|
||||
try:
|
||||
|
|
|
@ -8,7 +8,13 @@ import sys
|
|||
import time
|
||||
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 case import Mock, call, patch, skip
|
||||
|
|
Loading…
Reference in New Issue