python-babel
babel
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
Clamp rounded fractional seconds to the field width DateTimeFormat rounds the fraction to the requested number of digits, so a microsecond value close enough to a whole second rounds up to a value one digit too wide: time(1, 2, 3, 990000) formatted as 'S' gave '10' rather than '9', and 999999 as 'SSSS' gave '10000'. Clamp the rounded value to the largest the field can hold. Rebased onto current master, where the DateTimeFormat tests were moved out of tests/test_dates.py into tests/test_date_time_format.py and flattened from methods into module-level functions; the regression test follows them. Signed-off-by: Vineeth Sai <vineethsai4444@gmail.com>
vineethsaivs:fix/frac-seconds-field-overflow
11 days ago
Handle an invalid plural index in msgstr[...] instead of raising ValueError read_po parsed the plural index of a `msgstr[N]` line with `int(idxarg[:-1])`, which leaked a bare `ValueError: invalid literal for int()` to the caller when N was not an integer (e.g. `msgstr[\x0c]`). Route a non-integer index through the parser's existing `_invalid_pofile` handling, so it raises a `PoFileError` when `abort_invalid=True` and otherwise warns and skips the line, consistent with other malformed input. Fixes #1209
vineethsaivs:fix/pofile-invalid-msgstr-index
11 days ago
Remove License trove classifier Having `license="BSD-3-Clause"` (added in #994) is enough. Fixes #1331
remove-extra-license-field
12 days ago
Merge pull request #1322: Unfold class-based test cases
master
21 days ago
Unfold test_dates test cases They had actually never been run since 14216ed8 (January 2023), since they stopped inheriting from `unittest.TestCase` there...
split-core-test
21 days ago
Unfold test_dates test cases They had actually never been run since 14216ed8 (January 2023), since they stopped inheriting from `unittest.TestCase` there...
split-core-test
21 days ago
Merge pull request #1320: Improve test formatting
master
21 days ago
Fix parametrize argument types (Ruff PT006, PT007)
tests-pre-ruff
21 days ago
Latest Branches
CodSpeed Performance Gauge
0%
Clamp rounded fractional seconds to the field width
#1292
11 days ago
dbd44a5
vineethsaivs:fix/frac-seconds-field-overflow
CodSpeed Performance Gauge
0%
Handle invalid plural index in msgstr[...] instead of raising ValueError (#1209)
#1279
11 days ago
ccfa1d9
vineethsaivs:fix/pofile-invalid-msgstr-index
CodSpeed Performance Gauge
0%
Remove License trove classifier
#1332
12 days ago
c5ebd9f
remove-extra-license-field
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs
×
Advertisement