-
-
Notifications
You must be signed in to change notification settings - Fork 60
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Steps to reproduce (used zipp==3.21.0):
import pathlib
import tempfile
import zipfile
tmp = pathlib.Path(tempfile.mkdtemp())
dummy = tmp / "dummy.zip"
with zipfile.ZipFile(dummy, "w") as file:
file.writestr("spam.txt", "eggs")
import zipp
file = zipp.Path(dummy)
print(file.name)
print(file.stem)
print(str(file))Output on Linux:
dummy.zip
dummy
/tmp/tmpufwzzke9/dummy.zip/
Output on Windows:
C:\Users\hoefling\AppData\Local\Temp\tmpkh18jxk7\dummy.zip
C:\Users\hoefling\AppData\Local\Temp\tmpkh18jxk7\dummy
C:\Users\hoefling\AppData\Local\Temp\tmpkh18jxk7\dummy.zip/
Is this a desired behaviour? BTW since python/cpython#106757 this is also the case in the stdlib's zipfile module.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working