-
-
Notifications
You must be signed in to change notification settings - Fork 60
str(Path(...)) can raise TypeError #134
Copy link
Copy link
Closed
Description
Downstream issue: python/cpython#100609
str(zipp.Path(...)) currently raises TypeError if the ZipFile object is initialised with a fileobj rather than a path. Given that object.__str__() doesn't raise, I think it's a bug that zipp.Path.__str__() does.
(Other zipp.Path attributes like filename, name and parent have the same behaviour, but they're not attributes of object, so it's less of an issue)
There's at least two possible solutions:
- Use a
":fileobj:"prefix for fileobj-backed zip files - Use
self.atwith no prefix in all cases
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels