Skip to content

Fix deprecation warnings for abc module in Python 3.7 #421

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/past/builtins/misc.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
from __future__ import unicode_literals
import sys

import inspect
from collections import Mapping

from future.utils import PY3, exec_


if PY3:
import builtins
from collections.abc import Mapping

def apply(f, *args, **kw):
return f(*args, **kw)
Expand Down Expand Up @@ -44,6 +43,7 @@ def oct(number):
xrange = range
else:
import __builtin__
from collections import Mapping
apply = __builtin__.apply
chr = __builtin__.chr
cmp = __builtin__.cmp
Expand Down
4 changes: 1 addition & 3 deletions src/past/types/oldstr.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
Pure-Python implementation of a Python 2-like str object for Python 3.
"""

from collections import Iterable
from numbers import Integral

from past.utils import PY2, with_metaclass

from past.utils import with_metaclass

_builtin_bytes = bytes

Expand Down