From: Aarni Koskela Date: Sat, 1 Feb 2025 15:13:46 +0000 (+0200) Subject: Prepare for 2.17.0 (#1182) X-Git-Tag: v2.17.0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b50a1d2186c20f3359f7e10853d2b2225a46ed40;p=thirdparty%2Fbabel.git Prepare for 2.17.0 (#1182) * Update authors * Update changelog * Update copyright dates * Update version --- diff --git a/AUTHORS b/AUTHORS index cdceb122..89353ae0 100644 --- a/AUTHORS +++ b/AUTHORS @@ -12,6 +12,7 @@ Babel is written and maintained by the Babel team and various contributors: - Philip Jenvey - benselme - Isaac Jurado +- Tomas R. - Tobias Bieniek - Erick Wilder - Jonah Lawrence @@ -20,15 +21,13 @@ Babel is written and maintained by the Babel team and various contributors: - 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 @@ -50,6 +49,13 @@ Babel is written and maintained by the Babel team and various contributors: - Arturas Moskvinas - Leonardo Pistone - Hyunjun Kim +- wandrew004 +- James McKinney +- Tomáš Hrnčiar +- Gabe Sherman +- mattdiaz007 +- Dylan Kiss +- Daniel Roschka - buhtz - Bohdan Malomuzh - Leonid diff --git a/CHANGES.rst b/CHANGES.rst index f33221fc..dcd7aa28 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,58 @@ 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 -------------- diff --git a/LICENSE b/LICENSE index 83b6e513..6ddae98e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -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 diff --git a/babel/__init__.py b/babel/__init__.py index ff9c533a..7b277455 100644 --- a/babel/__init__.py +++ b/babel/__init__.py @@ -12,7 +12,7 @@ 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. """ @@ -25,7 +25,7 @@ from babel.core import ( parse_locale, ) -__version__ = '2.16.0' +__version__ = '2.17.0' __all__ = [ 'Locale', diff --git a/babel/core.py b/babel/core.py index bffef94d..5762bbe3 100644 --- a/babel/core.py +++ b/babel/core.py @@ -4,7 +4,7 @@ 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. """ diff --git a/babel/dates.py b/babel/dates.py index d060fdef..355a9236 100644 --- a/babel/dates.py +++ b/babel/dates.py @@ -11,7 +11,7 @@ * ``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. """ diff --git a/babel/lists.py b/babel/lists.py index 103a1771..353171c7 100644 --- a/babel/lists.py +++ b/babel/lists.py @@ -10,7 +10,7 @@ * ``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 diff --git a/babel/locale-data/LICENSE.unicode b/babel/locale-data/LICENSE.unicode index a82da826..861b74f3 100644 --- a/babel/locale-data/LICENSE.unicode +++ b/babel/locale-data/LICENSE.unicode @@ -2,7 +2,7 @@ UNICODE LICENSE V3 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 diff --git a/babel/localedata.py b/babel/localedata.py index 2aabfd18..59f1db09 100644 --- a/babel/localedata.py +++ b/babel/localedata.py @@ -7,7 +7,7 @@ :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. """ diff --git a/babel/localtime/__init__.py b/babel/localtime/__init__.py index 1066c951..854c0749 100644 --- a/babel/localtime/__init__.py +++ b/babel/localtime/__init__.py @@ -5,7 +5,7 @@ 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. """ diff --git a/babel/localtime/_fallback.py b/babel/localtime/_fallback.py index 7c99f488..fab6867c 100644 --- a/babel/localtime/_fallback.py +++ b/babel/localtime/_fallback.py @@ -4,7 +4,7 @@ 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. """ diff --git a/babel/messages/__init__.py b/babel/messages/__init__.py index 5a81b910..ca83faa9 100644 --- a/babel/messages/__init__.py +++ b/babel/messages/__init__.py @@ -4,7 +4,7 @@ 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. """ diff --git a/babel/messages/catalog.py b/babel/messages/catalog.py index aaff8df0..f84a5bd1 100644 --- a/babel/messages/catalog.py +++ b/babel/messages/catalog.py @@ -4,7 +4,7 @@ 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 diff --git a/babel/messages/checkers.py b/babel/messages/checkers.py index 79b3a6fa..df7c3ca7 100644 --- a/babel/messages/checkers.py +++ b/babel/messages/checkers.py @@ -6,7 +6,7 @@ :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 diff --git a/babel/messages/extract.py b/babel/messages/extract.py index 6dd03138..7f4230f6 100644 --- a/babel/messages/extract.py +++ b/babel/messages/extract.py @@ -12,7 +12,7 @@ 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 diff --git a/babel/messages/frontend.py b/babel/messages/frontend.py index 5a696125..29e5a2aa 100644 --- a/babel/messages/frontend.py +++ b/babel/messages/frontend.py @@ -4,7 +4,7 @@ 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. """ diff --git a/babel/messages/jslexer.py b/babel/messages/jslexer.py index c7cf0577..5fc4956f 100644 --- a/babel/messages/jslexer.py +++ b/babel/messages/jslexer.py @@ -5,7 +5,7 @@ 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 diff --git a/babel/messages/mofile.py b/babel/messages/mofile.py index 28f89c57..3c9fefc4 100644 --- a/babel/messages/mofile.py +++ b/babel/messages/mofile.py @@ -4,7 +4,7 @@ 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 diff --git a/babel/messages/plurals.py b/babel/messages/plurals.py index 1bbd9620..da336a7b 100644 --- a/babel/messages/plurals.py +++ b/babel/messages/plurals.py @@ -4,7 +4,7 @@ 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 diff --git a/babel/messages/pofile.py b/babel/messages/pofile.py index ad9b07ad..2bb0c774 100644 --- a/babel/messages/pofile.py +++ b/babel/messages/pofile.py @@ -5,7 +5,7 @@ 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 diff --git a/babel/numbers.py b/babel/numbers.py index 8dd4d9ea..2737a707 100644 --- a/babel/numbers.py +++ b/babel/numbers.py @@ -12,7 +12,7 @@ * ``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: diff --git a/babel/plural.py b/babel/plural.py index a2e30f45..085209e9 100644 --- a/babel/plural.py +++ b/babel/plural.py @@ -4,7 +4,7 @@ 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 diff --git a/babel/support.py b/babel/support.py index 4374a0ce..b600bfe2 100644 --- a/babel/support.py +++ b/babel/support.py @@ -7,7 +7,7 @@ .. 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 diff --git a/babel/util.py b/babel/util.py index e0b4e2a6..d113982e 100644 --- a/babel/util.py +++ b/babel/util.py @@ -4,7 +4,7 @@ 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 diff --git a/docs/conf.py b/docs/conf.py index cec8d3ba..b22b78c4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -44,16 +44,16 @@ master_doc = 'index' # 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. diff --git a/scripts/dump_data.py b/scripts/dump_data.py index 1d738347..f054dfab 100755 --- a/scripts/dump_data.py +++ b/scripts/dump_data.py @@ -1,6 +1,6 @@ #!/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 diff --git a/scripts/dump_global.py b/scripts/dump_global.py index edb42fed..54f8de1a 100755 --- a/scripts/dump_global.py +++ b/scripts/dump_global.py @@ -1,6 +1,6 @@ #!/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 diff --git a/scripts/generate_authors.py b/scripts/generate_authors.py index a5443b91..cd18f640 100644 --- a/scripts/generate_authors.py +++ b/scripts/generate_authors.py @@ -1,13 +1,27 @@ 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()] diff --git a/scripts/import_cldr.py b/scripts/import_cldr.py index 7e5cdbab..bcd5898e 100755 --- a/scripts/import_cldr.py +++ b/scripts/import_cldr.py @@ -1,6 +1,6 @@ #!/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 diff --git a/tests/messages/test_catalog.py b/tests/messages/test_catalog.py index 64e76e99..692931ea 100644 --- a/tests/messages/test_catalog.py +++ b/tests/messages/test_catalog.py @@ -1,5 +1,5 @@ # -# 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 diff --git a/tests/messages/test_checkers.py b/tests/messages/test_checkers.py index 586347cf..bba8f145 100644 --- a/tests/messages/test_checkers.py +++ b/tests/messages/test_checkers.py @@ -1,5 +1,5 @@ # -# 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 diff --git a/tests/messages/test_extract.py b/tests/messages/test_extract.py index a9b2d117..d5ac3b2c 100644 --- a/tests/messages/test_extract.py +++ b/tests/messages/test_extract.py @@ -1,5 +1,5 @@ # -# 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 diff --git a/tests/messages/test_frontend.py b/tests/messages/test_frontend.py index e42d903a..c83948d2 100644 --- a/tests/messages/test_frontend.py +++ b/tests/messages/test_frontend.py @@ -1,5 +1,5 @@ # -# 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 diff --git a/tests/messages/test_mofile.py b/tests/messages/test_mofile.py index 9b27a203..8d1a89eb 100644 --- a/tests/messages/test_mofile.py +++ b/tests/messages/test_mofile.py @@ -1,5 +1,5 @@ # -# 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 diff --git a/tests/messages/test_plurals.py b/tests/messages/test_plurals.py index 33e08ad7..cd5a2fba 100644 --- a/tests/messages/test_plurals.py +++ b/tests/messages/test_plurals.py @@ -1,5 +1,5 @@ # -# 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 diff --git a/tests/messages/test_pofile.py b/tests/messages/test_pofile.py index 51b9ef70..2bcc3df8 100644 --- a/tests/messages/test_pofile.py +++ b/tests/messages/test_pofile.py @@ -1,5 +1,5 @@ # -# 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 diff --git a/tests/test_core.py b/tests/test_core.py index 8770cf8d..aaf95a1c 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1,5 +1,5 @@ # -# 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 diff --git a/tests/test_dates.py b/tests/test_dates.py index 18bf4343..e47521e4 100644 --- a/tests/test_dates.py +++ b/tests/test_dates.py @@ -1,5 +1,5 @@ # -# 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 diff --git a/tests/test_localedata.py b/tests/test_localedata.py index 4a167846..6911cbdc 100644 --- a/tests/test_localedata.py +++ b/tests/test_localedata.py @@ -1,5 +1,5 @@ # -# 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 diff --git a/tests/test_numbers.py b/tests/test_numbers.py index 45892fe2..e9c21662 100644 --- a/tests/test_numbers.py +++ b/tests/test_numbers.py @@ -1,5 +1,5 @@ # -# 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 diff --git a/tests/test_plural.py b/tests/test_plural.py index 0e58a422..83f881b2 100644 --- a/tests/test_plural.py +++ b/tests/test_plural.py @@ -1,5 +1,5 @@ # -# 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 diff --git a/tests/test_util.py b/tests/test_util.py index c51bab23..1b464e07 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -1,5 +1,5 @@ # -# 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