[Python-checkins] gh-105713: Document that tokenize raises when mixing tabs/spaces (#105723)

lysnikolaou webhook-mailer at python.org
Tue Jun 13 06:40:04 EDT 2023


https://github.com/python/cpython/commit/ed8217b493e19cea0f3f539e55b592c09ceb9323
commit: ed8217b493e19cea0f3f539e55b592c09ceb9323
branch: main
author: Lysandros Nikolaou <lisandrosnik at gmail.com>
committer: lysnikolaou <lisandrosnik at gmail.com>
date: 2023-06-13T12:39:29+02:00
summary:

gh-105713: Document that tokenize raises when mixing tabs/spaces (#105723)

* gh-105713: Document that tokenize raises when mixing tabs/spaces
* Update Doc/whatsnew/3.12.rst

Co-authored-by: Alex Waygood <Alex.Waygood at Gmail.com>

files:
M Doc/whatsnew/3.12.rst

diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst
index f1c3f086463d7..bfbc6c7a35c6f 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 indentation in the same file is not supported anymore and will
+    raise a :exc:`TabError`.
+
 Build Changes
 =============
 



More information about the Python-checkins mailing list