]> git.ipfire.org Git - thirdparty/babel.git/log
thirdparty/babel.git
3 months agoUse `pytest.raises(match=...)` pytest-match 1166/head
Aarni Koskela [Thu, 9 Jan 2025 12:40:09 +0000 (14:40 +0200)] 
Use `pytest.raises(match=...)`

3 months agoSupport short and narrow formats for format_timedelta(..., add_direction=True) (...
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

4 months agoAdd tzdata as dev dependency; move dev deps to pyproject.toml (#1159)
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>
4 months agoPrevent wrapping file locations containing white space (#1120)
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>
4 months agofix(extract): use the first matching method and options (#1121)
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>
4 months agoBump CI/tool versions (#1160)
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

4 months agoSimplify read_mo logic (#1148)
Tomas R. [Mon, 9 Dec 2024 12:35:24 +0000 (13:35 +0100)] 
Simplify read_mo logic (#1148)

4 months agoAllow specifying an explicit format in parse_date/parse_time (#1131)
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

4 months agoAdjust docs/conf.py to add compatibility with sphinx 8 (#1155)
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
4 months agoUpdate CI to use Python 3.13 and Ubuntu 24.04 (#1153)
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)

5 months agoUse CLDR 46 (#1145)
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

5 months agoReplace OrderedDict with just dict (#1149)
Tomas R. [Sun, 10 Nov 2024 20:39:04 +0000 (21:39 +0100)] 
Replace OrderedDict with just dict (#1149)

6 months agoFix the way obsolete messages are stored (#1132)
Tomas R. [Sun, 20 Oct 2024 06:54:27 +0000 (08:54 +0200)] 
Fix the way obsolete messages are stored (#1132)

6 months agoMark `wraptext` deprecated; use `TextWrapper` directly in `write_po` (#1140)
Aarni Koskela [Sun, 20 Oct 2024 06:52:07 +0000 (09:52 +0300)] 
Mark `wraptext` deprecated; use `TextWrapper` directly in `write_po` (#1140)

* Mark `wraptext` deprecated; use `TextWrapper` directly in `write_po`

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
6 months agoMake seconds optional in `parse_time` time formats (#1141)
Tomas R. [Sun, 20 Oct 2024 06:50:36 +0000 (08:50 +0200)] 
Make seconds optional in `parse_time` time formats (#1141)

6 months agoPO files: Consider a message without a translation to have an empty translation ...
Gabe Sherman [Sat, 19 Oct 2024 12:33:39 +0000 (06:33 -0600)] 
PO files: Consider a message without a translation to have an empty translation (#1135)

Fixes an index out of bounds error in add_message.

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Co-authored-by: Aarni Koskela <akx@iki.fi>
6 months agoDelete duplicate code in test (#1138)
mattdiaz007 [Sat, 19 Oct 2024 12:21:51 +0000 (08:21 -0400)] 
Delete duplicate code in test (#1138)

6 months agoFix extracted lineno with nested calls (#1126)
Dylan Kiss [Sat, 19 Oct 2024 12:17:36 +0000 (14:17 +0200)] 
Fix extracted lineno with nested calls (#1126)

When a gettext call had a nested function call on a new line, the
extract function would use that nested call's line number when
extracting the terms for the gettext call.

The reason is that we set the line number on any encounter of an opening
parenthesis after a gettext keyword. This does not work if either we
have a nested call, or our first term starts on a new line.

This commit fixes that by only setting the line number when we encounter
the first argument inside a gettext call.

Existing tests were adapted to work according to `xgettext` with regards
to the line numbers.

Fixes https://github.com/python-babel/babel/issues/1123

6 months agoReplace more alternate characters in format_skeleton (#1122)
Tomas R. [Sat, 19 Oct 2024 12:12:50 +0000 (14:12 +0200)] 
Replace more alternate characters in format_skeleton (#1122)

Replaces some additional characters which never appear in resource files before matching the skeleton. This replicates the behaviour of ICU.

6 months agoBugfix: Replace str.index with str.find (#1130)
Tomas R. [Sat, 19 Oct 2024 12:01:58 +0000 (14:01 +0200)] 
Bugfix: Replace str.index with str.find (#1130)

8 months agoEnclose white spaces in references (#1105) 1062/head
Daniel Roschka [Wed, 4 Sep 2024 15:58:12 +0000 (17:58 +0200)] 
Enclose white spaces in references (#1105)

Since version 0.22 gettext encloses file names in references which
contain white spaces or tabs within First Strong Isolate (U+2068) and
Pop Directional Isolate (U+2069). This commit adds the same behavior for
Babel.

8 months agoFix deprecation warnings for datetime.utcnow() (#1119)
Tomas R [Wed, 28 Aug 2024 09:39:46 +0000 (11:39 +0200)] 
Fix deprecation warnings for datetime.utcnow() (#1119)

9 months agoPrepare for 2.16.0 release (#1116) v2.16.0
Aarni Koskela [Thu, 8 Aug 2024 12:45:14 +0000 (15:45 +0300)] 
Prepare for 2.16.0 release (#1116)

9 months agoInitial support for reading mapping configuration as TOML (#1108)
Aarni Koskela [Wed, 7 Aug 2024 09:46:55 +0000 (12:46 +0300)] 
Initial support for reading mapping configuration as TOML (#1108)

* Rename parse_mapping to parse_mapping_cfg and remove duplicated test
* Add initial support for TOML mapping configuration (prefer tomllib to tomli)

---------

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
9 months agoTwo hyperlinks (to CLDR) and some typos (#1115)
buhtz [Wed, 7 Aug 2024 08:20:28 +0000 (10:20 +0200)] 
Two hyperlinks (to CLDR) and some typos (#1115)

9 months agoDo not allow substituting alternates or drafts in derived locales (#1113)
Aarni Koskela [Wed, 7 Aug 2024 08:14:34 +0000 (11:14 +0300)] 
Do not allow substituting alternates or drafts in derived locales (#1113)

* download_import_cldr.py: pass remaining arguments through to import_cldr

* Do not allow substituting alternates or drafts in derived locales

For more coverage, we've allowed using alternate or draft values
when no officially accepted values have been present.

However, non-global (i.e. e.g. `de_CH` locales) may have an alternate
spelling for what would be an alternate in the parent locale (and
that alternate hasn't been imported into the parent), and the import
would have then accepted the alternate from the child locale as a
non-alternate.

Refs #1112

9 months agoNormalize package name to lower-case in setup.py (#1110)
Aarni Koskela [Mon, 5 Aug 2024 15:11:10 +0000 (18:11 +0300)] 
Normalize package name to lower-case in setup.py (#1110)

Fixes #1109.

9 months agoTest on Python 3.13 beta releases (#1107)
Aarni Koskela [Thu, 25 Jul 2024 11:25:02 +0000 (14:25 +0300)] 
Test on Python 3.13 beta releases (#1107)

* Test on Python 3.13 beta releases

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
9 months agoAllow use of importlib.metadata for finding entrypoints (#1102)
Aarni Koskela [Thu, 25 Jul 2024 09:51:43 +0000 (12:51 +0300)] 
Allow use of importlib.metadata for finding entrypoints (#1102)

* Support importlib.metadata for finding entrypoints
* Add a basic interoperability test for Jinja2 extraction
* Only use importlib.metadata on Python 3.10+

Co-authored-by: podgorniy94 <podgorniy.inc@gmail.com>
9 months agoAllow falling back to modifier-less locale data when modified data is missing (#1104)
Aarni Koskela [Thu, 25 Jul 2024 09:38:57 +0000 (12:38 +0300)] 
Allow falling back to modifier-less locale data when modified data is missing (#1104)

IOW, e.g. the data loaded by `ja_JP@mod` is `ja_JP` in the absence of data that would have the modifier present.

Fixes #1089

9 months agoImprove docs for `format_skeleton` (#1106)
Tomas R [Thu, 25 Jul 2024 09:34:35 +0000 (11:34 +0200)] 
Improve docs for `format_skeleton` (#1106)

Makes it explicit that even when using fuzzy=True, the function can still raise if there are no suitable formats that match the skeleton.

9 months agoAllow parsing .po files that have an extant but empty Language header (#1101)
Aarni Koskela [Tue, 23 Jul 2024 16:28:59 +0000 (19:28 +0300)] 
Allow parsing .po files that have an extant but empty Language header (#1101)

Fixes #1087

9 months agoAvoid crashing on importing `babel.localtime` when TZ envvar is malformed (#1100)
Aarni Koskela [Tue, 23 Jul 2024 07:10:08 +0000 (10:10 +0300)] 
Avoid crashing on importing `babel.localtime` when TZ envvar is malformed (#1100)

When `pytz` is _not_ installed, importing `babel.localtime` could fail
(repeatedly) when the `TZ` environment variable is malformed enough to be
caught by `_validate_tzfile_path`, which might throw a certain `ValueError`.

(When `pytz` is installed, it would raise an `UnknownTimeZoneError` we
already catch and ignore for the same sort of input.)

Fixes #1092

9 months agoImprove Codecov configuration (#1103)
Aarni Koskela [Thu, 18 Jul 2024 09:07:02 +0000 (12:07 +0300)] 
Improve Codecov configuration (#1103)

9 months agoMerge pull request #1099 from python-babel/issue-1098
Aarni Koskela [Mon, 15 Jul 2024 12:05:41 +0000 (15:05 +0300)] 
Merge pull request #1099 from python-babel/issue-1098

Support list format fallbacks

9 months agoSupport list format fallbacks issue-1098 1099/head
Aarni Koskela [Thu, 11 Jul 2024 11:54:16 +0000 (14:54 +0300)] 
Support list format fallbacks

9 months agoDo not import list patterns that have no parts
Aarni Koskela [Thu, 11 Jul 2024 11:06:02 +0000 (14:06 +0300)] 
Do not import list patterns that have no parts

9 months agoUse conventional parametrize in list tests
Aarni Koskela [Thu, 11 Jul 2024 10:43:22 +0000 (13:43 +0300)] 
Use conventional parametrize in list tests

9 months agoImprove test for ignore_dirs (#1052)
Bohdan Malomuzh [Thu, 11 Jul 2024 06:30:06 +0000 (09:30 +0300)] 
Improve test for ignore_dirs (#1052)

Adds multiple value for proper test.

Follows up on #832

9 months agoMake pgettext search plurals when translation is not found (#1085)
Tomas R [Thu, 11 Jul 2024 06:11:04 +0000 (08:11 +0200)] 
Make pgettext search plurals when translation is not found (#1085)

pgettext can now find the following translation
when using `pgettext("ctx", "foo")`:
```
msgctxt "ctx"
msgid "foo"
msgid_plural "foos"
msgstr[0] "foo translated"
```

The upstream CPython PR is  https://github.com/python/cpython/pull/107118

9 months agoUpgrade to CLDR 45 (#1077)
Tomas R [Thu, 11 Jul 2024 06:10:19 +0000 (08:10 +0200)] 
Upgrade to CLDR 45 (#1077)

* Upgrade to CLDR 45

* Handle 'localeRules="nonlikelyScript"' for parent locales

Locales of the form 'lang_Script' where 'Script' is not the
likely script for 'lang' should have 'root' as their parent
locale. For example, the parent of 'az_Arab' should not be
computed as 'az' by truncating from the end, but should be
'root' instead as 'Arab' is not the likely script for 'az'.

The list of such languages was previously specified using
an explicit 'locales' attribute. It is now handled dynamically
using the new 'localeRules' attribute.

9 months agoUpgrade pre-commit tools, fix ruff issues
Aarni Koskela [Thu, 11 Jul 2024 05:53:43 +0000 (08:53 +0300)] 
Upgrade pre-commit tools, fix ruff issues

9 months agoCI: use macos-12, not macos-11 (which is gone)
Aarni Koskela [Thu, 11 Jul 2024 05:49:37 +0000 (08:49 +0300)] 
CI: use macos-12, not macos-11 (which is gone)

9 months agoFix ignore-dirs issue (#1094) (#1095)
Leonid [Wed, 10 Jul 2024 15:07:14 +0000 (18:07 +0300)] 
Fix ignore-dirs issue (#1094) (#1095)

11 months agoReplace deprecated 'ast.Str' with 'ast.Constant' (#1083)
Tomas R [Mon, 13 May 2024 13:40:32 +0000 (15:40 +0200)] 
Replace deprecated 'ast.Str' with 'ast.Constant' (#1083)

12 months agoUpgrade GitHub Actions versions to avoid deprecation warnings (#1080)
Aarni Koskela [Sun, 5 May 2024 14:13:26 +0000 (17:13 +0300)] 
Upgrade GitHub Actions versions to avoid deprecation warnings (#1080)

12 months agoPrepare for 2.15.0 release (#1079) v2.15.0
Aarni Koskela [Sun, 5 May 2024 13:48:29 +0000 (16:48 +0300)] 
Prepare for 2.15.0 release (#1079)

12 months agoEncode support for the "fall back to short format" logic for time delta formatting...
Aarni Koskela [Thu, 25 Apr 2024 18:23:10 +0000 (21:23 +0300)] 
Encode support for the "fall back to short format" logic for time delta formatting (#1075)

Fixes #892

12 months agoInclude Unicode license in `locale-data` and in documentation (#1074)
Aarni Koskela [Mon, 22 Apr 2024 06:54:14 +0000 (09:54 +0300)] 
Include Unicode license in `locale-data` and in documentation (#1074)

Fixes #1072

12 months agoAllow alternative space characters as group separator when parsing numbers (#1007)
Ronan Amicel [Mon, 22 Apr 2024 06:53:54 +0000 (08:53 +0200)] 
Allow alternative space characters as group separator when parsing numbers (#1007)

The French group separator is `"\u202f"` (narrow non-breaking space),
but when parsing numbers in the real world, you will most often encounter
either a regular space character (`" "`) or a non-breaking space character
(`"\xa0"`).

The issue was partially adressed earlier in https://github.com/python-babel/babel/issues/637,
but only to allow regular spaces instead of non-breaking spaces `"\xa0"` in
`parse_decimal`.

This commit goes further by changing both `parse_number` and `parse_decimal`
to allow certain other space characters when the group character is itself a space character,
but is not present in the string to parse.

Unit tests are included.

12 months agoUse CLDR 44 and adjust tests to match new data (#1071)
Aarni Koskela [Tue, 16 Apr 2024 06:23:55 +0000 (09:23 +0300)] 
Use CLDR 44 and adjust tests to match new data (#1071)

13 months agoImprove .po IO (#1068)
Aarni Koskela [Wed, 27 Mar 2024 15:46:53 +0000 (17:46 +0200)] 
Improve .po IO (#1068)

* read_po: note interface also supports iterable-of-strings, not a filelike

* write_po: refactor into generate_po

16 months agoUpgrade GitHub Actions (#1054)
Christian Clauss [Tue, 26 Dec 2023 19:50:18 +0000 (20:50 +0100)] 
Upgrade GitHub Actions (#1054)

16 months agoDrop support for Python 3.7 (EOL since June 2023) (#1048)
Aarni Koskela [Wed, 13 Dec 2023 11:28:43 +0000 (13:28 +0200)] 
Drop support for Python 3.7 (EOL since June 2023) (#1048)

16 months agoPrepare for 2.14.0 release (#1047) v2.14.0
Aarni Koskela [Tue, 12 Dec 2023 13:19:43 +0000 (15:19 +0200)] 
Prepare for 2.14.0 release (#1047)

17 months agoImprove parsing of malformed decimals (#1042)
Best Olunusi [Tue, 28 Nov 2023 09:44:05 +0000 (04:44 -0500)] 
Improve parsing of malformed decimals (#1042)

Signed-off-by: Olunusi Best <olunusibest@gmail.com>
Co-authored-by: Aarni Koskela <akx@iki.fi>
17 months agoAdd support for non-Latin numbering systems for number symbols (#1036)
Teo [Tue, 28 Nov 2023 09:18:50 +0000 (11:18 +0200)] 
Add support for non-Latin numbering systems for number symbols (#1036)

- Import number symbols for available numbering systems from cldr data
- Add default_numbering_system  and other_numbering_systems properties for Locale
- Add numbering_system argument to relevant number formatting fuctions and use number symbols based on the given numbering system

Refs https://github.com/python-babel/babel/issues/446

Co-authored-by: Aarni Koskela <akx@iki.fi>
17 months agoAllow last_translator to be passed as an option to extract_message (#1044)
Ivan Koldakov [Tue, 28 Nov 2023 08:45:14 +0000 (09:45 +0100)] 
Allow last_translator to be passed as an option to extract_message (#1044)

Co-authored-by: Ivan Koldakov <ivan@koldakov.com>
17 months agoCI: use GitHub output formats (#1046)
Aarni Koskela [Mon, 27 Nov 2023 14:37:36 +0000 (16:37 +0200)] 
CI: use GitHub output formats (#1046)

* CI: use GitHub output format for Ruff

* CI: use pytest-github-actions-annotate-failures too

17 months agoEnforce trailing commas (enable Ruff COM rule and autofix) (#1045)
Aarni Koskela [Mon, 27 Nov 2023 13:18:54 +0000 (15:18 +0200)] 
Enforce trailing commas (enable Ruff COM rule and autofix) (#1045)

17 months agoDecouple `pybabel` frontend from distutils/setuptools; remove dependency (#1041)
Aarni Koskela [Wed, 22 Nov 2023 06:39:00 +0000 (08:39 +0200)] 
Decouple `pybabel` frontend from distutils/setuptools; remove dependency (#1041)

* Decouple `pybabel` frontend from distutils/setuptools; remove dependency

* Add tox configuration for testing with setuptools too

* Use `__getattr__` for re-export

Fixes #1040

Co-authored-by: Oleh Prypin <oleh@pryp.in>
17 months agoBump CLDR download script to 43 (#1043)
Rico Hermans [Sat, 18 Nov 2023 15:15:46 +0000 (16:15 +0100)] 
Bump CLDR download script to 43 (#1043)

18 months agoPrepare for 2.13.1 release v2.13.1
Aarni Koskela [Tue, 24 Oct 2023 14:26:15 +0000 (17:26 +0300)] 
Prepare for 2.13.1 release

18 months agoFix _locales_to_names: Call str() on the parameter variable instead of the module...
Daniel [Tue, 24 Oct 2023 14:19:32 +0000 (16:19 +0200)] 
Fix _locales_to_names: Call str() on the parameter variable instead of the module object. (#1038)

Co-authored-by: Daniel Trachsel <daniel.trachsel@borm.ch>
18 months agoDepend on setuptools since Python 3.12
Oleh Prypin [Sat, 7 Oct 2023 10:29:11 +0000 (12:29 +0200)] 
Depend on setuptools since Python 3.12

The dependency was already added specifically for CI, but that is not correct, because it's the package itself that actually depends on setuptools

19 months agoPrepare for 2.13.0 release v2.13.0
Aarni Koskela [Sun, 1 Oct 2023 11:35:11 +0000 (14:35 +0300)] 
Prepare for 2.13.0 release

19 months agoRenovate CI & tools (#1028)
Aarni Koskela [Sun, 1 Oct 2023 11:15:51 +0000 (14:15 +0300)] 
Renovate CI & tools (#1028)

* Update ruff, run autofix
* CI: Update action versions
* CI: Unify workflow files
* CI: Test on Python 3.12 too
* CI: use Ubuntu 22.04 instead of 20.04
* CI: add publish step for version tags

19 months agoAdd f-string parsing for Python 3.12 (PEP 701) (#1027)
Petr Viktorin [Sun, 1 Oct 2023 10:52:33 +0000 (12:52 +0200)] 
Add f-string parsing for Python 3.12 (PEP 701) (#1027)

Since Python 3.12, f-strings are tokenized and parsed like the rest
of Python's grammar, using the new tokens FSTRING_START, FSTRING_MIDDLE
and FSTRING_END.

Make the babel message extractor concatenate these three if they're
adjacent to each other. If they're not, that means there are dynamic
substitutions, so the f-string is ignored.

19 months agoSupport 't' specifier in keywords (#1015)
Jean Abou-Samra [Sun, 1 Oct 2023 09:53:54 +0000 (11:53 +0200)] 
Support 't' specifier in keywords (#1015)

* Support 't' specifier in keywords
* Document --keyword format
* Document parse_keywords output format and make logic more readable

Fixes #1014

21 months agoAdd flag to ignore POT-Creation-Date for updates (#999)
Joe Portela [Thu, 27 Jul 2023 11:24:25 +0000 (07:24 -0400)] 
Add flag to ignore POT-Creation-Date for updates (#999)

22 months agoUse aware UTC datetimes internally (#1009)
Ville Skyttä [Tue, 27 Jun 2023 20:08:06 +0000 (23:08 +0300)] 
Use aware UTC datetimes internally (#1009)

Avoids deprecation warnings on Python 3.12.

22 months agoUse SPDX license identifier: BSD-3-Clause (#994)
Marc-Etienne Vargenau [Tue, 27 Jun 2023 20:04:16 +0000 (22:04 +0200)] 
Use SPDX license identifier: BSD-3-Clause (#994)

Signed-off-by: Marc-Etienne Vargenau <marc-etienne.vargenau@nokia.com>
22 months agoMerge pull request #1017 from python-babel/renovate
Aarni Koskela [Tue, 27 Jun 2023 19:59:36 +0000 (22:59 +0300)] 
Merge pull request #1017 from python-babel/renovate

Renovate lint tools

22 months agoMark tz-dependent doctests +SKIP 1017/head
Aarni Koskela [Tue, 27 Jun 2023 19:57:08 +0000 (22:57 +0300)] 
Mark tz-dependent doctests +SKIP

Refs #998

22 months agoFix a couple of B018 errors
Aarni Koskela [Tue, 27 Jun 2023 19:42:18 +0000 (22:42 +0300)] 
Fix a couple of B018 errors

22 months agoAdd explicit stacklevel= parameters to warnings
Aarni Koskela [Tue, 27 Jun 2023 19:33:39 +0000 (22:33 +0300)] 
Add explicit stacklevel= parameters to warnings

22 months agoUpdate ruff, apply autofix
Aarni Koskela [Tue, 27 Jun 2023 19:31:32 +0000 (22:31 +0300)] 
Update ruff, apply autofix

22 months agoSpelling and grammar fixes
Ville Skyttä [Sun, 11 Jun 2023 06:43:39 +0000 (09:43 +0300)] 
Spelling and grammar fixes

2 years agoFreeze format_time() tests to a specific date to fix test failures (#998)
Michał Górny [Tue, 9 May 2023 08:20:04 +0000 (10:20 +0200)] 
Freeze format_time() tests to a specific date to fix test failures (#998)

Freeze the date when performing the tests for format_time() with
a timezone specified.  Since the time object does not specify a date,
the formatter uses the format string specific to the current date.
As a result, if the current DST state is different than when the test
was last updated, it failed.

2 years agoMerge pull request #986 from python-babel/improve-contributing-instructions
Aarni Koskela [Fri, 3 Mar 2023 16:51:58 +0000 (18:51 +0200)] 
Merge pull request #986 from python-babel/improve-contributing-instructions

Improve contributing instructions

2 years agoImprove CONTRIBUTING.md 986/head
Aarni Koskela [Fri, 3 Mar 2023 14:26:30 +0000 (16:26 +0200)] 
Improve CONTRIBUTING.md

Refs #985

2 years agoMove dev dependencies to dev extra
Aarni Koskela [Fri, 3 Mar 2023 14:20:36 +0000 (16:20 +0200)] 
Move dev dependencies to dev extra

2 years agomakefile: don't import-cldr before tox; it'll clean it
Aarni Koskela [Fri, 3 Mar 2023 14:19:47 +0000 (16:19 +0200)] 
makefile: don't import-cldr before tox; it'll clean it

2 years agoRemove test-env makefile target (use tox instead)
Aarni Koskela [Fri, 3 Mar 2023 14:07:36 +0000 (16:07 +0200)] 
Remove test-env makefile target (use tox instead)

2 years agoImprove type annotation for `babel.support.Translations.load` (#983)
Aarni Koskela [Thu, 2 Mar 2023 14:13:12 +0000 (16:13 +0200)] 
Improve type annotation for `babel.support.Translations.load` (#983)

Fixes #982

Co-authored-by: Jonah Lawrence <jonah@freshidea.com>
2 years agobabel.messages.catalog: deduplicate _to_fuzzy_match_key logic (#980)
Aarni Koskela [Thu, 2 Mar 2023 13:50:56 +0000 (15:50 +0200)] 
babel.messages.catalog: deduplicate _to_fuzzy_match_key logic (#980)

2 years agoMerge pull request #981 from python-babel/mypy-misc-fix
Aarni Koskela [Wed, 1 Mar 2023 18:04:18 +0000 (20:04 +0200)] 
Merge pull request #981 from python-babel/mypy-misc-fix

Misc. mypy-discovered fixes

2 years agoNote that `Locale.parse()` does not accept `None`
Aarni Koskela [Wed, 1 Mar 2023 06:25:31 +0000 (08:25 +0200)] 
Note that `Locale.parse()` does not accept `None`

Refs #977

2 years agobabel.units: Fix some mypy-discovered issues 981/head
Aarni Koskela [Wed, 1 Mar 2023 07:23:55 +0000 (09:23 +0200)] 
babel.units: Fix some mypy-discovered issues

2 years agobabel.numbers: Fix some mypy-discovered issues
Aarni Koskela [Wed, 1 Mar 2023 07:18:44 +0000 (09:18 +0200)] 
babel.numbers: Fix some mypy-discovered issues

2 years agobabel.core: Fix some mypy-discovered issues
Aarni Koskela [Wed, 1 Mar 2023 07:13:41 +0000 (09:13 +0200)] 
babel.core: Fix some mypy-discovered issues

2 years agobabel.messages.jslexer: Placate mypy
Aarni Koskela [Wed, 1 Mar 2023 07:07:23 +0000 (09:07 +0200)] 
babel.messages.jslexer: Placate mypy

2 years agoAdd meta_zones global key
Aarni Koskela [Wed, 1 Mar 2023 06:35:28 +0000 (08:35 +0200)] 
Add meta_zones global key

2 years agoUse Python 3 syntax in test fixtures
Aarni Koskela [Wed, 1 Mar 2023 06:27:42 +0000 (08:27 +0200)] 
Use Python 3 syntax in test fixtures

2 years agoBecome 2.12.1 v2.12.1
Aarni Koskela [Tue, 28 Feb 2023 13:55:06 +0000 (15:55 +0200)] 
Become 2.12.1

2 years agoUpdate copyright year to 2023
Aarni Koskela [Tue, 28 Feb 2023 13:55:39 +0000 (15:55 +0200)] 
Update copyright year to 2023

2 years agoInclude `py.typed` file in wheels (#975)
Alex Waygood [Tue, 28 Feb 2023 13:49:59 +0000 (13:49 +0000)] 
Include `py.typed` file in wheels (#975)

2 years agoBecome 2.12.0 v2.12.0
Aarni Koskela [Tue, 28 Feb 2023 07:17:25 +0000 (09:17 +0200)] 
Become 2.12.0

2 years agoTox: also test with pytz installed (#974)
Aarni Koskela [Tue, 28 Feb 2023 07:40:35 +0000 (09:40 +0200)] 
Tox: also test with pytz installed (#974)

* Tox: also test with pytz installed
* Tox: return to tox-gh-actions (which now supports Tox 4)

2 years agoRenovate CI tools a bit (#972)
Aarni Koskela [Mon, 20 Feb 2023 15:27:36 +0000 (17:27 +0200)] 
Renovate CI tools a bit (#972)

* Update GitHub Actions versions

* Update pre-commit tools