From dd59a79005fe0e5e2e6592074503af319374fa62 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Apr 2022 18:42:59 -0700 Subject: [PATCH] Bump zipp from 3.7.0 to 3.8.0 (#1706) * Bump zipp from 3.7.0 to 3.8.0 Bumps [zipp](https://github.com/jaraco/zipp) from 3.7.0 to 3.8.0. - [Release notes](https://github.com/jaraco/zipp/releases) - [Changelog](https://github.com/jaraco/zipp/blob/main/CHANGES.rst) - [Commits](https://github.com/jaraco/zipp/compare/v3.7.0...v3.8.0) --- updated-dependencies: - dependency-name: zipp dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Update zipp==3.8.0 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> [skip ci] --- lib/zipp.py | 23 +++-------------------- requirements.txt | 2 +- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/lib/zipp.py b/lib/zipp.py index 26b723c1..52c82a0e 100644 --- a/lib/zipp.py +++ b/lib/zipp.py @@ -3,14 +3,8 @@ import posixpath import zipfile import itertools import contextlib -import sys import pathlib -if sys.version_info < (3, 7): - from collections import OrderedDict -else: - OrderedDict = dict - __all__ = ['Path'] @@ -56,7 +50,7 @@ def _ancestry(path): path, tail = posixpath.split(path) -_dedupe = OrderedDict.fromkeys +_dedupe = dict.fromkeys """Deduplicate an iterable in original order""" @@ -107,7 +101,7 @@ class CompleteDirs(zipfile.ZipFile): 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: @@ -136,17 +130,6 @@ class FastLookup(CompleteDirs): 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. @@ -314,7 +297,7 @@ class Path: 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 diff --git a/requirements.txt b/requirements.txt index c4fe538f..0810ddc5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -48,7 +48,7 @@ urllib3==1.26.8 webencodings==0.5.1 websocket-client==1.2.3 xmltodict==0.12.0 -zipp==3.7.0 +zipp==3.8.0 # configobj==5.1.0 # sgmllib3k==1.0.0