-
-
Notifications
You must be signed in to change notification settings - Fork 59
Restore support for special filenames #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 <[email protected]>
…ythonGH-123354) Applies changes from zipp 3.20.1 and jaraco/zippGH-124 (cherry picked from commit 2231286) Co-authored-by: Jason R. Coombs <[email protected]>
…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 <[email protected]>
…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 <[email protected]>
…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 <[email protected]>
…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 <[email protected]>
…H-123354) (#123410) 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 2231286) Co-authored-by: Jason R. Coombs <[email protected]>
…H-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 2231286) Co-authored-by: Jason R. Coombs <[email protected]>
…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 <[email protected]> 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 <[email protected]>
…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 <[email protected]>
…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 <[email protected]> * 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 <[email protected]>
…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 <[email protected]>
Closes python/cpython#123270