mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 21:21:15 -07:00
Bump importlib-metadata from 7.1.0 to 8.0.0 (#2360)
* Bump importlib-metadata from 7.1.0 to 8.0.0 Bumps [importlib-metadata](https://github.com/python/importlib_metadata) from 7.1.0 to 8.0.0. - [Release notes](https://github.com/python/importlib_metadata/releases) - [Changelog](https://github.com/python/importlib_metadata/blob/main/NEWS.rst) - [Commits](https://github.com/python/importlib_metadata/compare/v7.1.0...v8.0.0) --- updated-dependencies: - dependency-name: importlib-metadata dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Update importlib-metadata==8.0.0 --------- 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>
This commit is contained in:
parent
e934d09eff
commit
50ced86ba5
5 changed files with 40 additions and 44 deletions
|
@ -12,14 +12,13 @@ import inspect
|
||||||
import pathlib
|
import pathlib
|
||||||
import operator
|
import operator
|
||||||
import textwrap
|
import textwrap
|
||||||
import warnings
|
|
||||||
import functools
|
import functools
|
||||||
import itertools
|
import itertools
|
||||||
import posixpath
|
import posixpath
|
||||||
import collections
|
import collections
|
||||||
|
|
||||||
from . import _adapters, _meta
|
from . import _meta
|
||||||
from .compat import py39
|
from .compat import py39, py311
|
||||||
from ._collections import FreezableDefaultDict, Pair
|
from ._collections import FreezableDefaultDict, Pair
|
||||||
from ._compat import (
|
from ._compat import (
|
||||||
NullFinder,
|
NullFinder,
|
||||||
|
@ -334,27 +333,7 @@ class FileHash:
|
||||||
return f'<FileHash mode: {self.mode} value: {self.value}>'
|
return f'<FileHash mode: {self.mode} value: {self.value}>'
|
||||||
|
|
||||||
|
|
||||||
class DeprecatedNonAbstract:
|
class Distribution(metaclass=abc.ABCMeta):
|
||||||
# Required until Python 3.14
|
|
||||||
def __new__(cls, *args, **kwargs):
|
|
||||||
all_names = {
|
|
||||||
name for subclass in inspect.getmro(cls) for name in vars(subclass)
|
|
||||||
}
|
|
||||||
abstract = {
|
|
||||||
name
|
|
||||||
for name in all_names
|
|
||||||
if getattr(getattr(cls, name), '__isabstractmethod__', False)
|
|
||||||
}
|
|
||||||
if abstract:
|
|
||||||
warnings.warn(
|
|
||||||
f"Unimplemented abstract methods {abstract}",
|
|
||||||
DeprecationWarning,
|
|
||||||
stacklevel=2,
|
|
||||||
)
|
|
||||||
return super().__new__(cls)
|
|
||||||
|
|
||||||
|
|
||||||
class Distribution(DeprecatedNonAbstract):
|
|
||||||
"""
|
"""
|
||||||
An abstract Python distribution package.
|
An abstract Python distribution package.
|
||||||
|
|
||||||
|
@ -461,6 +440,9 @@ class Distribution(DeprecatedNonAbstract):
|
||||||
Custom providers may provide the METADATA file or override this
|
Custom providers may provide the METADATA file or override this
|
||||||
property.
|
property.
|
||||||
"""
|
"""
|
||||||
|
# deferred for performance (python/cpython#109829)
|
||||||
|
from . import _adapters
|
||||||
|
|
||||||
opt_text = (
|
opt_text = (
|
||||||
self.read_text('METADATA')
|
self.read_text('METADATA')
|
||||||
or self.read_text('PKG-INFO')
|
or self.read_text('PKG-INFO')
|
||||||
|
@ -567,9 +549,8 @@ class Distribution(DeprecatedNonAbstract):
|
||||||
return
|
return
|
||||||
|
|
||||||
paths = (
|
paths = (
|
||||||
(subdir / name)
|
py311.relative_fix((subdir / name).resolve())
|
||||||
.resolve()
|
.relative_to(self.locate_file('').resolve(), walk_up=True)
|
||||||
.relative_to(self.locate_file('').resolve())
|
|
||||||
.as_posix()
|
.as_posix()
|
||||||
for name in text.splitlines()
|
for name in text.splitlines()
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,20 +1,8 @@
|
||||||
import functools
|
|
||||||
import warnings
|
|
||||||
import re
|
import re
|
||||||
import textwrap
|
import textwrap
|
||||||
import email.message
|
import email.message
|
||||||
|
|
||||||
from ._text import FoldedCase
|
from ._text import FoldedCase
|
||||||
from ._compat import pypy_partial
|
|
||||||
|
|
||||||
|
|
||||||
# Do not remove prior to 2024-01-01 or Python 3.14
|
|
||||||
_warn = functools.partial(
|
|
||||||
warnings.warn,
|
|
||||||
"Implicit None on return values is deprecated and will raise KeyErrors.",
|
|
||||||
DeprecationWarning,
|
|
||||||
stacklevel=pypy_partial(2),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class Message(email.message.Message):
|
class Message(email.message.Message):
|
||||||
|
@ -53,12 +41,17 @@ class Message(email.message.Message):
|
||||||
|
|
||||||
def __getitem__(self, item):
|
def __getitem__(self, item):
|
||||||
"""
|
"""
|
||||||
Warn users that a ``KeyError`` can be expected when a
|
Override parent behavior to typical dict behavior.
|
||||||
missing key is supplied. Ref python/importlib_metadata#371.
|
|
||||||
|
``email.message.Message`` will emit None values for missing
|
||||||
|
keys. Typical mappings, including this ``Message``, will raise
|
||||||
|
a key error for missing keys.
|
||||||
|
|
||||||
|
Ref python/importlib_metadata#371.
|
||||||
"""
|
"""
|
||||||
res = super().__getitem__(item)
|
res = super().__getitem__(item)
|
||||||
if res is None:
|
if res is None:
|
||||||
_warn()
|
raise KeyError(item)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def _repair_headers(self):
|
def _repair_headers(self):
|
||||||
|
|
22
lib/importlib_metadata/compat/py311.py
Normal file
22
lib/importlib_metadata/compat/py311.py
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
import os
|
||||||
|
import pathlib
|
||||||
|
import sys
|
||||||
|
import types
|
||||||
|
|
||||||
|
|
||||||
|
def wrap(path): # pragma: no cover
|
||||||
|
"""
|
||||||
|
Workaround for https://github.com/python/cpython/issues/84538
|
||||||
|
to add backward compatibility for walk_up=True.
|
||||||
|
An example affected package is dask-labextension, which uses
|
||||||
|
jupyter-packaging to install JupyterLab javascript files outside
|
||||||
|
of site-packages.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def relative_to(root, *, walk_up=False):
|
||||||
|
return pathlib.Path(os.path.relpath(path, root))
|
||||||
|
|
||||||
|
return types.SimpleNamespace(relative_to=relative_to)
|
||||||
|
|
||||||
|
|
||||||
|
relative_fix = wrap if sys.version_info < (3, 12) else lambda x: x
|
|
@ -1,5 +1,5 @@
|
||||||
apscheduler==3.10.1
|
apscheduler==3.10.1
|
||||||
importlib-metadata==7.1.0
|
importlib-metadata==8.0.0
|
||||||
importlib-resources==6.4.0
|
importlib-resources==6.4.0
|
||||||
pyinstaller==6.8.0
|
pyinstaller==6.8.0
|
||||||
pyopenssl==24.1.0
|
pyopenssl==24.1.0
|
||||||
|
|
|
@ -16,7 +16,7 @@ gntp==1.0.3
|
||||||
html5lib==1.1
|
html5lib==1.1
|
||||||
httpagentparser==1.9.5
|
httpagentparser==1.9.5
|
||||||
idna==3.7
|
idna==3.7
|
||||||
importlib-metadata==7.1.0
|
importlib-metadata==8.0.0
|
||||||
importlib-resources==6.4.0
|
importlib-resources==6.4.0
|
||||||
git+https://github.com/Tautulli/ipwhois.git@master#egg=ipwhois
|
git+https://github.com/Tautulli/ipwhois.git@master#egg=ipwhois
|
||||||
IPy==1.01
|
IPy==1.01
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue