Skip to content

v2.19.0

Latest

Choose a tag to compare

@github-actions github-actions released this 24 Nov 20:16
· 1 commit to master since this release
351b145

Well, we said we'd aim for a less glacial release cycle, and here we are – 2.19 arrives just under ten months after 2.18. 😁
(Honestly, I did mean for an even less glacial cycle, but it is what it is.)

This release brings CLDR 49, new pybabel concat and pybabel merge commands, command configuration via pyproject.toml, and a lot of bug fixes.
A huge thank-you to everyone who contributed – including 32 first-time contributors!

Highlights

  • CLDR 49 (via 48.2), with new locales such as Adyghe and Moroccan Arabic, and support for CLDR 48's relative date formats. CLDR aliases are now imported and used, fixing some missing-length corner cases and rare KeyErrors.
  • pybabel concat and pybabel merge, modeled after GNU gettext's msgcat and msgmerge. These are new commands and may be buggy.
  • Configuration in pyproject.toml: extract, init, update and compile may now read their option defaults from [tool.babel.<command>] tables. See the docs for details.
  • Lots of fixes across date parsing and formatting, compact number formatting, PO/MO file handling, and both the Python and JavaScript message extractors.
  • Fixed an interesting bug where formatting with one locale (e.g. Hebrew) could corrupt formatting for other locales later on (#1234).

Compatibility notes

  • Python 3.8 is no longer supported. Babel 2.19 supports Python 3.9 through 3.15 (and PyPy).
  • For downstream packagers: Babel is now built with Hatch via PEP 517 instead of setup.py. The sdist includes the CLDR data and builds a wheel identical to the one on PyPI. When building from a Git checkout, import the CLDR data first (make import-cldr); the build will complain if you haven't.
  • Two-digit years in parse_date are now resolved relative to today (within 80 years before and 20 years after), like ICU and Java do, so 3/9/99 parses as 1999, not 2099.
  • The public functions of babel.messages.jslexer are deprecated. It was never documented, and the JavaScript extractor is likely to be replaced outright in Babel 2.20.

Verifying this release

The release artifacts now come with build provenance attestations. You can verify a downloaded file with:

gh attestation verify babel-2.19.0-py3-none-any.whl --repo python-babel/babel

Please see CHANGES.rst for the detailed change log.

Full Changelog: v2.18.0...v2.19.0