mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 21:21:15 -07:00
Update packaging==21.3
This commit is contained in:
parent
0ec2d70e4b
commit
f52d985f8c
5 changed files with 17 additions and 46 deletions
|
@ -17,7 +17,7 @@ __title__ = "packaging"
|
||||||
__summary__ = "Core utilities for Python packages"
|
__summary__ = "Core utilities for Python packages"
|
||||||
__uri__ = "https://github.com/pypa/packaging"
|
__uri__ = "https://github.com/pypa/packaging"
|
||||||
|
|
||||||
__version__ = "21.0"
|
__version__ = "21.3"
|
||||||
|
|
||||||
__author__ = "Donald Stufft and individual contributors"
|
__author__ = "Donald Stufft and individual contributors"
|
||||||
__email__ = "donald@stufft.io"
|
__email__ = "donald@stufft.io"
|
||||||
|
|
|
@ -98,7 +98,7 @@ def _get_musl_version(executable: str) -> Optional[_MuslVersion]:
|
||||||
with contextlib.ExitStack() as stack:
|
with contextlib.ExitStack() as stack:
|
||||||
try:
|
try:
|
||||||
f = stack.enter_context(open(executable, "rb"))
|
f = stack.enter_context(open(executable, "rb"))
|
||||||
except IOError:
|
except OSError:
|
||||||
return None
|
return None
|
||||||
ld = _parse_ld_musl_from_elf(f)
|
ld = _parse_ld_musl_from_elf(f)
|
||||||
if not ld:
|
if not ld:
|
||||||
|
|
|
@ -19,9 +19,6 @@ class InfinityType:
|
||||||
def __eq__(self, other: object) -> bool:
|
def __eq__(self, other: object) -> bool:
|
||||||
return isinstance(other, self.__class__)
|
return isinstance(other, self.__class__)
|
||||||
|
|
||||||
def __ne__(self, other: object) -> bool:
|
|
||||||
return not isinstance(other, self.__class__)
|
|
||||||
|
|
||||||
def __gt__(self, other: object) -> bool:
|
def __gt__(self, other: object) -> bool:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -51,9 +48,6 @@ class NegativeInfinityType:
|
||||||
def __eq__(self, other: object) -> bool:
|
def __eq__(self, other: object) -> bool:
|
||||||
return isinstance(other, self.__class__)
|
return isinstance(other, self.__class__)
|
||||||
|
|
||||||
def __ne__(self, other: object) -> bool:
|
|
||||||
return not isinstance(other, self.__class__)
|
|
||||||
|
|
||||||
def __gt__(self, other: object) -> bool:
|
def __gt__(self, other: object) -> bool:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
|
@ -57,13 +57,6 @@ class BaseSpecifier(metaclass=abc.ABCMeta):
|
||||||
objects are equal.
|
objects are equal.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@abc.abstractmethod
|
|
||||||
def __ne__(self, other: object) -> bool:
|
|
||||||
"""
|
|
||||||
Returns a boolean representing whether or not the two Specifier like
|
|
||||||
objects are not equal.
|
|
||||||
"""
|
|
||||||
|
|
||||||
@abc.abstractproperty
|
@abc.abstractproperty
|
||||||
def prereleases(self) -> Optional[bool]:
|
def prereleases(self) -> Optional[bool]:
|
||||||
"""
|
"""
|
||||||
|
@ -119,7 +112,7 @@ class _IndividualSpecifier(BaseSpecifier):
|
||||||
else ""
|
else ""
|
||||||
)
|
)
|
||||||
|
|
||||||
return "<{}({!r}{})>".format(self.__class__.__name__, str(self), pre)
|
return f"<{self.__class__.__name__}({str(self)!r}{pre})>"
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return "{}{}".format(*self._spec)
|
return "{}{}".format(*self._spec)
|
||||||
|
@ -142,17 +135,6 @@ class _IndividualSpecifier(BaseSpecifier):
|
||||||
|
|
||||||
return self._canonical_spec == other._canonical_spec
|
return self._canonical_spec == other._canonical_spec
|
||||||
|
|
||||||
def __ne__(self, other: object) -> bool:
|
|
||||||
if isinstance(other, str):
|
|
||||||
try:
|
|
||||||
other = self.__class__(str(other))
|
|
||||||
except InvalidSpecifier:
|
|
||||||
return NotImplemented
|
|
||||||
elif not isinstance(other, self.__class__):
|
|
||||||
return NotImplemented
|
|
||||||
|
|
||||||
return self._spec != other._spec
|
|
||||||
|
|
||||||
def _get_operator(self, op: str) -> CallableOperator:
|
def _get_operator(self, op: str) -> CallableOperator:
|
||||||
operator_callable: CallableOperator = getattr(
|
operator_callable: CallableOperator = getattr(
|
||||||
self, f"_compare_{self._operators[op]}"
|
self, f"_compare_{self._operators[op]}"
|
||||||
|
@ -667,7 +649,7 @@ class SpecifierSet(BaseSpecifier):
|
||||||
else ""
|
else ""
|
||||||
)
|
)
|
||||||
|
|
||||||
return "<SpecifierSet({!r}{})>".format(str(self), pre)
|
return f"<SpecifierSet({str(self)!r}{pre})>"
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return ",".join(sorted(str(s) for s in self._specs))
|
return ",".join(sorted(str(s) for s in self._specs))
|
||||||
|
@ -706,14 +688,6 @@ class SpecifierSet(BaseSpecifier):
|
||||||
|
|
||||||
return self._specs == other._specs
|
return self._specs == other._specs
|
||||||
|
|
||||||
def __ne__(self, other: object) -> bool:
|
|
||||||
if isinstance(other, (str, _IndividualSpecifier)):
|
|
||||||
other = SpecifierSet(str(other))
|
|
||||||
elif not isinstance(other, SpecifierSet):
|
|
||||||
return NotImplemented
|
|
||||||
|
|
||||||
return self._specs != other._specs
|
|
||||||
|
|
||||||
def __len__(self) -> int:
|
def __len__(self) -> int:
|
||||||
return len(self._specs)
|
return len(self._specs)
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ class Tag:
|
||||||
return f"{self._interpreter}-{self._abi}-{self._platform}"
|
return f"{self._interpreter}-{self._abi}-{self._platform}"
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
return "<{self} @ {self_id}>".format(self=self, self_id=id(self))
|
return f"<{self} @ {id(self)}>"
|
||||||
|
|
||||||
|
|
||||||
def parse_tag(tag: str) -> FrozenSet[Tag]:
|
def parse_tag(tag: str) -> FrozenSet[Tag]:
|
||||||
|
@ -192,7 +192,7 @@ def cpython_tags(
|
||||||
if not python_version:
|
if not python_version:
|
||||||
python_version = sys.version_info[:2]
|
python_version = sys.version_info[:2]
|
||||||
|
|
||||||
interpreter = "cp{}".format(_version_nodot(python_version[:2]))
|
interpreter = f"cp{_version_nodot(python_version[:2])}"
|
||||||
|
|
||||||
if abis is None:
|
if abis is None:
|
||||||
if len(python_version) > 1:
|
if len(python_version) > 1:
|
||||||
|
@ -207,7 +207,7 @@ def cpython_tags(
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
platforms = list(platforms or _platform_tags())
|
platforms = list(platforms or platform_tags())
|
||||||
for abi in abis:
|
for abi in abis:
|
||||||
for platform_ in platforms:
|
for platform_ in platforms:
|
||||||
yield Tag(interpreter, abi, platform_)
|
yield Tag(interpreter, abi, platform_)
|
||||||
|
@ -251,7 +251,7 @@ def generic_tags(
|
||||||
interpreter = "".join([interp_name, interp_version])
|
interpreter = "".join([interp_name, interp_version])
|
||||||
if abis is None:
|
if abis is None:
|
||||||
abis = _generic_abi()
|
abis = _generic_abi()
|
||||||
platforms = list(platforms or _platform_tags())
|
platforms = list(platforms or platform_tags())
|
||||||
abis = list(abis)
|
abis = list(abis)
|
||||||
if "none" not in abis:
|
if "none" not in abis:
|
||||||
abis.append("none")
|
abis.append("none")
|
||||||
|
@ -268,11 +268,11 @@ def _py_interpreter_range(py_version: PythonVersion) -> Iterator[str]:
|
||||||
all previous versions of that major version.
|
all previous versions of that major version.
|
||||||
"""
|
"""
|
||||||
if len(py_version) > 1:
|
if len(py_version) > 1:
|
||||||
yield "py{version}".format(version=_version_nodot(py_version[:2]))
|
yield f"py{_version_nodot(py_version[:2])}"
|
||||||
yield "py{major}".format(major=py_version[0])
|
yield f"py{py_version[0]}"
|
||||||
if len(py_version) > 1:
|
if len(py_version) > 1:
|
||||||
for minor in range(py_version[1] - 1, -1, -1):
|
for minor in range(py_version[1] - 1, -1, -1):
|
||||||
yield "py{version}".format(version=_version_nodot((py_version[0], minor)))
|
yield f"py{_version_nodot((py_version[0], minor))}"
|
||||||
|
|
||||||
|
|
||||||
def compatible_tags(
|
def compatible_tags(
|
||||||
|
@ -290,7 +290,7 @@ def compatible_tags(
|
||||||
"""
|
"""
|
||||||
if not python_version:
|
if not python_version:
|
||||||
python_version = sys.version_info[:2]
|
python_version = sys.version_info[:2]
|
||||||
platforms = list(platforms or _platform_tags())
|
platforms = list(platforms or platform_tags())
|
||||||
for version in _py_interpreter_range(python_version):
|
for version in _py_interpreter_range(python_version):
|
||||||
for platform_ in platforms:
|
for platform_ in platforms:
|
||||||
yield Tag(version, "none", platform_)
|
yield Tag(version, "none", platform_)
|
||||||
|
@ -431,7 +431,7 @@ def _generic_platforms() -> Iterator[str]:
|
||||||
yield _normalize_string(sysconfig.get_platform())
|
yield _normalize_string(sysconfig.get_platform())
|
||||||
|
|
||||||
|
|
||||||
def _platform_tags() -> Iterator[str]:
|
def platform_tags() -> Iterator[str]:
|
||||||
"""
|
"""
|
||||||
Provides the platform tags for this installation.
|
Provides the platform tags for this installation.
|
||||||
"""
|
"""
|
||||||
|
@ -481,4 +481,7 @@ def sys_tags(*, warn: bool = False) -> Iterator[Tag]:
|
||||||
else:
|
else:
|
||||||
yield from generic_tags()
|
yield from generic_tags()
|
||||||
|
|
||||||
yield from compatible_tags()
|
if interp_name == "pp":
|
||||||
|
yield from compatible_tags(interpreter="pp3")
|
||||||
|
else:
|
||||||
|
yield from compatible_tags()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue