Skip to content

Commit ef61a66

Browse files
committed
Fix ZipFile bug in Python 3.6+
1 parent 2e98601 commit ef61a66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/io/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def file_path_to_url(path):
278278

279279
# ZipFile is not a context manager for <= 2.6
280280
# must be tuple index here since 2.6 doesn't use namedtuple for version_info
281-
if sys.version_info[1] <= 6:
281+
if compat.PY2 and sys.version_info[1] <= 6:
282282
@contextmanager
283283
def ZipFile(*args, **kwargs):
284284
with closing(zipfile.ZipFile(*args, **kwargs)) as zf:

0 commit comments

Comments
 (0)