From f2bdbb0f68be13fd826fc40797442993da7da69e Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Mon, 2 Aug 2021 13:05:03 +0000 Subject: [PATCH] Update for tomli 1.2.0 --- CHANGELOG.md | 4 ++++ setup.cfg | 2 +- src/check_wheel_contents/__init__.py | 2 +- src/check_wheel_contents/config.py | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 913e0f7..c907996 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +v0.3.3 (in development) +----------------------- +- Update for tomli 1.2.0 + v0.3.2 (2021-07-08) ------------------- - Replace `property-manager` with `functools.cached_property` (Python 3.8+) / diff --git a/setup.cfg b/setup.cfg index 657df69..541283a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -48,7 +48,7 @@ install_requires = packaging cached-property ~= 1.5; python_version < "3.8" pydantic ~= 1.7 - tomli ~= 1.0 + tomli ~= 1.2 wheel-filename ~= 1.1 [options.packages.find] diff --git a/src/check_wheel_contents/__init__.py b/src/check_wheel_contents/__init__.py index bfd4b46..b2077bf 100644 --- a/src/check_wheel_contents/__init__.py +++ b/src/check_wheel_contents/__init__.py @@ -12,7 +12,7 @@ Visit for more information. """ -__version__ = "0.3.2" +__version__ = "0.3.3.dev1" __author__ = "John Thorvald Wodder II" __author_email__ = "check-wheel-contents@varonathe.org" __license__ = "MIT" diff --git a/src/check_wheel_contents/config.py b/src/check_wheel_contents/config.py index df0bbee..08b11dd 100644 --- a/src/check_wheel_contents/config.py +++ b/src/check_wheel_contents/config.py @@ -165,8 +165,8 @@ def from_file(cls, path: Path) -> Optional["Configuration"]: `None` if the section does not exist. """ if path.suffix == ".toml": - with path.open(encoding="UTF-8") as fp: - tdata = tomli.load(fp) + with path.open("rb") as fb: + tdata = tomli.load(fb) tool = tdata.get("tool") if not isinstance(tool, dict): return None