Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Replace babel.localedata.locale_identifiers cache with LRU cache | Aarni Koskela | 2023-02-07 | 2 | -21/+15 |
| | |||||
* | Replace babel.dates._pattern_cache with an LRU cache | Aarni Koskela | 2023-02-07 | 1 | -8/+6 |
| | | | | Fixes #962 | ||||
* | Merge pull request #966 from DenverCoderOne/number-type-improvements | Aarni Koskela | 2023-02-07 | 2 | -44/+36 |
|\ | | | | | Numbers and core type fixes | ||||
| * | Type fixes from 961 | Jonah Lawrence | 2023-02-03 | 1 | -2/+2 |
| | | |||||
| * | Numbers and core type fixes | Jonah Lawrence | 2023-02-03 | 2 | -42/+34 |
|/ | |||||
* | Add two new options in cmdline.rst docs (#963) | Maciej Olko | 2023-02-03 | 1 | -0/+6 |
| | | | Added in #720 and #832. | ||||
* | Keep @modifiers when parsing locales (#947) | martin f. krafft | 2023-01-26 | 2 | -33/+88 |
| | | | | | | | | | | | | | | | | | Locale modifiers ("@variants") are described in the GNU gettext documentation like this: > The ‘@variant’ can denote any kind of characteristics that is not > already implied by the language ll and the country CC. […] It can also > denote a dialect of the language, … Wherein Babel previously would discard these, this patch stores the modifier information in the `Locale` objects, handling string representation accordingly. Resolves: #946 Signed-off-by: martin f. krafft <madduck@madduck.net> Co-authored-by: Aarni Koskela <akx@iki.fi> | ||||
* | Modernize some string formatting | Aarni Koskela | 2023-01-25 | 2 | -11/+7 |
| | |||||
* | Apply some simplification fixes courtesy of Ruff | Aarni Koskela | 2023-01-25 | 10 | -80/+36 |
| | |||||
* | Finally remove get_next_timezone_transition (#958) | Aarni Koskela | 2023-01-25 | 3 | -140/+1 |
| | |||||
* | Fix unbound `exc` in babel.dates (#959) | Aarni Koskela | 2023-01-25 | 1 | -5/+4 |
| | | | See https://stackoverflow.com/a/24271786/51685 | ||||
* | Use standard library UTC (#957) | Aarni Koskela | 2023-01-25 | 1 | -5/+1 |
| | |||||
* | Clean up babel.localtime (#952) | Aarni Koskela | 2023-01-25 | 3 | -40/+57 |
| | | | | * Remove vestigial babel.localtime cache bits * Give _FallbackLocalTimezone its own module | ||||
* | Support for formatting NaN, Infinity (#955) | Jonah Lawrence | 2023-01-25 | 2 | -2/+32 |
| | |||||
* | Remove redundant tests for babel.support (#954) | Aarni Koskela | 2023-01-20 | 2 | -38/+9 |
| | | | The doctests test the exact same things. | ||||
* | Update test dependencies (tox v4) (#953) | Jonah Lawrence | 2023-01-20 | 2 | -10/+10 |
| | |||||
* | Merge pull request #951 from python-babel/cldr-42 | Aarni Koskela | 2023-01-20 | 11 | -42/+54 |
|\ | | | | | Upgrade to CLDR 42 | ||||
| * | Adjust tests for CLDR 42 | Aarni Koskela | 2023-01-20 | 9 | -38/+42 |
| | | | | | | | | | | | | | | The space changes around English seem to be on purpose, see: * https://unicode-org.atlassian.net/browse/CLDR-14032 * https://github.com/unicode-org/cldr/commit/a83026ab8c8fa6ed88f1047c4d0c6089f88b7e5d | ||||
| * | Add test for #942 | Aarni Koskela | 2023-01-20 | 1 | -0/+4 |
| | | |||||
| * | Import CLDR 42 | Aarni Koskela | 2023-01-20 | 2 | -4/+8 |
|/ | |||||
* | Merge pull request #949 from python-babel/ruffify | Aarni Koskela | 2023-01-19 | 47 | -709/+785 |
|\ | | | | | Add ruff for linting | ||||
| * | Enable E741 (ambiguous variable name) lint | Aarni Koskela | 2023-01-18 | 5 | -43/+43 |
| | | |||||
| * | Apply some small miscellaneous formatting fixes | Aarni Koskela | 2023-01-18 | 20 | -55/+63 |
| | | |||||
| * | Apply ruff UP (Pyupgrade) fixes | Aarni Koskela | 2023-01-18 | 3 | -3/+2 |
| | | |||||
| * | Apply ruff UP025 (unicode literal prefix) fix | Aarni Koskela | 2023-01-18 | 22 | -466/+468 |
| | | |||||
| * | Apply ruff SIM300 (de-yoda) fixes | Aarni Koskela | 2023-01-18 | 2 | -5/+5 |
| | | |||||
| * | Apply ruff I category fixes | Aarni Koskela | 2023-01-18 | 37 | -80/+119 |
| | | |||||
| * | Apply ruff F category fixes | Aarni Koskela | 2023-01-18 | 5 | -7/+8 |
| | | |||||
| * | Apply ruff E category fixes | Aarni Koskela | 2023-01-18 | 6 | -14/+20 |
| | | |||||
| * | Apply ruff C category fixes | Aarni Koskela | 2023-01-18 | 3 | -16/+11 |
| | | |||||
| * | Apply ruff B category fixes | Aarni Koskela | 2023-01-18 | 10 | -21/+26 |
| | | |||||
| * | Add baseline ruff configuration | Aarni Koskela | 2023-01-18 | 2 | -0/+18 |
| | | |||||
| * | Ensure `path` is correctly bound for extract callback (flake8 B023) | Aarni Koskela | 2023-01-18 | 1 | -19/+22 |
|/ | |||||
* | Renovate formatting in test_checkers and test_frontend (#950) | Aarni Koskela | 2023-01-18 | 2 | -204/+147 |
| | |||||
* | Minor cleanups (#948) | Aarni Koskela | 2023-01-18 | 16 | -53/+73 |
| | | | | | * Add __all__s to be cleaner about re-exports * Move timezone_getter to conftest * Apply spelling corrections suggested by codespell | ||||
* | Unify datetime imports (#945) | Aarni Koskela | 2023-01-18 | 9 | -150/+223 |
| | | | Co-authored-by: Jonah Lawrence <jonah@freshidea.com> | ||||
* | Implement zoneinfo support and make pytz optional (#940) | DS/Charlie | 2023-01-11 | 15 | -211/+340 |
| | |||||
* | Add type annotations (#934) | Jonah Lawrence | 2023-01-11 | 22 | -504/+958 |
| | | | | | | | Refs e.g. https://github.com/python/typeshed/pull/9455 Co-authored-by: Spencer Brown <spencerb21@live.com> Co-authored-by: Aarni Koskela <akx@iki.fi> | ||||
* | Enable pre-commit (#943) | Aarni Koskela | 2023-01-11 | 5 | -20/+26 |
| | | | | | | | * Update pre-commit config syntax * CI: run pre-commit * CI: set up pip caching | ||||
* | fix typo (#941) | lilinjie | 2023-01-09 | 1 | -1/+1 |
| | | | Signed-off-by: lilinjie <lilinjie@uniontech.com> | ||||
* | Fix compact singular formats and patterns with no numbers (#932) | Jonah Lawrence | 2023-01-06 | 2 | -7/+19 |
| | |||||
* | Improved javascript template string expression extracting (#939) | Johannes Wilm | 2023-01-06 | 3 | -8/+94 |
| | | | | Co-authored-by: Rik <gitaarik@posteo.net> Co-authored-by: Aarni Koskela <akx@iki.fi> | ||||
* | ci: Fix testing dependencies (#936) | Jonah Lawrence | 2022-12-27 | 1 | -1/+1 |
| | |||||
* | Replace %/.format/concatenation with f-strings where feasible (#927) | Aarni Koskela | 2022-11-23 | 24 | -204/+161 |
| | | | Original conversion suggestions via flynt, edited by hand. | ||||
* | Cast number to Decimal in _get_compact_format (#930) | Jonah Lawrence | 2022-11-23 | 1 | -2/+4 |
| | | | | * fix rounding modes by using Decimal instead of float | ||||
* | Drop support for EOL Python 3.6 (#919) | Aarni Koskela | 2022-11-23 | 4 | -6/+4 |
| | |||||
* | feat: Support for short compact currency formats (#926) | Jonah Lawrence | 2022-11-04 | 7 | -12/+119 |
| | | | | Co-authored-by: Jun Omae (大前 潤) <42682+jun66j5@users.noreply.github.com> | ||||
* | Remove vestigial Python 2 `long` check (#925) | Aarni Koskela | 2022-11-02 | 1 | -8/+1 |
| | |||||
* | feat: Add `Format.compact_decimal` utility (#921) | Jonah Lawrence | 2022-11-02 | 2 | -1/+17 |
| | |||||
* | Update docs build configuration (#924) | Aarni Koskela | 2022-11-02 | 3 | -7/+14 |
| | | | | | | | | * Use Python 3.11 * Use Sphinx 5 (and update extlinks configuration) * Use Python 3 intersphinx mapping * Install Babel from the build directory Refs https://github.com/python-babel/babel/issues/920 |