From 6e6936a1b9dd6147b4a594e475379eaf378a02fb Mon Sep 17 00:00:00 2001 From: Stephen Rosen Date: Fri, 9 Jan 2026 14:41:12 -0600 Subject: [PATCH] Clarify that TOML v1.0 is used for specs - State "version 1.0" for pylock.toml and pyproject.toml - State that "TOML 1.0" is used for script metadata For motivation, see: https://discuss.python.org/t/adopting-toml-1-1/105624 --- source/specifications/inline-script-metadata.rst | 3 ++- source/specifications/pylock-toml.rst | 3 ++- source/specifications/pyproject-toml.rst | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/specifications/inline-script-metadata.rst b/source/specifications/inline-script-metadata.rst index 6fa832a3e..0c5b0fcd2 100644 --- a/source/specifications/inline-script-metadata.rst +++ b/source/specifications/inline-script-metadata.rst @@ -74,7 +74,7 @@ script type ----------- The first type of metadata block is named ``script``, which contains -script metadata (dependency data and tool configuration). +script metadata (dependency data and tool configuration) formatted as TOML 1.0 text. This document MAY include the top-level fields ``dependencies`` and ``requires-python``, and MAY optionally include a ``[tool]`` table. @@ -217,3 +217,4 @@ History block type was renamed to ``script``, and the ``[run]`` table was dropped, making the ``dependencies`` and ``requires-python`` keys top-level. Additionally, the specification is no longer provisional. +- January 2026: Clarify that the ``script`` block is TOML 1.0 formatted text. diff --git a/source/specifications/pylock-toml.rst b/source/specifications/pylock-toml.rst index 342e608c5..f332b5f97 100644 --- a/source/specifications/pylock-toml.rst +++ b/source/specifications/pylock-toml.rst @@ -50,7 +50,7 @@ file would be in the directory that held all the projects being locked. File Format ----------- -The format of the file is TOML_. +The format of the file is TOML_ version 1.0. Tools SHOULD write their lock files in a consistent way to minimize noise in diff output. Keys in tables -- including the top-level table -- SHOULD be @@ -826,6 +826,7 @@ History ------- - April 2025: Initial version, approved via :pep:`751`. +- January 2026: Clarify that the TOML format version is 1.0 . .. _Content-Length: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Length diff --git a/source/specifications/pyproject-toml.rst b/source/specifications/pyproject-toml.rst index 48f35599e..6e3a35a30 100644 --- a/source/specifications/pyproject-toml.rst +++ b/source/specifications/pyproject-toml.rst @@ -16,7 +16,7 @@ tools (as well as other tools). .. note:: This specification was originally defined in :pep:`518` and :pep:`621`. -The ``pyproject.toml`` file is written in `TOML `_. Three +The ``pyproject.toml`` file is written in `TOML `_ version 1.0. Three tables are currently specified, namely :ref:`[build-system] `, :ref:`[project] ` and @@ -649,4 +649,6 @@ History - October 2025: The ``import-names`` and ``import-namespaces`` keys were added through :pep:`794`. +- January 2026: Clarify that the TOML format version is 1.0 . + .. _TOML: https://toml.io