]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-147991: Speed up tomllib import time (GH-147992)
authorVictor Stinner <vstinner@python.org>
Thu, 30 Apr 2026 16:25:32 +0000 (18:25 +0200)
committerGitHub <noreply@github.com>
Thu, 30 Apr 2026 16:25:32 +0000 (18:25 +0200)
commita60520da3cb0c571a361b9d0b8d998e78f38b836
tree68715f5da92e8f9e4987aae15ff794a733db76f8
parentbf424816d0643a4c4566f2e33dc4e1beb5ec875c
gh-147991: Speed up tomllib import time (GH-147992)

- Use lazy import for regular expressions.
- Use frozendict for string escapes

Co-authored-by: Taneli Hukkinen <hukkinen@eurecom.fr>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Lib/test/test_tomllib/test_misc.py
Lib/tomllib/_parser.py
Misc/NEWS.d/next/Library/2026-04-02-05-06-34.gh-issue-147991.2ANtR5.rst [new file with mode: 0644]