Bump zipp from 3.15.0 to 3.16.2 (#2124)

* Bump zipp from 3.15.0 to 3.16.2

Bumps [zipp](https://github.com/jaraco/zipp) from 3.15.0 to 3.16.2.
- [Release notes](https://github.com/jaraco/zipp/releases)
- [Changelog](https://github.com/jaraco/zipp/blob/main/NEWS.rst)
- [Commits](https://github.com/jaraco/zipp/compare/v3.15.0...v3.16.2)

---
updated-dependencies:
- dependency-name: zipp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update zipp==3.16.2

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>

[skip ci]
This commit is contained in:
dependabot[bot] 2023-08-24 12:05:25 -07:00 committed by GitHub
commit 69d052f758
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 55 additions and 22 deletions

View file

@ -5,9 +5,9 @@ import itertools
import contextlib
import pathlib
import re
import fnmatch
from .py310compat import text_encoding
from .glob import translate
__all__ = ['Path']
@ -298,21 +298,24 @@ class Path:
encoding, args, kwargs = _extract_text_encoding(*args, **kwargs)
return io.TextIOWrapper(stream, encoding, *args, **kwargs)
def _base(self):
return pathlib.PurePosixPath(self.at or self.root.filename)
@property
def name(self):
return pathlib.Path(self.at).name or self.filename.name
return self._base().name
@property
def suffix(self):
return pathlib.Path(self.at).suffix or self.filename.suffix
return self._base().suffix
@property
def suffixes(self):
return pathlib.Path(self.at).suffixes or self.filename.suffixes
return self._base().suffixes
@property
def stem(self):
return pathlib.Path(self.at).stem or self.filename.stem
return self._base().stem
@property
def filename(self):
@ -349,7 +352,7 @@ class Path:
return filter(self._is_child, subs)
def match(self, path_pattern):
return pathlib.Path(self.at).match(path_pattern)
return pathlib.PurePosixPath(self.at).match(path_pattern)
def is_symlink(self):
"""
@ -357,22 +360,13 @@ class Path:
"""
return False
def _descendants(self):
for child in self.iterdir():
yield child
if child.is_dir():
yield from child._descendants()
def glob(self, pattern):
if not pattern:
raise ValueError(f"Unacceptable pattern: {pattern!r}")
matches = re.compile(fnmatch.translate(pattern)).fullmatch
return (
child
for child in self._descendants()
if matches(str(child.relative_to(self)))
)
prefix = re.escape(self.at)
matches = re.compile(prefix + translate(pattern)).fullmatch
return map(self._next, filter(matches, self.root.namelist()))
def rglob(self, pattern):
return self.glob(f'**/{pattern}')