Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-tomli for openSUSE:Factory checked in at 2025-11-18 15:29:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-tomli (Old) and /work/SRC/openSUSE:Factory/.python-tomli.new.2061 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-tomli" Tue Nov 18 15:29:01 2025 rev:10 rq:1318191 version:2.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-tomli/python-tomli.changes 2025-02-25 16:39:34.698833273 +0100 +++ /work/SRC/openSUSE:Factory/.python-tomli.new.2061/python-tomli.changes 2025-11-18 15:29:59.762514362 +0100 @@ -1,0 +2,8 @@ +Mon Nov 10 08:24:24 UTC 2025 - Dirk Müller <[email protected]> + +- update to 2.3.0: + * Binary wheels for Python 3.14 (also free-threaded) + * Performance + * Reduced import time + +------------------------------------------------------------------- Old: ---- tomli-2.2.1.tar.gz New: ---- tomli-2.3.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-tomli.spec ++++++ --- /var/tmp/diff_new_pack.4MZSXT/_old 2025-11-18 15:30:02.350623299 +0100 +++ /var/tmp/diff_new_pack.4MZSXT/_new 2025-11-18 15:30:02.354623467 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-tomli # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %{?sle15_python_module_pythons} Name: python-tomli -Version: 2.2.1 +Version: 2.3.0 Release: 0 Summary: A lil' TOML parser License: MIT ++++++ tomli-2.2.1.tar.gz -> tomli-2.3.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tomli-2.2.1/.bumpversion.cfg new/tomli-2.3.0/.bumpversion.cfg --- old/tomli-2.2.1/.bumpversion.cfg 2024-11-27 23:11:57.000000000 +0100 +++ new/tomli-2.3.0/.bumpversion.cfg 2025-10-08 23:21:13.000000000 +0200 @@ -2,7 +2,7 @@ commit = True tag = True tag_name = {new_version} -current_version = 2.2.1 +current_version = 2.3.0 [bumpversion:file:pyproject.toml] search = version = "{current_version}" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tomli-2.2.1/.github/workflows/tests.yaml new/tomli-2.3.0/.github/workflows/tests.yaml --- old/tomli-2.2.1/.github/workflows/tests.yaml 2024-11-27 23:11:57.000000000 +0100 +++ new/tomli-2.3.0/.github/workflows/tests.yaml 2025-10-08 23:21:13.000000000 +0200 @@ -9,7 +9,7 @@ env: CIBW_TEST_COMMAND: python -m unittest discover --start-directory {project} - CIBW_SKIP: pp* cp38-* cp39-* cp310-* + CIBW_SKIP: cp38-* cp39-* cp310-* CIBW_ENVIRONMENT_PASS_LINUX: TOMLI_USE_MYPYC jobs: @@ -18,8 +18,8 @@ runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 with: python-version: '3.11' @@ -37,15 +37,16 @@ runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ['pypy3.10', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14-dev'] + python-version: ['pypy3.10', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] os: [ubuntu-latest, macos-latest, windows-latest] - continue-on-error: ${{ matrix.python-version == '3.14-dev' }} +# TODO: uncomment this when 3.15-dev exists and is added +# continue-on-error: ${{ matrix.python-version == '3.15-dev' }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} @@ -60,8 +61,8 @@ coverage: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 with: python-version: '3.x' - name: Install package and coverage deps @@ -75,7 +76,7 @@ coverage run -m unittest coverage report --fail-under=100 - name: Report coverage - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} @@ -87,9 +88,9 @@ os: [ubuntu-latest, windows-latest, macos-latest] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: '3.x' @@ -99,7 +100,7 @@ python scripts/use_setuptools.py - name: Build wheels - uses: pypa/[email protected] + uses: pypa/[email protected] env: CIBW_ARCHS_MACOS: x86_64 arm64 TOMLI_USE_MYPYC: '1' @@ -115,7 +116,7 @@ runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Install build dependencies run: pip install build @@ -138,9 +139,9 @@ && (github.ref == 'refs/heads/master' || startsWith(github.event.ref, 'refs/tags')) steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: '3.x' @@ -155,7 +156,7 @@ platforms: arm64 - name: Build wheels - uses: pypa/[email protected] + uses: pypa/[email protected] env: CIBW_ARCHS_LINUX: aarch64 TOMLI_USE_MYPYC: '1' @@ -184,12 +185,12 @@ if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v5 with: path: dist pattern: artifact-* merge-multiple: true - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: '3.x' - name: Install twine diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tomli-2.2.1/.pre-commit-config.yaml new/tomli-2.3.0/.pre-commit-config.yaml --- old/tomli-2.2.1/.pre-commit-config.yaml 2024-11-27 23:11:57.000000000 +0100 +++ new/tomli-2.3.0/.pre-commit-config.yaml 2025-10-08 23:21:13.000000000 +0200 @@ -6,7 +6,7 @@ files: '^src/.+\.py$|^tests/.+\.py$' args: ['--license-filepath', 'LICENSE-HEADER'] - repo: https://github.com/executablebooks/mdformat - rev: 00812cd1850e41aae5c0916645b4b7404f538e8c # frozen: 0.7.19 + rev: ff29be1a1ba8029d9375882aa2c812b62112a593 # frozen: 0.7.22 hooks: - id: mdformat additional_dependencies: @@ -28,15 +28,15 @@ files: '^src/.+\.py$' args: ['--never', '--application-directories', 'src'] - repo: https://github.com/PyCQA/isort - rev: c235f5e450b4b84e58d114ed4c589cbf454175a3 # frozen: 5.13.2 + rev: ec0efaee4acfce198521e43caa3029b06cedd64a # frozen: 6.1.0 hooks: - id: isort -- repo: https://github.com/psf/black - rev: 1b2427a2b785cc4aac97c19bb4b9a0de063f9547 # frozen: 24.10.0 +- repo: https://github.com/psf/black-pre-commit-mirror + rev: fe95161893684893d68b1225356702ca71f8d388 # frozen: 25.9.0 hooks: - id: black - repo: https://github.com/pre-commit/pre-commit-hooks - rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0 + rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0 hooks: - id: check-yaml - repo: https://github.com/pre-commit/pygrep-hooks @@ -46,7 +46,7 @@ - id: python-check-blanket-noqa - id: python-check-blanket-type-ignore - repo: https://github.com/PyCQA/flake8 - rev: e43806be3607110919eff72939fda031776e885a # frozen: 7.1.1 + rev: d93590f5be797aabb60e3b09f2f52dddb02f349f # frozen: 7.3.0 hooks: - id: flake8 additional_dependencies: @@ -54,7 +54,7 @@ - flake8-builtins - flake8-comprehensions - repo: https://github.com/pre-commit/mirrors-mypy - rev: f56614daa94d5cd733d3b7004c5df9caad267b4a # frozen: v1.13.0 + rev: 9f70dc58c23dfcca1b97af99eaeee3140a807c7e # frozen: v1.18.2 hooks: - id: mypy args: ["--scripts-are-modules"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tomli-2.2.1/CHANGELOG.md new/tomli-2.3.0/CHANGELOG.md --- old/tomli-2.2.1/CHANGELOG.md 2024-11-27 23:11:57.000000000 +0100 +++ new/tomli-2.3.0/CHANGELOG.md 2025-10-08 23:21:13.000000000 +0200 @@ -1,5 +1,17 @@ # Changelog +## 2.3.0 + +- Added + - Binary wheels for Python 3.14 (also free-threaded) +- Performance + - Reduced import time + +## 2.2.1 + +- Fixed + - Don't attempt to compile binary wheels for Python 3.8, 3.9 and 3.10 where cibuildwheel depends on a conflicting Tomli version + ## 2.2.0 - Added diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tomli-2.2.1/pyproject.toml new/tomli-2.3.0/pyproject.toml --- old/tomli-2.2.1/pyproject.toml 2024-11-27 23:11:57.000000000 +0100 +++ new/tomli-2.3.0/pyproject.toml 2025-10-08 23:21:13.000000000 +0200 @@ -1,19 +1,19 @@ [build-system] -requires = ["flit_core>=3.2.0,<4"] +requires = ["flit_core>=3.12,<4"] build-backend = "flit_core.buildapi" [project] name = "tomli" -version = "2.2.1" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT +version = "2.3.0" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT description = "A lil' TOML parser" authors = [ { name = "Taneli Hukkinen", email = "[email protected]" }, ] -license = { file = "LICENSE" } +license = "MIT" +license-files = ["LICENSE"] requires-python = ">=3.8" readme = "README.md" classifiers = [ - "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", @@ -102,6 +102,12 @@ ["python", "benchmark/run.py"], ] +[tool.tox.env."benchmark-import"] +description = "Measure module import times. Tox sends Python output to stderr, so to filter use e.g. `tox -e benchmark-import 2> >(grep tomli)`." +commands = [ + ["python", "-X", "importtime", "-c", "import tomli"], +] + [tool.tox.env."fuzz"] description = 'run the fuzzer against a local Tomli version (needs "apt install clang")' deps = [ @@ -139,16 +145,14 @@ [tool.mypy] show_error_codes = true warn_unreachable = true -warn_unused_ignores = true -warn_redundant_casts = true -warn_unused_configs = true -# Disabling incremental mode is required for `warn_unused_configs = true` to work +strict = true +strict_bytes = true +local_partial_types = true +# Disabling incremental mode is required for `warn_unused_configs = true` +# (implied by `strict = true`) to work incremental = false -disallow_untyped_defs = true -check_untyped_defs = true -strict_equality = true -implicit_reexport = false -no_implicit_optional = true + +enable_error_code = ["ignore-without-code"] [[tool.mypy.overrides]] module = "tests.*" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tomli-2.2.1/scripts/mypyc_tox new/tomli-2.3.0/scripts/mypyc_tox --- old/tomli-2.2.1/scripts/mypyc_tox 1970-01-01 01:00:00.000000000 +0100 +++ new/tomli-2.3.0/scripts/mypyc_tox 2025-10-08 23:21:13.000000000 +0200 @@ -0,0 +1,34 @@ +#!/usr/bin/env python3 +"""A tox wrapper to make it build Tomli with setuptools + mypyc. + +Run this instead of tox. For example: `./scripts/mypyc_tox -e benchmark` +All arguments are passed to tox. + +Prior to running tox, this edits the [build-system] table in pyproject.toml +to support mypyc builds. The change is reverted before exiting. This also +sets the `TOMLI_USE_MYPYC=1` environment variable that setup.py reads to +enable mypyc. +""" +import os +from pathlib import Path +import shutil +import subprocess +import sys + +from use_setuptools import use_setuptools + +project_root = Path(__file__).parent.parent +pyproject_path = project_root / "pyproject.toml" +backup_path = project_root / ".backup.pyproject.toml" + +tox_env_vars = os.environ.copy() +tox_env_vars["TOMLI_USE_MYPYC"] = "1" + +shutil.copy2(pyproject_path, backup_path) +try: + use_setuptools() + result = subprocess.run(["tox", *sys.argv[1:]], env=tox_env_vars) + raise SystemExit(result.returncode) +finally: + shutil.copy2(backup_path, pyproject_path) + backup_path.unlink() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tomli-2.2.1/scripts/use_setuptools.py new/tomli-2.3.0/scripts/use_setuptools.py --- old/tomli-2.2.1/scripts/use_setuptools.py 2024-11-27 23:11:57.000000000 +0100 +++ new/tomli-2.3.0/scripts/use_setuptools.py 2025-10-08 23:21:13.000000000 +0200 @@ -1,12 +1,23 @@ +"""Script that switches build backend to setuptools with mypyc support. + +Overwrites pyproject.toml. Does not create a backup. +""" + from pathlib import Path import tomllib import tomli_w # type: ignore[import-not-found] -pyproject_path = Path(__file__).parent.parent / "pyproject.toml" -data = tomllib.loads(pyproject_path.read_bytes().decode()) -data["build-system"] = { - "requires": ["setuptools>=69", "mypy[mypyc]>=1.13"], - "build-backend": "setuptools.build_meta", -} -pyproject_path.write_bytes(tomli_w.dumps(data).encode()) + +def use_setuptools() -> None: + pyproject_path = Path(__file__).parent.parent / "pyproject.toml" + data = tomllib.loads(pyproject_path.read_bytes().decode()) + data["build-system"] = { + "requires": ["setuptools>=77.0.3", "mypy[mypyc]>=1.15"], + "build-backend": "setuptools.build_meta", + } + pyproject_path.write_bytes(tomli_w.dumps(data).encode()) + + +if __name__ == "__main__": + use_setuptools() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tomli-2.2.1/setup.py new/tomli-2.3.0/setup.py --- old/tomli-2.2.1/setup.py 2024-11-27 23:11:57.000000000 +0100 +++ new/tomli-2.3.0/setup.py 2025-10-08 23:21:13.000000000 +0200 @@ -5,7 +5,7 @@ if os.environ.get("TOMLI_USE_MYPYC") == "1": import glob - from mypyc.build import mypycify # type: ignore[import-untyped] + from mypyc.build import mypycify files = glob.glob("src/**/*.py", recursive=True) ext_modules = mypycify(files) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tomli-2.2.1/src/tomli/__init__.py new/tomli-2.3.0/src/tomli/__init__.py --- old/tomli-2.2.1/src/tomli/__init__.py 2024-11-27 23:11:57.000000000 +0100 +++ new/tomli-2.3.0/src/tomli/__init__.py 2025-10-08 23:21:13.000000000 +0200 @@ -3,6 +3,6 @@ # Licensed to PSF under a Contributor Agreement. __all__ = ("loads", "load", "TOMLDecodeError") -__version__ = "2.2.1" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT +__version__ = "2.3.0" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT from ._parser import TOMLDecodeError, load, loads diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tomli-2.2.1/src/tomli/_parser.py new/tomli-2.3.0/src/tomli/_parser.py --- old/tomli-2.2.1/src/tomli/_parser.py 2024-11-27 23:11:57.000000000 +0100 +++ new/tomli-2.3.0/src/tomli/_parser.py 2025-10-08 23:21:13.000000000 +0200 @@ -4,12 +4,8 @@ from __future__ import annotations -from collections.abc import Iterable -import string import sys from types import MappingProxyType -from typing import IO, Any, Final, NamedTuple -import warnings from ._re import ( RE_DATETIME, @@ -19,7 +15,13 @@ match_to_localtime, match_to_number, ) -from ._types import Key, ParseFloat, Pos + +TYPE_CHECKING = False +if TYPE_CHECKING: + from collections.abc import Iterable + from typing import IO, Any, Final + + from ._types import Key, ParseFloat, Pos # Inline tables/arrays are implemented using recursion. Pathologically # nested documents cause pure Python to raise RecursionError (which is OK), @@ -46,19 +48,21 @@ TOML_WS: Final = frozenset(" \t") TOML_WS_AND_NEWLINE: Final = TOML_WS | frozenset("\n") -BARE_KEY_CHARS: Final = frozenset(string.ascii_letters + string.digits + "-_") +BARE_KEY_CHARS: Final = frozenset( + "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789" "-_" +) KEY_INITIAL_CHARS: Final = BARE_KEY_CHARS | frozenset("\"'") -HEXDIGIT_CHARS: Final = frozenset(string.hexdigits) +HEXDIGIT_CHARS: Final = frozenset("abcdef" "ABCDEF" "0123456789") BASIC_STR_ESCAPE_REPLACEMENTS: Final = MappingProxyType( { "\\b": "\u0008", # backspace "\\t": "\u0009", # tab - "\\n": "\u000A", # linefeed - "\\f": "\u000C", # form feed - "\\r": "\u000D", # carriage return + "\\n": "\u000a", # linefeed + "\\f": "\u000c", # form feed + "\\r": "\u000d", # carriage return '\\"': "\u0022", # quote - "\\\\": "\u005C", # backslash + "\\\\": "\u005c", # backslash } ) @@ -92,6 +96,8 @@ or not isinstance(doc, str) or not isinstance(pos, int) ): + import warnings + warnings.warn( "Free-form arguments for TOMLDecodeError are deprecated. " "Please set 'msg' (str), 'doc' (str) and 'pos' (int) arguments only.", @@ -151,7 +157,7 @@ f"Expected str object, not '{type(__s).__qualname__}'" ) from None pos = 0 - out = Output(NestedDict(), Flags()) + out = Output() header: Key = () parse_float = make_safe_parse_float(parse_float) @@ -220,7 +226,7 @@ EXPLICIT_NEST: Final = 1 def __init__(self) -> None: - self._flags: dict[str, dict] = {} + self._flags: dict[str, dict[Any, Any]] = {} self._pending_flags: set[tuple[Key, int]] = set() def add_pending(self, key: Key, flag: int) -> None: @@ -278,7 +284,7 @@ key: Key, *, access_lists: bool = True, - ) -> dict: + ) -> dict[str, Any]: cont: Any = self.dict for k in key: if k not in cont: @@ -288,7 +294,7 @@ cont = cont[-1] if not isinstance(cont, dict): raise KeyError("There is no nest behind this key") - return cont + return cont # type: ignore[no-any-return] def append_nest_to_list(self, key: Key) -> None: cont = self.get_or_create_nest(key[:-1]) @@ -302,9 +308,10 @@ cont[last_key] = [{}] -class Output(NamedTuple): - data: NestedDict - flags: Flags +class Output: + def __init__(self) -> None: + self.data = NestedDict() + self.flags = Flags() def skip_chars(src: str, pos: Pos, chars: Iterable[str]) -> Pos: @@ -493,9 +500,9 @@ def parse_array( src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int -) -> tuple[Pos, list]: +) -> tuple[Pos, list[Any]]: pos += 1 - array: list = [] + array: list[Any] = [] pos = skip_comments_and_array_ws(src, pos) if src.startswith("]", pos): @@ -519,7 +526,7 @@ def parse_inline_table( src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int -) -> tuple[Pos, dict]: +) -> tuple[Pos, dict[str, Any]]: pos += 1 nested_dict = NestedDict() flags = Flags() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tomli-2.2.1/src/tomli/_re.py new/tomli-2.3.0/src/tomli/_re.py --- old/tomli-2.2.1/src/tomli/_re.py 2024-11-27 23:11:57.000000000 +0100 +++ new/tomli-2.3.0/src/tomli/_re.py 2025-10-08 23:21:13.000000000 +0200 @@ -7,9 +7,12 @@ from datetime import date, datetime, time, timedelta, timezone, tzinfo from functools import lru_cache import re -from typing import Any, Final -from ._types import ParseFloat +TYPE_CHECKING = False +if TYPE_CHECKING: + from typing import Any, Final + + from ._types import ParseFloat # E.g. # - 00:32:00.999999 @@ -51,7 +54,7 @@ ) -def match_to_datetime(match: re.Match) -> datetime | date: +def match_to_datetime(match: re.Match[str]) -> datetime | date: """Convert a `RE_DATETIME` match to `datetime.datetime` or `datetime.date`. Raises ValueError if the match does not correspond to a valid date @@ -100,13 +103,13 @@ ) -def match_to_localtime(match: re.Match) -> time: +def match_to_localtime(match: re.Match[str]) -> time: hour_str, minute_str, sec_str, micros_str = match.groups() micros = int(micros_str.ljust(6, "0")) if micros_str else 0 return time(int(hour_str), int(minute_str), int(sec_str), micros) -def match_to_number(match: re.Match, parse_float: ParseFloat) -> Any: +def match_to_number(match: re.Match[str], parse_float: ParseFloat) -> Any: if match.group("floatpart"): return parse_float(match.group()) return int(match.group(), 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tomli-2.2.1/tests/burntsushi.py new/tomli-2.3.0/tests/burntsushi.py --- old/tomli-2.2.1/tests/burntsushi.py 2024-11-27 23:11:57.000000000 +0100 +++ new/tomli-2.3.0/tests/burntsushi.py 2025-10-08 23:21:13.000000000 +0200 @@ -44,9 +44,9 @@ "value": str(obj), } elif isinstance(obj, list): - return [convert(i) for i in obj] + return [convert(i) for i in obj] # type: ignore[no-untyped-call] elif isinstance(obj, dict): - return {k: convert(v) for k, v in obj.items()} + return {k: convert(v) for k, v in obj.items()} # type: ignore[no-untyped-call] raise Exception("unsupported type") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tomli-2.2.1/tests/test_data.py new/tomli-2.3.0/tests/test_data.py --- old/tomli-2.2.1/tests/test_data.py 2024-11-27 23:11:57.000000000 +0100 +++ new/tomli-2.3.0/tests/test_data.py 2025-10-08 23:21:13.000000000 +0200 @@ -59,6 +59,6 @@ continue toml_str = valid.read_bytes().decode() actual = tomllib.loads(toml_str) - actual = burntsushi.convert(actual) + actual = burntsushi.convert(actual) # type: ignore[no-untyped-call] expected = burntsushi.normalize(expected) self.assertEqual(actual, expected) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tomli-2.2.1/tests/test_error.py new/tomli-2.3.0/tests/test_error.py --- old/tomli-2.2.1/tests/test_error.py 2024-11-27 23:11:57.000000000 +0100 +++ new/tomli-2.3.0/tests/test_error.py 2025-10-08 23:21:13.000000000 +0200 @@ -2,6 +2,9 @@ # SPDX-FileCopyrightText: 2021 Taneli Hukkinen # Licensed to PSF under a Contributor Agreement. +from __future__ import annotations + +from typing import Any import unittest from . import tomllib @@ -57,10 +60,10 @@ ) def test_invalid_parse_float(self): - def dict_returner(s: str) -> dict: + def dict_returner(s: str) -> dict[Any, Any]: return {} - def list_returner(s: str) -> list: + def list_returner(s: str) -> list[Any]: return [] for invalid_parse_float in (dict_returner, list_returner): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tomli-2.2.1/tests/test_misc.py new/tomli-2.3.0/tests/test_misc.py --- old/tomli-2.2.1/tests/test_misc.py 2024-11-27 23:11:57.000000000 +0100 +++ new/tomli-2.3.0/tests/test_misc.py 2025-10-08 23:21:13.000000000 +0200 @@ -5,6 +5,7 @@ import copy import datetime from decimal import Decimal as D +import importlib from pathlib import Path import sys import tempfile @@ -128,3 +129,11 @@ r"TOML inline arrays/tables are nested more than the allowed [0-9]+ levels", ): tomllib.loads(recursive_table_toml) + + def test_types_import(self): + """Test that `_types` module runs. + + The module is for type annotations only, so it is otherwise + never imported by tests. + """ + importlib.import_module(f"{tomllib.__name__}._types")
