diff --git a/zipp.py b/zipp.py index 837237c..52c82a0 100644 --- a/zipp.py +++ b/zipp.py @@ -101,7 +101,7 @@ def make(cls, source): return source if not isinstance(source, zipfile.ZipFile): - return cls(_pathlib_compat(source)) + return cls(source) # Only allow for FastLookup when supplied zipfile is read-only if 'r' not in source.mode: @@ -130,17 +130,6 @@ def _name_set(self): return self.__lookup -def _pathlib_compat(path): - """ - For path-like objects, convert to a filename for compatibility - on Python 3.6.1 and earlier. - """ - try: - return path.__fspath__() - except AttributeError: - return str(path) - - class Path: """ A pathlib-compatible interface for zip files. @@ -308,7 +297,7 @@ def __repr__(self): return self.__repr.format(self=self) def joinpath(self, *other): - next = posixpath.join(self.at, *map(_pathlib_compat, other)) + next = posixpath.join(self.at, *other) return self._next(self.root.resolve_dir(next)) __truediv__ = joinpath