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')