Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/tomli/_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
__lazy_modules__ = ["tomli._re"]

import sys
from types import MappingProxyType

from ._re import (
RE_DATETIME,
Expand All @@ -20,6 +19,9 @@
match_to_number,
)

if sys.version_info < (3, 15): # pragma: no cover
from types import MappingProxyType as frozendict

TYPE_CHECKING = False
if TYPE_CHECKING:
from collections.abc import Iterable
Expand Down Expand Up @@ -65,7 +67,7 @@
KEY_INITIAL_CHARS: Final = BARE_KEY_CHARS | frozenset("\"'")
HEXDIGIT_CHARS: Final = frozenset("abcdef" "ABCDEF" "0123456789")

BASIC_STR_ESCAPE_REPLACEMENTS: Final = MappingProxyType(
BASIC_STR_ESCAPE_REPLACEMENTS: Final = frozendict(
{
"\\b": "\u0008", # backspace
"\\t": "\u0009", # tab
Expand Down
Loading