Bump importlib-metadata from 4.11.3 to 4.11.4 (#1750)

* Bump importlib-metadata from 4.11.3 to 4.11.4

Bumps [importlib-metadata](https://github.com/python/importlib_metadata) from 4.11.3 to 4.11.4.
- [Release notes](https://github.com/python/importlib_metadata/releases)
- [Changelog](https://github.com/python/importlib_metadata/blob/main/CHANGES.rst)
- [Commits](https://github.com/python/importlib_metadata/compare/v4.11.3...v4.11.4)

---
updated-dependencies:
- dependency-name: importlib-metadata
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Update importlib-metadata==4.11.4

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] 2022-05-23 10:45:11 -07:00 committed by GitHub
parent bb01141cfc
commit 248fb6724a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 9 deletions

View file

@ -956,13 +956,26 @@ class PathDistribution(Distribution):
normalized name from the file system path.
"""
stem = os.path.basename(str(self._path))
return self._name_from_stem(stem) or super()._normalized_name
return (
pass_none(Prepared.normalize)(self._name_from_stem(stem))
or super()._normalized_name
)
def _name_from_stem(self, stem):
name, ext = os.path.splitext(stem)
@staticmethod
def _name_from_stem(stem):
"""
>>> PathDistribution._name_from_stem('foo-3.0.egg-info')
'foo'
>>> PathDistribution._name_from_stem('CherryPy-3.0.dist-info')
'CherryPy'
>>> PathDistribution._name_from_stem('face.egg-info')
'face'
>>> PathDistribution._name_from_stem('foo.bar')
"""
filename, ext = os.path.splitext(stem)
if ext not in ('.dist-info', '.egg-info'):
return
name, sep, rest = stem.partition('-')
name, sep, rest = filename.partition('-')
return name
@ -1002,6 +1015,15 @@ def version(distribution_name):
return distribution(distribution_name).version
_unique = functools.partial(
unique_everseen,
key=operator.attrgetter('_normalized_name'),
)
"""
Wrapper for ``distributions`` to return unique distributions by name.
"""
def entry_points(**params) -> Union[EntryPoints, SelectableGroups]:
"""Return EntryPoint objects for all installed packages.
@ -1019,10 +1041,8 @@ def entry_points(**params) -> Union[EntryPoints, SelectableGroups]:
:return: EntryPoints or SelectableGroups for all installed packages.
"""
norm_name = operator.attrgetter('_normalized_name')
unique = functools.partial(unique_everseen, key=norm_name)
eps = itertools.chain.from_iterable(
dist.entry_points for dist in unique(distributions())
dist.entry_points for dist in _unique(distributions())
)
return SelectableGroups.load(eps).select(**params)

View file

@ -1,5 +1,5 @@
apscheduler==3.9.1
importlib-metadata==4.11.3
importlib-metadata==4.11.4
importlib-resources==5.7.1
pyinstaller==5.1
pyopenssl==22.0.0

View file

@ -18,7 +18,7 @@ gntp==1.0.3
html5lib==1.1
httpagentparser==1.9.2
idna==3.3
importlib-metadata==4.11.3
importlib-metadata==4.11.4
importlib-resources==5.7.1
git+https://github.com/Tautulli/ipwhois.git@master#egg=ipwhois
IPy==1.01