mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-12-22 02:30:44 -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):
|
def ensure(self):
|
||||||
dir = Path(__file__).parent / self.name
|
dir = Path(__file__).parent / self.name
|
||||||
if not dir.is_dir():
|
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])
|
subprocess.run(["git", "-C", dir, "checkout", self.rev])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -173,16 +173,17 @@ SpecifierSet = v_packaging_SpecifierSet
|
||||||
Package(
|
Package(
|
||||||
name="tomli",
|
name="tomli",
|
||||||
url="https://github.com/hukkin/tomli.git",
|
url="https://github.com/hukkin/tomli.git",
|
||||||
rev="2.0.1",
|
# rev="2.0.1",
|
||||||
|
rev="a6138675bcca68eea5b8abec7c2ec06d57f965a0",
|
||||||
files=(
|
files=(
|
||||||
("_types", [[7, 11]]),
|
("_types", [[7, 11]]),
|
||||||
("_re", [[14, 107]]),
|
("_re", [[14, 107]]),
|
||||||
("_parser", [[20, 691]]),
|
("_parser", [[20, 691]]),
|
||||||
),
|
),
|
||||||
prefix="""
|
prefix="""
|
||||||
try:
|
if sys.version_info >= (3, 11):
|
||||||
from tomllib import loads as toml_loads
|
from tomllib import loads as toml_loads
|
||||||
except ImportError:
|
else:
|
||||||
# MODIFIED FROM https://github.com/hukkin/tomli
|
# MODIFIED FROM https://github.com/hukkin/tomli
|
||||||
# see below for original license
|
# see below for original license
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
@ -194,7 +195,6 @@ except ImportError:
|
||||||
from collections.abc import Iterable # noqa
|
from collections.abc import Iterable # noqa
|
||||||
from functools import lru_cache # noqa
|
from functools import lru_cache # noqa
|
||||||
from datetime import date, datetime, time, timedelta, timezone, tzinfo # noqa
|
from datetime import date, datetime, time, timedelta, timezone, tzinfo # noqa
|
||||||
from io import BinaryIO
|
|
||||||
from types import MappingProxyType # noqa
|
from types import MappingProxyType # noqa
|
||||||
from typing import IO, Any, Callable, NamedTuple # noqa
|
from typing import IO, Any, Callable, NamedTuple # noqa
|
||||||
""",
|
""",
|
||||||
|
|
|
@ -58,9 +58,9 @@ __version__ = "2023.1003-pep723"
|
||||||
|
|
||||||
#### START VENDORED TOMLI ####
|
#### START VENDORED TOMLI ####
|
||||||
|
|
||||||
try:
|
if sys.version_info >= (3, 11):
|
||||||
from tomllib import loads as toml_loads
|
from tomllib import loads as toml_loads
|
||||||
except ImportError:
|
else:
|
||||||
# MODIFIED FROM https://github.com/hukkin/tomli
|
# MODIFIED FROM https://github.com/hukkin/tomli
|
||||||
# see below for original license
|
# see below for original license
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
@ -71,7 +71,6 @@ except ImportError:
|
||||||
from collections.abc import Iterable # noqa
|
from collections.abc import Iterable # noqa
|
||||||
from functools import lru_cache # noqa
|
from functools import lru_cache # noqa
|
||||||
from datetime import date, datetime, time, timedelta, timezone, tzinfo # noqa
|
from datetime import date, datetime, time, timedelta, timezone, tzinfo # noqa
|
||||||
from io import BinaryIO
|
|
||||||
from types import MappingProxyType # noqa
|
from types import MappingProxyType # noqa
|
||||||
from typing import IO, Any, Callable, NamedTuple # noqa
|
from typing import IO, Any, Callable, NamedTuple # noqa
|
||||||
|
|
||||||
|
@ -190,7 +189,7 @@ except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def v_tomli_load(
|
def v_tomli_load(
|
||||||
__fp: BinaryIO, *, parse_float: v_tomli_ParseFloat = float
|
__fp: IO[bytes], *, parse_float: v_tomli_ParseFloat = float
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
b = __fp.read()
|
b = __fp.read()
|
||||||
try:
|
try:
|
||||||
|
@ -1631,7 +1630,8 @@ class v_packaging_SpecifierSet(v_packaging_BaseSpecifier):
|
||||||
specifier._prereleases = self._prereleases
|
specifier._prereleases = self._prereleases
|
||||||
else:
|
else:
|
||||||
raise ValueError(
|
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
|
return specifier
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue