From: Josenilson Ferreira da Silva Date: Mon, 27 Apr 2025 22:00:00 -0300 Subject: Fix compatibility with Python 3.14 Forwarded: not-needed Python 3.14 introduced breaking changes in error messages and internal APIs. This patch updates handlers and unpacking to accommodate the new behavior. --- Index: python-friendly-traceback/friendly_traceback/token_utils.py =================================================================== --- python-friendly-traceback.orig/friendly_traceback/token_utils.py +++ python-friendly-traceback/friendly_traceback/token_utils.py @@ -297,7 +297,8 @@ def tokenize(source: str) -> List[Token] tokens.append(token) except IndentationError as e: try: - _ignore, linenumber, col, line = e.args[1] + # Python 3.14+ expanded IndentationError.args[1] from 4 to 6 elements. + _ignore, linenumber, col, line, *_ = e.args[1] type_ = py_tokenize.NAME # Not really relevant what we set here # except that ERRORTOKEN would cause problems later on. start = (linenumber, col)