Skip to content

Commit afdba55

Browse files
authored
Merge pull request #421 from danyeaw/fix-deprecated-mapping
Fix deprecation warnings for abc module in Python 3.7
2 parents 1db97a1 + 13611f3 commit afdba55

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/past/builtins/misc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
from __future__ import unicode_literals
2-
import sys
2+
33
import inspect
4-
from collections import Mapping
54

65
from future.utils import PY3, exec_
76

8-
97
if PY3:
108
import builtins
9+
from collections.abc import Mapping
1110

1211
def apply(f, *args, **kw):
1312
return f(*args, **kw)
@@ -44,6 +43,7 @@ def oct(number):
4443
xrange = range
4544
else:
4645
import __builtin__
46+
from collections import Mapping
4747
apply = __builtin__.apply
4848
chr = __builtin__.chr
4949
cmp = __builtin__.cmp

src/past/types/oldstr.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
Pure-Python implementation of a Python 2-like str object for Python 3.
33
"""
44

5-
from collections import Iterable
65
from numbers import Integral
76

8-
from past.utils import PY2, with_metaclass
9-
7+
from past.utils import with_metaclass
108

119
_builtin_bytes = bytes
1210

0 commit comments

Comments
 (0)