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:
Lars Rinn 2019-01-17 23:08:28 +01:00 committed by Omer Katz
parent 2dff21c42b
commit 024cbdc4fb
3 changed files with 19 additions and 3 deletions

View File

@ -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

View File

@ -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:

View File

@ -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