- Philip Jenvey
- benselme
- Isaac Jurado
+- Tomas R.
- Tobias Bieniek
- Erick Wilder
- Jonah Lawrence
- Kevin Deldycke
- Ville Skyttä
- Jon Dufresne
+- Hugo van Kemenade
- Jun Omae
-- Hugo
- Heungsub Lee
-- Tomas R
- Jakob Schnitzer
- Sachin Paliwal
- Alex Willmer
- Daniel Neuhäuser
-- Hugo van Kemenade
- Miro Hrončok
- Cédric Krier
- Luke Plant
- Arturas Moskvinas
- Leonardo Pistone
- Hyunjun Kim
+- wandrew004
+- James McKinney
+- Tomáš Hrnčiar
+- Gabe Sherman
+- mattdiaz007
+- Dylan Kiss
+- Daniel Roschka
- buhtz
- Bohdan Malomuzh
- Leonid
Babel Changelog
===============
+Version 2.17.0
+--------------
+
+Happy 2025! This release is being made from FOSDEM 2025, in Brussels, Belgium.
+
+Thank you to all contributors, new and old,
+and here's to another great year of internationalization and localization!
+
+Features
+~~~~~~~~
+
+* CLDR: Babel now uses CLDR 46, by @tomasr8 in :gh:`1145`
+* Dates: Allow specifying an explicit format in parse_date/parse_time by @tomasr8 in :gh:`1131`
+* Dates: More alternate characters are now supported by `format_skeleton`. By @tomasr8 in :gh:`1122`
+* Dates: Support short and narrow formats for format_timedelta when using `add_direction`, by @akx in :gh:`1163`
+* Messages: .po files now enclose white spaces in filenames like GNU gettext does. By @Dunedan in :gh:`1105`, and @tomasr8 in :gh:`1120`
+* Messages: Initial support for `Message.python_brace_format`, by @tomasr8 in :gh:`1169`
+* Numbers: LC_MONETARY is now preferred when formatting currencies, by @akx in :gh:`1173`
+
+Bugfixes
+~~~~~~~~
+
+* Dates: Make seconds optional in `parse_time` time formats by @tomasr8 in :gh:`1141`
+* Dates: Replace `str.index` with `str.find` by @tomasr8 in :gh:`1130`
+* Dates: Strip extra leading slashes in `/etc/localtime` by @akx in :gh:`1165`
+* Dates: Week numbering and formatting of dates with week numbers was repaired by @jun66j5 in :gh:`1179`
+* General: Improve handling for `locale=None` by @akx in :gh:`1164`
+* General: Remove redundant assignment in `Catalog.__setitem__` by @tomasr8 in :gh:`1167`
+* Messages: Fix extracted lineno with nested calls, by @dylankiss in :gh:`1126`
+* Messages: Fix of list index out of range when translations is empty, by @gabe-sherman in :gh:`1135`
+* Messages: Fix the way obsolete messages are stored by @tomasr8 in :gh:`1132`
+* Messages: Simplify `read_mo` logic regarding `catalog.charset` by @tomasr8 in :gh:`1148`
+* Messages: Use the first matching method & options, rather than first matching method & last options, by @jpmckinney in :gh:`1121`
+
+Deprecation and compatibility
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+* Dates: Fix deprecation warnings for `datetime.utcnow()` by @tomasr8 in :gh:`1119`
+* Docs: Adjust docs/conf.py to add compatibility with sphinx 8 by @hrnciar in :gh:`1155`
+* General: Import `Literal` from the typing module by @tomasr8 in :gh:`1175`
+* General: Replace `OrderedDict` with just `dict` by @tomasr8 in :gh:`1149`
+* Messages: Mark `wraptext` deprecated; use `TextWrapper` directly in `write_po` by @akx in :gh:`1140`
+
+Infrastructure
+~~~~~~~~~~~~~~
+
+* Add tzdata as dev dependency and sync with tox.ini by @wandrew004 in :gh:`1159`
+* Duplicate test code was deleted by @mattdiaz007 in :gh:`1138`
+* Increase test coverage of the `python_format` checker by @tomasr8 in :gh:`1176`
+* Small cleanups by @akx in :gh:`1160`, :gh:`1166`, :gh:`1170` and :gh:`1172`
+* Update CI to use python 3.13 and Ubuntu 24.04 by @tomasr8 in :gh:`1153`
+
Version 2.16.0
--------------
-Copyright (c) 2013-2024 by the Babel Team, see AUTHORS for more information.
+Copyright (c) 2013-2025 by the Babel Team, see AUTHORS for more information.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
access to various locale display names, localized number and date
formatting, etc.
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
parse_locale,
)
-__version__ = '2.16.0'
+__version__ = '2.17.0'
__all__ = [
'Locale',
Core locale representation and locale data access.
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
* ``LC_ALL``, and
* ``LANG``
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
* ``LC_ALL``, and
* ``LANG``
- :copyright: (c) 2015-2024 by the Babel Team.
+ :copyright: (c) 2015-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
from __future__ import annotations
COPYRIGHT AND PERMISSION NOTICE
-Copyright © 2004-2024 Unicode, Inc.
+Copyright © 2004-2025 Unicode, Inc.
NOTICE TO USER: Carefully read the following legal agreement. BY
DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
:note: The `Locale` class, which uses this module under the hood, provides a
more convenient interface for accessing the locale data.
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
Babel specific fork of tzlocal to determine the local timezone
of the system.
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
Emulated fallback local timezone when all else fails.
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
Support for ``gettext`` message catalogs.
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
Data structures for message catalogs.
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
from __future__ import annotations
:since: version 0.9
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
from __future__ import annotations
The main entry points into the extraction functionality are the functions
`extract_from_dir` and `extract_from_file`.
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
from __future__ import annotations
Frontends for the message extraction functionality.
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
A simple JavaScript 1.5 lexer which is used for the JavaScript
extractor.
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
from __future__ import annotations
Writing of files in the ``gettext`` MO (machine object) format.
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
from __future__ import annotations
Plural form definitions.
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
from __future__ import annotations
Reading and writing of files in the ``gettext`` PO (portable object)
format.
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
from __future__ import annotations
* ``LC_ALL``, and
* ``LANG``
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
# TODO:
CLDR Plural support. See UTS #35.
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
from __future__ import annotations
.. note: the code in this module is not used by Babel itself
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
from __future__ import annotations
Various utility classes and functions.
- :copyright: (c) 2013-2024 by the Babel Team.
+ :copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
from __future__ import annotations
# General information about the project.
project = 'Babel'
-copyright = '2024, The Babel Team'
+copyright = '2025, The Babel Team'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
-version = '2.16'
+version = '2.17'
# The full version, including alpha/beta/rc tags.
-release = '2.16.0'
+release = '2.17.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#!/usr/bin/env python
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2024 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
#!/usr/bin/env python
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2024 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
import os
+import re
from collections import Counter
from subprocess import check_output
root_path = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))
+aliases = {
+ re.compile("Jun Omae"): "Jun Omae",
+ re.compile(r"^Hugo$"): "Hugo van Kemenade",
+ re.compile(r"^Tomas R([.])?"): "Tomas R.",
+}
+
+
+def map_alias(name):
+ for pattern, alias in aliases.items():
+ if pattern.match(name):
+ return alias
+ return name
+
def get_sorted_authors_list():
authors = check_output(['git', 'log', '--format=%aN'], cwd=root_path).decode('UTF-8')
- counts = Counter(authors.splitlines())
+ counts = Counter(map_alias(name) for name in authors.splitlines())
return [author for (author, count) in counts.most_common()]
#!/usr/bin/env python
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2024 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2024 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2024 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2024 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2024 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2024 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2024 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2024 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2024 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2024 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2024 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2024 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2024 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2024 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which