]>
git.ipfire.org Git - thirdparty/babel.git/log
Aarni Koskela [Thu, 16 Apr 2026 12:37:05 +0000 (15:37 +0300)]
Update tests and code for CLDR 48.2
- Unit IDs renamed in 48 still work (with deprecation warnings raised)
Aarni Koskela [Thu, 16 Apr 2026 07:01:57 +0000 (10:01 +0300)]
Use CLDR 48.2
Aarni Koskela [Thu, 16 Apr 2026 07:46:04 +0000 (10:46 +0300)]
CLDR import: make --force a no-op (import is always done)
Aarni Koskela [Thu, 30 Jul 2026 15:03:24 +0000 (18:03 +0300)]
Use standard property annotations; get rid of :type: and :rtype: comments (#1304)
* Use property annotations instead of ... = property()
* Get rid of :type: and :rtype: comments; type annotations are more precise
Aarni Koskela [Thu, 30 Jul 2026 13:18:41 +0000 (16:18 +0300)]
mofile: decode context (and optimize with partition) (#1305)
* mofile: decode context (and optimize with partition)
* mofile: Separate byte data from decoded data (mypy clean on these bits)
Aarni Koskela [Thu, 30 Jul 2026 12:44:30 +0000 (15:44 +0300)]
Update messages' plural rules from CLDR data (#1303)
* Update messages' plural rules from CLDR data
* Adjust tests for new plural data
Aarni Koskela [Thu, 30 Jul 2026 10:28:28 +0000 (13:28 +0300)]
Merge pull request #1299 from python-babel/shared-cache-data
Memoize resolved locale data per instance, share LocaleDataDicts
Aarni Koskela [Thu, 30 Jul 2026 06:42:14 +0000 (09:42 +0300)]
Memoize resolved locale data per instance and share LocaleDataDicts per locale
Fixes #1234
Aarni Koskela [Thu, 30 Jul 2026 06:30:04 +0000 (09:30 +0300)]
Add test for writing into locale data
Aarni Koskela [Thu, 30 Jul 2026 06:37:12 +0000 (09:37 +0300)]
Add localedata.clear_caches()
Aarni Koskela [Thu, 30 Jul 2026 10:17:11 +0000 (13:17 +0300)]
Add a benchmark suite + CodSpeed (#1300)
* Add pytest-benchmark/pytest-codspeed compatible benchmarks
* Add CodSpeed CI step
Aarni Koskela [Wed, 29 Jul 2026 14:36:25 +0000 (17:36 +0300)]
Add support for Python 3.15 (#1296)
* Test on and declare support for Python 3.15
* Upgrade CI tools
Aarni Koskela [Mon, 20 Apr 2026 06:32:16 +0000 (09:32 +0300)]
Pin all GHA tools, including first-party (#1265)
trillian [Sat, 11 Apr 2026 15:50:58 +0000 (18:50 +0300)]
Implement long/narrow -> short fallback in babel.units (#1225)
Also implemented fallback from the correct pluralization to "other", which was also missing.
Fixes #1217.
xmo-odoo [Sat, 11 Apr 2026 15:49:38 +0000 (17:49 +0200)]
Cache validity of a locale name (#1254)
Currently `_cache` is only populated on `load`, this is an issue with
code which do a lot of locale parsing / instantiation but for one
reason or an other rarely end up needing to actually load the locale
data (e.g. date formatting with non-locale-dependent patterns) because
every cache miss is an `os.path.exists`.
Cache `exists` separately.
Update test because `lru_cache` requires all parameters to be
hashable and a list is not that.
Aarni Koskela [Wed, 18 Feb 2026 11:45:04 +0000 (13:45 +0200)]
Improve documentation (#1256)
* Remove documentation link to TimezoneTransition (removed in #958)
* Document more APIs
* Upgrade Sphinx
* Belatedly bump version in docs
Aarni Koskela [Wed, 18 Feb 2026 11:34:59 +0000 (13:34 +0200)]
Repair Python 3.9 tests (#1257)
Aarni Koskela [Sun, 1 Feb 2026 12:21:04 +0000 (13:21 +0100)]
Prepare for 2.18.0 (#1248)
* Update authors file
* Update changelog for 2.18.0
* Update copyright year
* Bump version
Aarni Koskela [Sun, 1 Feb 2026 11:58:51 +0000 (12:58 +0100)]
Add user-agent to CLDR downloader (#1247)
Bart Broere [Sat, 31 Jan 2026 12:47:02 +0000 (13:47 +0100)]
Fix formatting compact currencies of exactly one thousand in several locales (#1246)
* Add a smoke test for thousands and compact currency formats
* Fall back to other when formatting compact currencies
Aarni Koskela [Sat, 10 Jan 2026 12:53:16 +0000 (14:53 +0200)]
Reuse InitCatalog's guts in UpdateCatalog (#1244)
Fixes #1139 (since `_init_catalog` creates directories on the way)
Co-authored-by: lando <du33169@qq.com>
Aarni Koskela [Sat, 10 Jan 2026 12:32:01 +0000 (14:32 +0200)]
Extract: Merge in per-format keywords and auto_comments (#1243)
* Merge in per-format keywords and auto_comments
* Update documentation for extraction configuration
Fixes #1224
Fixes #71
Guillaume Gauvrit [Mon, 29 Dec 2025 12:04:41 +0000 (13:04 +0100)]
Add dpgettext and dnpgettext support (#1235)
Aarni Koskela [Mon, 29 Dec 2025 11:49:10 +0000 (13:49 +0200)]
Use canonical IANA zone names in zone_territories (#1220)
Refs #1218
Aarni Koskela [Mon, 29 Dec 2025 11:40:10 +0000 (13:40 +0200)]
Improve extract performance via ignoring directories early during os.walk (#968)
Co-authored-by: Steven Kao <st.kao.05@gmail.com>
Aarni Koskela [Mon, 29 Dec 2025 11:10:19 +0000 (13:10 +0200)]
Convert Unittest testcases with setup/teardown to fixtures (#1240)
* Unwrap testcases with setup/teardown
* Unwrap CLI testcases
* De-global pot_file
Aarni Koskela [Mon, 29 Dec 2025 10:28:06 +0000 (12:28 +0200)]
Add `babel.core.get_cldr_version()` (#1242)
Fixes #1237
Aarni Koskela [Thu, 25 Dec 2025 16:04:41 +0000 (18:04 +0200)]
Unwrap most `unittest` test cases to bare functions (#1241)
Aarni Koskela [Thu, 25 Dec 2025 15:14:33 +0000 (17:14 +0200)]
Fix CI via Zizmor (#1230)
Aarni Koskela [Thu, 25 Dec 2025 12:46:04 +0000 (14:46 +0200)]
Merge pull request #1202 from python-babel/reruff
Apply reformatting by hand and with Ruff
Ruff [Wed, 19 Mar 2025 11:05:15 +0000 (13:05 +0200)]
Run `ruff format babel`
Aarni Koskela [Wed, 19 Mar 2025 10:48:41 +0000 (12:48 +0200)]
Apply manual formatting/fmt:skip to things that would be poorly autoformatted
Aarni Koskela [Mon, 17 Mar 2025 14:13:04 +0000 (16:13 +0200)]
Set 95 as line-length
Aarni Koskela [Mon, 17 Mar 2025 13:16:15 +0000 (15:16 +0200)]
Bump pre-commit tools
Aarni Koskela [Wed, 8 Oct 2025 09:51:02 +0000 (12:51 +0300)]
Test on and declare support for Python 3.14 (#1233)
Aarni Koskela [Tue, 9 Sep 2025 17:14:43 +0000 (20:14 +0300)]
Add SECURITY.md (#1229)
Aarni Koskela [Tue, 9 Sep 2025 16:36:12 +0000 (19:36 +0300)]
Renovate CI & lint tools (#1228)
* CI: use pre-commit-uv for lint
* CI: renovate action versions
* CI: disable Pip version check (No need to spend time on that, really)
* Upgrade pre-commit repos
Aarni Koskela [Tue, 9 Sep 2025 15:52:51 +0000 (18:52 +0300)]
CI: make job permissions explicit (#1227)
Tomas R. [Tue, 8 Jul 2025 10:16:34 +0000 (12:16 +0200)]
Use CLDR47 (#1210)
Aarni Koskela [Thu, 3 Jul 2025 14:02:16 +0000 (17:02 +0300)]
Make the number pattern regular expression more efficient (#1213)
I verified that all patterns parsed for importing CLDR data are parsed equivalently using the new regular expression.
The inefficient regular expression was brought to our attention by GitHub user s-sanskar – thanks!
Co-authored-by: s-sanskar <sanskarpok11@gmail.com>
Aarni Koskela [Mon, 30 Jun 2025 10:20:55 +0000 (13:20 +0300)]
Merge pull request #1174 from verhovsky: Remove u string prefix from docs
Boris Verkhovskiy [Fri, 24 Jan 2025 10:21:22 +0000 (03:21 -0700)]
Stop removing u prefix in doctest
Boris Verkhovskiy [Thu, 16 Jan 2025 10:45:05 +0000 (03:45 -0700)]
Escape unicode literals
Boris Verkhovskiy [Thu, 16 Jan 2025 10:43:20 +0000 (03:43 -0700)]
Convert unicode literals to characters
Boris Verkhovskiy [Thu, 16 Jan 2025 10:31:06 +0000 (03:31 -0700)]
Remove u string prefix
Aarni Koskela [Tue, 24 Jun 2025 11:53:27 +0000 (14:53 +0300)]
Keep translator comments next to the translation function call (#1196)
* Add reproducer for issue 1195
* Keep translator comments next to the translation function call, even if the text is further away
Fixes #1195
Aarni Koskela [Tue, 24 Jun 2025 06:41:50 +0000 (09:41 +0300)]
Use pathlib.Path() in catalog frontend; improve test coverage (#1204)
Aarni Koskela [Sat, 5 Apr 2025 15:21:04 +0000 (18:21 +0300)]
Optimizations for read_po (#1200)
* Avoid extra casts (`Message()` takes care of those)
* Optimize empty normalized strings
* Don't sort translations unless plural
* Optimize unescape()
* Optimize line processing
* Optimize keyword parsing
* Optimize comment parsing
* Avoid hot `isinstance`ing in PO file parse loop
* Add fast paths in `python_format` and `python_brace_format`
* Inline distincting in `catalog.py`
Aarni Koskela [Fri, 21 Mar 2025 06:18:16 +0000 (08:18 +0200)]
Use standard library `timezone` instead of `FixedOffsetTimezone` (#1203)
Aarni Koskela [Mon, 17 Mar 2025 13:05:00 +0000 (15:05 +0200)]
Improve handling of no-inheritance-marker in timezone data (#1194)
* Add icu4c-tools
* Improve handling of no-inheritance-marker in timezone data
Fixes #1192 (but uncovers another bug)
Tomas R. [Fri, 7 Mar 2025 14:53:51 +0000 (15:53 +0100)]
Check all plurals in python format checker (#1188)
Aarni Koskela [Wed, 5 Mar 2025 07:18:05 +0000 (09:18 +0200)]
Mark PyPy test failing in CI as xfail (#1197)
clach04 [Wed, 5 Mar 2025 07:17:06 +0000 (23:17 -0800)]
Update dates.rst with current unicode.org tr35 link (#1189)
Aarni Koskela [Wed, 5 Mar 2025 06:56:51 +0000 (08:56 +0200)]
Try to fix PyPy CI flake
Tomas R. [Wed, 5 Feb 2025 09:33:01 +0000 (10:33 +0100)]
Move pytest config to pyproject.toml (#1187)
Tomas R. [Wed, 5 Feb 2025 09:31:58 +0000 (10:31 +0100)]
Add more classifiers (#1186)
Aarni Koskela [Wed, 5 Feb 2025 08:41:58 +0000 (10:41 +0200)]
Avoid unnecessary uses of `map()` (#1180)
Aarni Koskela [Mon, 3 Feb 2025 09:06:48 +0000 (11:06 +0200)]
Fix formatting for "Empty locale identifier" exception added in #1164 (#1184)
Aarni Koskela [Sat, 1 Feb 2025 15:13:46 +0000 (17:13 +0200)]
Prepare for 2.17.0 (#1182)
* Update authors
* Update changelog
* Update copyright dates
* Update version
Tomas R. [Fri, 31 Jan 2025 13:23:34 +0000 (14:23 +0100)]
Increase test coverage of the `python_format` checker (#1176)
Jun Omae (大前 潤) [Fri, 31 Jan 2025 13:22:06 +0000 (22:22 +0900)]
Fix dates formatting `Y`, `w` and `W` symbols for week-numbering (#1179)
Aarni Koskela [Wed, 29 Jan 2025 08:06:34 +0000 (10:06 +0200)]
Merge pull request #1173 from python-babel/lc-monetary-2
Prefer LC_MONETARY when formatting currencies
Aarni Koskela [Thu, 21 Dec 2023 23:42:55 +0000 (00:42 +0100)]
Prefer LC_MONETARY when formatting currency
Co-authored-by: Alexis Hildebrandt <afh@surryhill.net>
Aarni Koskela [Tue, 14 Jan 2025 14:32:22 +0000 (16:32 +0200)]
`default_locale`: support multiple keys
Also ignore falsy values in `default_locale` args.
Tomas R. [Sat, 25 Jan 2025 08:48:00 +0000 (09:48 +0100)]
Import `Literal` & `TypedDict` from the typing module (#1175)
* Import 'Literal' from the typing module
* Import 'TypedDict' from the typing module
Tomas R. [Thu, 16 Jan 2025 11:09:32 +0000 (12:09 +0100)]
Add basic support for `Message.python_brace_format` (#1169)
Aarni Koskela [Wed, 15 Jan 2025 13:01:58 +0000 (15:01 +0200)]
Small test cleanup (#1172)
* Configure Ruff formatter to preserve quotes for now
* Split support functionality tests to a separate modules
* Use standard `monkeypatch` fixture for `os.environ` patching
* Use even more `monkeypatch` for patching
---------
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Aarni Koskela [Tue, 14 Jan 2025 13:56:19 +0000 (15:56 +0200)]
Merge pull request #1170 from python-babel/small-cleanup
Small cleanups
Aarni Koskela [Tue, 14 Jan 2025 07:52:14 +0000 (09:52 +0200)]
Add test to cover `force_text` fully
Aarni Koskela [Mon, 13 Jan 2025 11:49:30 +0000 (13:49 +0200)]
Refresh docs for extraction method registration
Aarni Koskela [Mon, 13 Jan 2025 11:40:23 +0000 (13:40 +0200)]
Replace dead or insecure links
Aarni Koskela [Mon, 13 Jan 2025 11:38:46 +0000 (13:38 +0200)]
Un-shadow types in `support`
Aarni Koskela [Mon, 13 Jan 2025 11:54:56 +0000 (13:54 +0200)]
Apply minor simplifications
Aarni Koskela [Mon, 13 Jan 2025 11:28:58 +0000 (13:28 +0200)]
Fix minor pep8 complaints
Aarni Koskela [Mon, 13 Jan 2025 11:25:41 +0000 (13:25 +0200)]
Simplify `Catalog._get_mime_headers()`
Aarni Koskela [Mon, 13 Jan 2025 11:20:52 +0000 (13:20 +0200)]
Make `_force_text` a free function
Aarni Koskela [Mon, 13 Jan 2025 11:18:34 +0000 (13:18 +0200)]
Be less fancy in `_PluralTuple`
Aarni Koskela [Mon, 13 Jan 2025 11:16:18 +0000 (13:16 +0200)]
Fix up some docstrings
Aarni Koskela [Mon, 13 Jan 2025 11:10:48 +0000 (13:10 +0200)]
Ensure imported names are in __all__; sort __all__s
Aarni Koskela [Mon, 13 Jan 2025 11:10:02 +0000 (13:10 +0200)]
Upgrade Ruff
Tomas R. [Mon, 13 Jan 2025 11:50:16 +0000 (12:50 +0100)]
Remove redundant assignment (#1167)
Aarni Koskela [Fri, 10 Jan 2025 06:17:02 +0000 (08:17 +0200)]
Strip extra leading slashes in `/etc/localtime` (#1165)
* Strip extra leading slashes in `/etc/localtime`
Fixes #990
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Aarni Koskela [Thu, 9 Jan 2025 12:44:36 +0000 (14:44 +0200)]
Use `pytest.raises(match=...)` (#1166)
Aarni Koskela [Thu, 9 Jan 2025 12:41:38 +0000 (14:41 +0200)]
Merge pull request #1164 from python-babel/locale-none
Improve handling for `locale=None`
Aarni Koskela [Thu, 9 Jan 2025 08:30:09 +0000 (10:30 +0200)]
Mark `babel.lists.DEFAULT_LOCALE` as deprecated
Aarni Koskela [Wed, 8 Jan 2025 14:23:08 +0000 (16:23 +0200)]
Unify `str | Locale | None` to `Locale | str | None`
Aarni Koskela [Wed, 8 Jan 2025 13:37:19 +0000 (15:37 +0200)]
Raise a more specific error if `Locale.parse()` is passed an empty value
Aarni Koskela [Wed, 8 Jan 2025 13:52:53 +0000 (15:52 +0200)]
Defer lookups of default locale values
Aarni Koskela [Wed, 8 Jan 2025 13:57:55 +0000 (15:57 +0200)]
Remove defaults from internal `_format_currency_long_name`'s args; remove unused arg
Aarni Koskela [Wed, 8 Jan 2025 13:16:10 +0000 (15:16 +0200)]
Support short and narrow formats for format_timedelta(..., add_direction=True) (#1163)
Fixes #1162
wandrew004 [Wed, 8 Jan 2025 12:37:54 +0000 (07:37 -0500)]
Add tzdata as dev dependency; move dev deps to pyproject.toml (#1159)
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Aarni Koskela <akx@iki.fi>
Tomas R. [Tue, 10 Dec 2024 06:50:13 +0000 (07:50 +0100)]
Prevent wrapping file locations containing white space (#1120)
Co-authored-by: Aarni Koskela <akx@iki.fi>
James McKinney [Mon, 9 Dec 2024 14:39:49 +0000 (09:39 -0500)]
fix(extract): use the first matching method and options (#1121)
... instead of the first matching method and last matching options.
Co-authored-by: Aarni Koskela <akx@iki.fi>
Aarni Koskela [Mon, 9 Dec 2024 13:47:43 +0000 (15:47 +0200)]
Bump CI/tool versions (#1160)
* CI: use Ubuntu 24.04 and macOS 14 for tests
* CI: update codecov-action version
* Update lint tools; fix issues
Tomas R. [Mon, 9 Dec 2024 12:35:24 +0000 (13:35 +0100)]
Simplify read_mo logic (#1148)
Tomas R. [Mon, 9 Dec 2024 12:11:12 +0000 (13:11 +0100)]
Allow specifying an explicit format in parse_date/parse_time (#1131)
* Allow specifying an explicit format in parse_date/parse_time
* Improve docstring
Tomáš Hrnčiar [Mon, 9 Dec 2024 12:05:34 +0000 (13:05 +0100)]
Adjust docs/conf.py to add compatibility with sphinx 8 (#1155)
Fixes: #1143
Tomas R. [Mon, 9 Dec 2024 12:03:12 +0000 (13:03 +0100)]
Update CI to use Python 3.13 and Ubuntu 24.04 (#1153)
Tomas R. [Fri, 15 Nov 2024 12:23:05 +0000 (13:23 +0100)]
Use CLDR 46 (#1145)
* Use CLDR 46
* Update checksum
* Add tests for units
* Add a test for alt='official'
* Fix formatting
Tomas R. [Sun, 10 Nov 2024 20:39:04 +0000 (21:39 +0100)]
Replace OrderedDict with just dict (#1149)