Skip to content

Commit 8e5dc90

Browse files
committed
Fix ZipFile bug in Python 3.6+
1 parent 876b257 commit 8e5dc90

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
@@ -276,7 +276,7 @@ def file_path_to_url(path):
276276

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

0 commit comments

Comments
 (0)