Fix ZipFile bug in Python 3.6+ · pandas-dev/pandas@592cf92 (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 592cf92
Fix ZipFile bug in Python 3.6+
File tree
1 file changed
lines changed
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -278,7 +278,7 @@ def file_path_to_url(path): | ||
278 | 278 | |
279 | 279 | # ZipFile is not a context manager for <= 2.6 |
280 | 280 | # 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: | |
282 | 282 | @contextmanager |
283 | 283 | def ZipFile(*args, **kwargs): |
284 | 284 | with closing(zipfile.ZipFile(*args, **kwargs)) as zf: |