Skip to content

Commit 41382d9

Browse files
authored
Merge pull request #580 from narfman0/abc-fixes
-Fix ABC deprecations, targeted for removal in python 3.8
2 parents c4c1c3a + 62e0efa commit 41382d9

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

flask_restplus/reqparse.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
import decimal
55
import six
66

7-
from collections import Hashable
7+
try:
8+
from collections.abc import Hashable
9+
except ImportError:
10+
from collections import Hashable
811
from copy import deepcopy
912
from flask import current_app, request
1013

flask_restplus/swagger.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
import re
66

77
from inspect import isclass, getdoc
8-
from collections import OrderedDict, Hashable
8+
from collections import OrderedDict
9+
try:
10+
from collections.abc import Hashable
11+
except ImportError:
12+
from collections import Hashable
913
from six import string_types, itervalues, iteritems, iterkeys
1014

1115
from flask import current_app

0 commit comments

Comments
 (0)