From 585e6ab767cacb935937214a3379faa2c88b66f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 18 Sep 2026 12:01:16 +0200 Subject: [PATCH 1/2] chore: Define project metadata via [project] table (PEP 621) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This leads to a small METADATA diff: Name: tomlkit Version: 0.15.1 Summary: Style preserving TOML library -License: MIT +License-Expression: MIT License-File: LICENSE Author: Sébastien Eustace Author-email: sebastien@eustace.io Requires-Python: >=3.9 -Classifier: License :: OSI Approved :: MIT License Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.9 The difference is only wrt. license, PEP 639. The required poetry-core version was bumped to support this. There is no immediate need for this change, it's pure modernization. My personal motivation is for me to make it easier to experiment with different build backends. I used LLM to draft this change, then I reviewed it line by line. Assisted-By: Claude Opus 5 --- poetry.lock | 2 +- pyproject.toml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/poetry.lock b/poetry.lock index 6bb97349..709e2f08 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1202,4 +1202,4 @@ test = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-it [metadata] lock-version = "2.1" python-versions = ">=3.9" -content-hash = "0eec9d00c51b390c077534841b531d85c22a7aa138e622b20525166f6a628967" +content-hash = "fffe966c3b41e58d934cccdcf0a556dea4d158d927e0a043f24c34e13a2e9762" diff --git a/pyproject.toml b/pyproject.toml index c54acdfb..a1989e93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,18 +1,21 @@ -[tool.poetry] +[project] name = "tomlkit" version = "0.15.1" description = "Style preserving TOML library" authors = [ - "Sébastien Eustace ", - "Frost Ming " + { name = "Sébastien Eustace", email = "sebastien@eustace.io" }, + { name = "Frost Ming", email = "me@frostming.com" } ] license = "MIT" readme = "README.md" +requires-python = ">=3.9" -homepage = "https://github.com/python-poetry/tomlkit" -repository = "https://github.com/python-poetry/tomlkit" +[project.urls] +Homepage = "https://github.com/python-poetry/tomlkit" +Repository = "https://github.com/python-poetry/tomlkit" +[tool.poetry] include = [ { path = "tomlkit/py.typed" }, { path = "tests", format = "sdist" }, @@ -20,9 +23,6 @@ include = [ { path = "CHANGELOG.md", format = "sdist" }, ] -[tool.poetry.dependencies] -python = ">=3.9" - [tool.poetry.group.dev.dependencies] pytest = "^7.2.0" pytest-cov = "^4.0.0" @@ -64,5 +64,5 @@ enable_error_code = [ ] [build-system] -requires = ["poetry-core>=1.0.0a9"] +requires = ["poetry-core>=2.0.0"] build-backend = "poetry.core.masonry.api" From 5251174ae73b0b86d62d9aa9c67b9444c2a55031 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 18 Sep 2026 10:26:53 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_items.py | 2 +- tomlkit/container.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_items.py b/tests/test_items.py index f6377d02..d7c06fbf 100644 --- a/tests/test_items.py +++ b/tests/test_items.py @@ -141,7 +141,7 @@ def test_aot_unwrap() -> None: d = item([{"a": "A"}, {"b": "B"}]) unwrapped = d.unwrap() assert_is_ppo(unwrapped, list) - for du, _ in zip(unwrapped, d): # noqa: B905 + for du, _ in zip(unwrapped, d): assert_is_ppo(du, dict) for ku in du: vu = du[ku] diff --git a/tomlkit/container.py b/tomlkit/container.py index 8ff30d98..013358eb 100644 --- a/tomlkit/container.py +++ b/tomlkit/container.py @@ -1278,7 +1278,7 @@ def _equal_with_nan(left: Any, right: Any) -> bool: if isinstance(left, list) and isinstance(right, list): if len(left) != len(right): return False - return all(_equal_with_nan(l, r) for l, r in zip(left, right)) # noqa: B905, E741 + return all(_equal_with_nan(l, r) for l, r in zip(left, right)) # noqa: E741 if isinstance(left, float) and isinstance(right, float): if math.isnan(left) and math.isnan(right):