Python 3.14 passe à la couleur
mar, 07/10/2025 - 22:09
Python 3.14 est disponible depuis quelques heures. Une des nouveautés les plus visibles est la colorisation du code ! Sur REPL, PDB, unittest, argparse, le code Python est désormais en couleur :-) Nouveauté appréciable mais pas forcément la plus importante.
Une des avancées majeures de la 3.14 est une amélioration dans les messages d'erreurs et notamment sur les erreurs de syntaxes. Pour les nouveaux développeurs python, c'est une belle nouveauté !
Parmi les autres changements et améliorations :
- support uuid7
- programmation concurrente : intégration d'InterpreterPoolExecutor dans concurrent.futures, meilleure inspection des tâches asyncio avec python -m asyncio pstree PID
- interface pour le debugger externe : on peut attacher en sécurité un debugger sur un process Python en exécution
Pour rappel, l'ensemble des PEP de la 3.14 :
- PEP 779: Free-threaded Python is officially supported
- PEP 649: The evaluation of annotations is now deferred, improving the semantics of using annotations.
- PEP 750: Template string literals (t-strings) for custom string processing, using the familiar syntax of f-strings.
- PEP 734: Multiple interpreters in the stdlib.
- PEP 784: A new module
compression.zstdproviding support for the Zstandard compression algorithm. - PEP 758:
exceptandexcept*expressions may now omit the brackets. - Syntax highlighting in PyREPL, and support for color in unittest, argparse, json and calendar CLIs.
- PEP 768: A zero-overhead external debugger interface for CPython.
- UUID versions 6-8 are now supported by the
uuidmodule, and generation of versions 3-5 are up to 40% faster. - PEP 765: Disallow
return/break/continuethat exit afinallyblock. - PEP 741: An improved C API for configuring Python.
- A new type of interpreter. For certain newer compilers, this interpreter provides significantly better performance. Opt-in for now, requires building from source.
- Improved error messages.
- Builtin implementation of HMAC with formally verified code from the HACL* project.
- A new command-line interface to inspect running Python processes using asynchronous tasks.
- The pdb module now supports remote attaching to a running Python process.

