Fix DeprecationWarning on collections import

This commit is contained in:
xtreak 2018-12-29 16:46:14 +05:30 committed by David Lord
parent c9245609f4
commit e4ebbd3f5b
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
2 changed files with 4 additions and 2 deletions

View file

@ -28,6 +28,7 @@ if not PY2:
from inspect import getfullargspec as getargspec
from io import StringIO
import collections.abc as collections_abc
def reraise(tp, value, tb=None):
if value.__traceback__ is not tb:
@ -47,6 +48,7 @@ else:
from inspect import getargspec
from cStringIO import StringIO
import collections as collections_abc
exec('def reraise(tp, value, tb=None):\n raise tp, value, tb')

View file

@ -11,17 +11,17 @@
import hashlib
import warnings
from collections import MutableMapping
from datetime import datetime
from itsdangerous import BadSignature, URLSafeTimedSerializer
from werkzeug.datastructures import CallbackDict
from flask._compat import collections_abc
from flask.helpers import is_ip, total_seconds
from flask.json.tag import TaggedJSONSerializer
class SessionMixin(MutableMapping):
class SessionMixin(collections_abc.MutableMapping):
"""Expands a basic dictionary with session attributes."""
@property