Repository navigation
Restore support for special filenames - #124
Conversation
3798bb6 to
3eb3ff9
Compare
…ignored and .. to be a path segment.
Restores expectations around special characters in zipfiles, but also restores the infinite loop.
…slash. Alternate and more surgical fix for #119. Ref python/cpython#123270
3eb3ff9 to
0a3a7b4
Compare
|
That's interesting. The new ____________________ TestPath.test_backslash_not_separator ____________________
self = <tests.test_path.TestPath testMethod=test_backslash_not_separator>
def test_backslash_not_separator(self):
"""
In a zip file, backslashes are not separators.
"""
data = io.BytesIO()
zf = zipfile.ZipFile(data, "w")
zf.writestr("foo\\bar", b"content")
zf.filename = ''
root = zipfile.Path(zf)
(first,) = root.iterdir()
> assert not first.is_dir()
E AssertionError
tests\test_path.py:634: AssertionErrorIt's not immediately obvious to me why. |
Oh yeah, |
I confirmed the same. I wonder if it's possible to construct a ZipFile with backslashes on Windows. |
Looks like I can maybe overwrite the |
7708409 to
a421f7e
Compare
1cb70be to
cc61e61
Compare
|
@obfusk, any comments before I merge and cut a release? |
|
LGTM 👍 |
Applies changes from zipp 3.20.1 and jaraco/zipp#124
Applies changes from zipp 3.20.1 and jaraco/zipp#124
Applies changes from zipp 3.20.1 and jaraco/zipp#124
…ythonGH-123354) Applies changes from zipp 3.20.1 and jaraco/zippGH-124 (cherry picked from commit 2231286) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
…ythonGH-123354) Applies changes from zipp 3.20.1 and jaraco/zippGH-124 (cherry picked from commit 2231286) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
…fix. (pythonGH-123354) Applies changes from zipp 3.20.1 and jaraco/zippGH-124 (cherry picked from commit 2231286) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
…rgical fix. (pythonGH-123354) Applies changes from zipp 3.20.1 and jaraco/zippGH-124 (cherry picked from commit 2231286) (cherry picked from commit 17b77bb) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
…gical fix. (pythonGH-123354) Applies changes from zipp 3.20.1 and jaraco/zippGH-124 (cherry picked from commit 2231286) (cherry picked from commit 17b77bb) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
…re surgical fix. (pythonGH-123354) Applies changes from zipp 3.20.1 and jaraco/zippGH-124 (cherry picked from commit 2231286) (cherry picked from commit 17b77bb) (cherry picked from commit 66d3383) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
…GH-123354) (#123411) gh-123270: Replaced SanitizedNames with a more surgical fix. (GH-123354) Applies changes from zipp 3.20.1 and jaraco/zippGH-124 (cherry picked from commit 2231286d78d328c2f575e0b05b16fe447d1656d6) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> CPython-sync-commit-latest: 95b073bddefa6243effa08e131e297c0383e7f6a
…H-123354) (#123433) Applies changes from zipp 3.20.1 and jaraco/zippGH-124 (cherry picked from commit 2231286) (cherry picked from commit 17b77bb) (cherry picked from commit 66d3383) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
…H-123354) (#123432) Applies changes from zipp 3.20.1 and jaraco/zippGH-124 (cherry picked from commit 2231286) (cherry picked from commit 17b77bb) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
…H-123354) (#123425) Applies changes from zipp 3.20.1 and jaraco/zippGH-124 (cherry picked from commit 2231286) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> * Restore the slash-prefixed paths in the malformed_paths test.
…H-123354) (#123426) Applies changes from zipp 3.20.1 and jaraco/zippGH-124 (cherry picked from commit 2231286) (cherry picked from commit 17b77bb) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
…file.Path.name. (#123694) Applies changes from zipp 3.20.1 and jaraco/zippGH-124 (cherry picked from commit 2231286) (cherry picked from commit 17b77bb) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Closes python/cpython#123270