From b77999a61f1d7c411b9063b29242759e4df06028 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Tue, 13 Jun 2023 11:55:13 +0200 Subject: [PATCH 1/2] gh-105713: Document that tokenize raises when mixing tabs/spaces --- Doc/whatsnew/3.12.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index f1c3f086463d75..3176fd10e3f7dc 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -1499,6 +1499,9 @@ Changes in the Python API * Some incomplete or invalid Python code now raises :exc:`tokenize.TokenError` instead of returning arbitrary ``ERRORTOKEN`` tokens when tokenizing it. + * Mixing tabs and spaces as indenation in the same file is not supported anymore and will + raise a :exc:`TabError`. + Build Changes ============= From 3db9166410a8261a987ca5db544a54d4c69325ff Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Tue, 13 Jun 2023 12:22:55 +0200 Subject: [PATCH 2/2] Update Doc/whatsnew/3.12.rst Co-authored-by: Alex Waygood --- Doc/whatsnew/3.12.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index 3176fd10e3f7dc..bfbc6c7a35c6ff 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -1499,7 +1499,7 @@ Changes in the Python API * Some incomplete or invalid Python code now raises :exc:`tokenize.TokenError` instead of returning arbitrary ``ERRORTOKEN`` tokens when tokenizing it. - * Mixing tabs and spaces as indenation in the same file is not supported anymore and will + * Mixing tabs and spaces as indentation in the same file is not supported anymore and will raise a :exc:`TabError`. Build Changes