Skip to content

Commit

Permalink
Fix collections import DeprecationWarning
Browse files Browse the repository at this point in the history
Fixes this warning in Python 3.7:

```
/path/to/lib/python3.7/site-packages/sievelib/commands.py:26
  /path/to/lib/python3.7/site-packages/sievelib/commands.py:26: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
    from collections import Iterable
```
  • Loading branch information
icgood committed May 4, 2019
1 parent 88822d1 commit 4d386a9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sievelib/commands.py
Expand Up @@ -23,9 +23,13 @@
"""
from __future__ import unicode_literals

from collections import Iterable
import sys

try:
from collections.abc import Iterable
except ImportError: # python < 3.3
from collections import Iterable

from future.utils import python_2_unicode_compatible

from . import tools
Expand Down

0 comments on commit 4d386a9

Please sign in to comment.