Fix ZipFile bug in Python 3.6+ · pandas-dev/pandas@592cf92 (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- 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
Lines changed: 1 addition & 1 deletion
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: |