Skip to content

Clarify TOML versions in the compatibility recipe - #325

Open
tongwentao wants to merge 1 commit into
hukkin:masterfrom
tongwentao:docs/toml-version-compatibility
Open

tongwentao wants to merge 1 commit into
hukkin:masterfrom
tongwentao:docs/toml-version-compatibility

Conversation

@tongwentao

@tongwentao tongwentao commented Oct 22, 2026 •

Copy link
Copy Markdown

Clarify the TOML-version boundary in the tomli/tomllib compatibility recipe. It provides the parser API across Python versions, but preferring tomllib on Python 3.11–3.14 selects TOML 1.0 even when an installed Tomli supports TOML 1.1.

Add a short note identifying the Python 3.15 cutoff and advising applications that need TOML 1.1 on Python 3.8–3.14 to import Tomli 2.4+ directly. The existing fallback remains unchanged.

Behavior and review notes

The distinction matters when an application accepts TOML 1.1 input on several Python versions: the compatibility import may succeed yet select a parser that rejects that input. The note leaves the standard-library-first recipe intact for applications that only need TOML 1.0. It does not add a dependency constraint or change parser behavior.

Validation on Linux, Python 3.13.5:

  • Executed the README fallback; verified a TOML 1.0 control parses through both modules, while an inline table with a trailing comma parses through Tomli and raises TOMLDecodeError through the standard library.
  • Confirmed the standard-library versions against the Python 3.14 and Python 3.15 documentation. Python 3.15 was not run locally.
  • Project unittest suite completed successfully: 18 tests, one skipped.
  • All configured pre-commit hooks passed, including Markdown formatting.
  • git diff --check passed.

Documentation-only change, prepared and validated with Codex assistance. Mypyc builds and other interpreter/platform combinations were not run locally.

@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (43a86ad) to head (5d61288).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #325   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          535       535           
  Branches       100       100           
=========================================
  Hits           535       535           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant