import datetime
import re
-from collections import OrderedDict
from collections.abc import Iterable, Iterator
from copy import copy
from difflib import SequenceMatcher
self.domain = domain
self.locale = locale
self._header_comment = header_comment
- self._messages: OrderedDict[str | tuple[str, str], Message] = OrderedDict()
+ self._messages: dict[str | tuple[str, str], Message] = {}
self.project = project or 'PROJECT'
self.version = version or 'VERSION'
self.fuzzy = fuzzy
# Dictionary of obsolete messages
- self.obsolete: OrderedDict[str | tuple[str, str], Message] = OrderedDict()
+ self.obsolete: dict[str | tuple[str, str], Message] = {}
self._num_plurals = None
self._plural_expr = None
"""
messages = self._messages
remaining = messages.copy()
- self._messages = OrderedDict()
+ self._messages = {}
# Prepare for fuzzy matching
fuzzy_candidates = {}
import sys
import tempfile
import warnings
-from collections import OrderedDict
from configparser import RawConfigParser
from io import StringIO
from typing import BinaryIO, Iterable, Literal
options_map = {}
parser = RawConfigParser()
- parser._sections = OrderedDict(parser._sections) # We need ordered sections
parser.read_file(fileobj, filename)
for section in parser.sections():
from __future__ import annotations
import codecs
-import collections
import datetime
import os
import re
# TODO (Babel 3.x): Remove this re-export
-odict = collections.OrderedDict
+odict = dict
class FixedOffsetTimezone(datetime.tzinfo):