Skip to content

Commit

Permalink
Fix DeprecationWarning for collections.Iterable import (#1417)
Browse files Browse the repository at this point in the history
* Fix DeprecationWarning for collections.Iterable import

* Simplify version comparison
  • Loading branch information
adamjstewart authored and fmassa committed Oct 7, 2019
1 parent b13931a commit a141363
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion torchvision/datasets/lsun.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
import six
import string
import sys
from collections import Iterable

if sys.version_info < (3, 3):
from collections import Iterable
else:
from collections.abc import Iterable

if sys.version_info[0] == 2:
import cPickle as pickle
Expand Down

0 comments on commit a141363

Please sign in to comment.