Skip to content

Commit dae62fd

Browse files
authored
Merge pull request #94 from amrishparmar/patch-1
Fix deprecated use of `collections` module
2 parents a7ec757 + a1ab930 commit dae62fd

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

nameparser/config/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
from __future__ import unicode_literals
3232
from collections.abc import Set
3333
import sys
34+
try:
35+
# Python 3.3+
36+
from collections.abc import Set
37+
except ImportError:
38+
from collections import Set
3439

3540
from nameparser.util import binary_type
3641
from nameparser.util import lc
@@ -48,7 +53,7 @@
4853
class SetManager(Set):
4954
'''
5055
Easily add and remove config variables per module or instance. Subclass of
51-
``collections.Set``.
56+
``collections.abc.Set``.
5257
5358
Only special functionality beyond that provided by set() is
5459
to normalize constants for comparison (lower case, no periods)

0 commit comments

Comments
 (0)