mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-11-12 12:13:15 -06:00
fix: use most recent tomli
This commit is contained in:
parent
523a9a9d06
commit
b2a2597816
2 changed files with 10 additions and 10 deletions
|
@ -59,7 +59,7 @@ class Package:
|
|||
def ensure(self):
|
||||
dir = Path(__file__).parent / self.name
|
||||
if not dir.is_dir():
|
||||
subprocess.run(["git", "clone", self.url])
|
||||
subprocess.run(["git", "clone", self.url, dir])
|
||||
subprocess.run(["git", "-C", dir, "checkout", self.rev])
|
||||
|
||||
@property
|
||||
|
@ -173,16 +173,17 @@ SpecifierSet = v_packaging_SpecifierSet
|
|||
Package(
|
||||
name="tomli",
|
||||
url="https://github.com/hukkin/tomli.git",
|
||||
rev="2.0.1",
|
||||
# rev="2.0.1",
|
||||
rev="a6138675bcca68eea5b8abec7c2ec06d57f965a0",
|
||||
files=(
|
||||
("_types", [[7, 11]]),
|
||||
("_re", [[14, 107]]),
|
||||
("_parser", [[20, 691]]),
|
||||
),
|
||||
prefix="""
|
||||
try:
|
||||
if sys.version_info >= (3, 11):
|
||||
from tomllib import loads as toml_loads
|
||||
except ImportError:
|
||||
else:
|
||||
# MODIFIED FROM https://github.com/hukkin/tomli
|
||||
# see below for original license
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
@ -194,7 +195,6 @@ except ImportError:
|
|||
from collections.abc import Iterable # noqa
|
||||
from functools import lru_cache # noqa
|
||||
from datetime import date, datetime, time, timedelta, timezone, tzinfo # noqa
|
||||
from io import BinaryIO
|
||||
from types import MappingProxyType # noqa
|
||||
from typing import IO, Any, Callable, NamedTuple # noqa
|
||||
""",
|
||||
|
|
|
@ -58,9 +58,9 @@ __version__ = "2023.1003-pep723"
|
|||
|
||||
#### START VENDORED TOMLI ####
|
||||
|
||||
try:
|
||||
if sys.version_info >= (3, 11):
|
||||
from tomllib import loads as toml_loads
|
||||
except ImportError:
|
||||
else:
|
||||
# MODIFIED FROM https://github.com/hukkin/tomli
|
||||
# see below for original license
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
@ -71,7 +71,6 @@ except ImportError:
|
|||
from collections.abc import Iterable # noqa
|
||||
from functools import lru_cache # noqa
|
||||
from datetime import date, datetime, time, timedelta, timezone, tzinfo # noqa
|
||||
from io import BinaryIO
|
||||
from types import MappingProxyType # noqa
|
||||
from typing import IO, Any, Callable, NamedTuple # noqa
|
||||
|
||||
|
@ -190,7 +189,7 @@ except ImportError:
|
|||
pass
|
||||
|
||||
def v_tomli_load(
|
||||
__fp: BinaryIO, *, parse_float: v_tomli_ParseFloat = float
|
||||
__fp: IO[bytes], *, parse_float: v_tomli_ParseFloat = float
|
||||
) -> dict[str, Any]:
|
||||
b = __fp.read()
|
||||
try:
|
||||
|
@ -1631,7 +1630,8 @@ class v_packaging_SpecifierSet(v_packaging_BaseSpecifier):
|
|||
specifier._prereleases = self._prereleases
|
||||
else:
|
||||
raise ValueError(
|
||||
"Cannot combine v_packaging_SpecifierSets with True and False prerelease overrides." # noqa
|
||||
"Cannot combine v_packaging_SpecifierSets "
|
||||
"with True and False prerelease overrides."
|
||||
)
|
||||
return specifier
|
||||
|
||||
|
|
Loading…
Reference in a new issue