]> git.ipfire.org Git - thirdparty/babel.git/log
thirdparty/babel.git
2 years agoBecome 2.11.0 v2.11.0
Aarni Koskela [Tue, 1 Nov 2022 10:30:55 +0000 (12:30 +0200)] 
Become 2.11.0

2 years agoQuiesce pytest warnings (#916)
Aarni Koskela [Tue, 1 Nov 2022 10:16:04 +0000 (12:16 +0200)] 
Quiesce pytest warnings (#916)

* Skip doctest of deprecated format_number

* Don't return from test_compatible_classes_in_global_and_localedata

* Renovate conftest (and require pytest 6+)

2 years agoSetup: mark as compatible with Python 3.11
Aarni Koskela [Mon, 31 Oct 2022 09:56:57 +0000 (11:56 +0200)] 
Setup: mark as compatible with Python 3.11

2 years agoCI: test on Python 3.11
Aarni Koskela [Mon, 31 Oct 2022 09:56:30 +0000 (11:56 +0200)] 
CI: test on Python 3.11

2 years agoUse `ast` instead of `eval` for string extraction
Aarni Koskela [Mon, 31 Oct 2022 11:05:00 +0000 (13:05 +0200)] 
Use `ast` instead of `eval` for string extraction

This is safer (as we don't actually execute anything),
and allows us to parse f-strings too.

Closes #769 (supersedes it)
Refs #715 (doesn't add an error yet, but doesn't crash on f-strings)

2 years agoAdapt parse_date to handle ISO dates in ASCII format
Eric L [Sun, 20 Feb 2022 09:35:01 +0000 (10:35 +0100)] 
Adapt parse_date to handle ISO dates in ASCII format

2 years agoAdd support for compact decimal formats (#909)
Jonah Lawrence [Mon, 31 Oct 2022 15:29:23 +0000 (09:29 -0600)] 
Add support for compact decimal formats (#909)

2 years agoRemove determining time zone via systemsetup on macOS
Aarni Koskela [Mon, 31 Oct 2022 10:47:23 +0000 (12:47 +0200)] 
Remove determining time zone via systemsetup on macOS

According to https://truesecdev.wordpress.com/2015/04/09/hidden-backdoor-api-to-root-privileges-in-apple-os-x/comment-page-1/
the `systemsetup` command has required superuser privileges since
macOS 10.8.5 (which has been EOL for over 6 years at the time of writing).
We shouldn't expect to use a codepath that requires a helper tool
that requires su in any regular use; IOW, _if_ a Babel user had ever
reached this path without having been superuser, it would have failed anyway
on any currently supported version of macOS.

Closes #895 (supersedes it).

2 years agoSupport for hex escapes in JavaScript string literals
Przemyslaw Wegrzyn [Thu, 12 May 2022 22:15:48 +0000 (00:15 +0200)] 
Support for hex escapes in JavaScript string literals

2 years agoalign license with OSI template (#912)
Lukas Kahwe Smith [Mon, 31 Oct 2022 10:11:19 +0000 (11:11 +0100)] 
align license with OSI template (#912)

Remove errant "All rights reserved." from license and update to use modern contributor wording.

2 years agoRemove superfluous `__unicode__` declarations
Lukas Juhrich [Fri, 23 Sep 2022 14:49:49 +0000 (16:49 +0200)] 
Remove superfluous `__unicode__` declarations

The `__unicode__` protocol is not used in python3,
and furthermore the `unicode()` builtin does not exist anymore.

2 years agoRemove `__nonzero__` methods (#896)
Nikita Sobolev [Sun, 21 Aug 2022 19:34:02 +0000 (22:34 +0300)] 
Remove `__nonzero__` methods (#896)

2 years agoUpdate Python versions in dev docs
Raphael Nestler [Tue, 9 Aug 2022 13:13:40 +0000 (15:13 +0200)] 
Update Python versions in dev docs

Also remove mentions of Python 2 workarounds, since they aren't applicable anymore.

2 years agoMerge pull request #894 from python-babel/downloader-improvements
Aarni Koskela [Thu, 14 Jul 2022 08:55:37 +0000 (11:55 +0300)] 
Merge pull request #894 from python-babel/downloader-improvements

Small downloader improvements

2 years agoDownloader: use f-strings 894/head
Aarni Koskela [Wed, 13 Jul 2022 11:30:45 +0000 (14:30 +0300)] 
Downloader: use f-strings

2 years agoDownloader: download to temporary file, then replace
Aarni Koskela [Wed, 13 Jul 2022 11:28:25 +0000 (14:28 +0300)] 
Downloader: download to temporary file, then replace

2 years agoDownloader: use shutil.get_terminal_size()
Aarni Koskela [Wed, 13 Jul 2022 11:24:52 +0000 (14:24 +0300)] 
Downloader: use shutil.get_terminal_size()

2 years agoRemove some deprecated ImportError guards
Aarni Koskela [Wed, 13 Jul 2022 11:24:40 +0000 (14:24 +0300)] 
Remove some deprecated ImportError guards

2 years agoMerge branch '2.10-maint'
Aarni Koskela [Thu, 16 Jun 2022 07:12:56 +0000 (10:12 +0300)] 
Merge branch '2.10-maint'

2 years agoMerge pull request #889 from python-babel/become-2.10.3 2.10-maint
Aarni Koskela [Thu, 16 Jun 2022 06:27:57 +0000 (09:27 +0300)] 
Merge pull request #889 from python-babel/become-2.10.3

Become 2.10.3

2 years agoBecome 2.10.3 889/head v2.10.3
Aarni Koskela [Thu, 16 Jun 2022 05:53:51 +0000 (08:53 +0300)] 
Become 2.10.3

2 years agoCI: include maint branches in actions
Aarni Koskela [Thu, 16 Jun 2022 05:56:07 +0000 (08:56 +0300)] 
CI: include maint branches in actions

2 years agoDelete legacy release scripts
Aarni Koskela [Thu, 16 Jun 2022 05:33:00 +0000 (08:33 +0300)] 
Delete legacy release scripts

2 years agosetup.cfg: switch to metadata.license_files
Aarni Koskela [Thu, 16 Jun 2022 05:40:15 +0000 (08:40 +0300)] 
setup.cfg: switch to metadata.license_files

See https://github.com/pypa/setuptools/pull/2620

2 years agoAdd GitHub Actions workflow for building packages
Aarni Koskela [Thu, 16 Jun 2022 05:29:29 +0000 (08:29 +0300)] 
Add GitHub Actions workflow for building packages

2 years agoMerge pull request #888 from python-babel/build-in-ci
Aarni Koskela [Thu, 16 Jun 2022 05:47:39 +0000 (08:47 +0300)] 
Merge pull request #888 from python-babel/build-in-ci

Build packages in CI

2 years agosetup.cfg: switch to metadata.license_files 888/head
Aarni Koskela [Thu, 16 Jun 2022 05:40:15 +0000 (08:40 +0300)] 
setup.cfg: switch to metadata.license_files

See https://github.com/pypa/setuptools/pull/2620

2 years agoDelete legacy release scripts
Aarni Koskela [Thu, 16 Jun 2022 05:33:00 +0000 (08:33 +0300)] 
Delete legacy release scripts

2 years agoAdd GitHub Actions workflow for building packages
Aarni Koskela [Thu, 16 Jun 2022 05:29:29 +0000 (08:29 +0300)] 
Add GitHub Actions workflow for building packages

2 years agoBecome 2.10.2
Aarni Koskela [Tue, 14 Jun 2022 07:03:09 +0000 (10:03 +0300)] 
Become 2.10.2

2 years agoBecome 2.10.2 884/head v2.10.2
Aarni Koskela [Tue, 14 Jun 2022 07:03:09 +0000 (10:03 +0300)] 
Become 2.10.2

3 years agoUse email.Message for pofile header parsing
Aarni Koskela [Tue, 10 May 2022 12:36:47 +0000 (15:36 +0300)] 
Use email.Message for pofile header parsing

cgi.parse_header is due to be deprecated

Fixes #873

3 years agoMerge pull request #875 from akx/asserts
Aarni Koskela [Tue, 10 May 2022 12:59:53 +0000 (14:59 +0200)] 
Merge pull request #875 from akx/asserts

tests: Use bare asserts and pytest.raises

3 years agotests: Use pytest.raises() decorator where applicable 875/head
Aarni Koskela [Tue, 10 May 2022 10:36:00 +0000 (13:36 +0300)] 
tests: Use pytest.raises() decorator where applicable

3 years agotests: Use regular asserts instead of unittest functions
Aarni Koskela [Tue, 10 May 2022 08:52:35 +0000 (11:52 +0300)] 
tests: Use regular asserts instead of unittest functions

Automated conversion initially applied with
https://github.com/warlo/codemod-unittest-to-pytest-asserts,
followed by some manual changes for brevity.

3 years agoMerge pull request #869 from jun66j5/date-period-symbols
Aarni Koskela [Tue, 10 May 2022 11:55:39 +0000 (13:55 +0200)] 
Merge pull request #869 from jun66j5/date-period-symbols

Add support for `b` and `B` period symbols in time format

3 years agoFix up some Python2-isms using pyupgrade
Aarni Koskela [Tue, 10 May 2022 07:51:08 +0000 (10:51 +0300)] 
Fix up some Python2-isms using pyupgrade

3 years agoImprove doctest for `DateTimeFormat.format_period` 869/head
Jun Omae [Tue, 10 May 2022 10:22:55 +0000 (19:22 +0900)] 
Improve doctest for `DateTimeFormat.format_period`

3 years agoUse `... if expr else ...`
Jun Omae [Tue, 10 May 2022 08:01:45 +0000 (17:01 +0900)] 
Use `... if expr else ...`

3 years agoFix get_period_id() with `dayPeriodRule` across 0:00
Jun Omae [Sun, 1 May 2022 07:33:41 +0000 (16:33 +0900)] 
Fix get_period_id() with `dayPeriodRule` across 0:00

3 years agoFallback count="other" format in format_currency()
Jun Omae [Sat, 7 May 2022 15:50:21 +0000 (00:50 +0900)] 
Fallback count="other" format in format_currency()

3 years agoAdd support for `b` and `B` period symbols in time format
Jun Omae [Fri, 29 Apr 2022 01:54:44 +0000 (10:54 +0900)] 
Add support for `b` and `B` period symbols in time format

3 years agochore(docs/typo): Fixes a minor typo in a function comment
Frank Harrison [Mon, 25 Apr 2022 14:24:00 +0000 (15:24 +0100)] 
chore(docs/typo): Fixes a minor typo in a function comment

3 years agoBecome 2.10.1 v2.10.1
Aarni Koskela [Wed, 20 Apr 2022 17:44:47 +0000 (20:44 +0300)] 
Become 2.10.1

3 years agoUpdate changelog and authors
Aarni Koskela [Wed, 20 Apr 2022 17:41:57 +0000 (20:41 +0300)] 
Update changelog and authors

3 years agoMark wheel as no longer universal
Aarni Koskela [Wed, 20 Apr 2022 17:38:10 +0000 (20:38 +0300)] 
Mark wheel as no longer universal

3 years agoFix import statement in messages/frontend.py
Nehal J Wani [Wed, 20 Apr 2022 17:29:17 +0000 (13:29 -0400)] 
Fix import statement in messages/frontend.py

Resolves #858

3 years agoBecome 2.10.0 v2.10.0
Aarni Koskela [Wed, 20 Apr 2022 14:16:07 +0000 (17:16 +0300)] 
Become 2.10.0

3 years agoMerge pull request #856 from akx/prepare-2.10
Aarni Koskela [Wed, 20 Apr 2022 14:13:50 +0000 (17:13 +0300)] 
Merge pull request #856 from akx/prepare-2.10

Prepare for 2.10

3 years agoDistill changelog and AUTHORS 856/head
Aarni Koskela [Fri, 8 Apr 2022 14:47:48 +0000 (17:47 +0300)] 
Distill changelog and AUTHORS

3 years agoAdd maintainer to setup.py
Aarni Koskela [Fri, 8 Apr 2022 13:57:14 +0000 (16:57 +0300)] 
Add maintainer to setup.py

3 years agoSlightly clean up setup.py
Aarni Koskela [Fri, 8 Apr 2022 13:57:02 +0000 (16:57 +0300)] 
Slightly clean up setup.py

3 years agoRemove upload-docs task from Makefile (RTD handles docs)
Aarni Koskela [Fri, 8 Apr 2022 13:53:23 +0000 (16:53 +0300)] 
Remove upload-docs task from Makefile (RTD handles docs)

3 years agoAdd test for issue 798
Aarni Koskela [Wed, 20 Apr 2022 09:19:47 +0000 (12:19 +0300)] 
Add test for issue 798

3 years agoallow header_comment to be passed as an option to extract_message (#720)
Mohamed Morsy [Tue, 12 Apr 2022 05:59:00 +0000 (07:59 +0200)] 
allow header_comment to be passed as an option to extract_message (#720)

Fixes #82

Co-authored-by: Aarni Koskela <akx@iki.fi>
3 years agoMerge pull request #853 from akx/cldr-41
Aarni Koskela [Fri, 8 Apr 2022 15:41:04 +0000 (18:41 +0300)] 
Merge pull request #853 from akx/cldr-41

CLDR 41

3 years agoUpdate tests for CLDR 41 853/head
Aarni Koskela [Fri, 8 Apr 2022 15:01:55 +0000 (18:01 +0300)] 
Update tests for CLDR 41

3 years agoCLDR 41: Do not import non-nominative forms of patterns at this point
Aarni Koskela [Fri, 8 Apr 2022 15:01:46 +0000 (18:01 +0300)] 
CLDR 41: Do not import non-nominative forms of patterns at this point

3 years agoDownload CLDR 41.0
Aarni Koskela [Fri, 8 Apr 2022 14:51:08 +0000 (17:51 +0300)] 
Download CLDR 41.0

3 years agoDeprecate get_next_timezone_transition()
Aarni Koskela [Fri, 8 Apr 2022 13:33:41 +0000 (16:33 +0300)] 
Deprecate get_next_timezone_transition()

In preparation of removing the hard dependency on pytz

Refs #716

3 years agoProvide a way of checking if the catalogs are up-to-date (#831)
Krzysztof Jagiełło [Fri, 8 Apr 2022 13:27:33 +0000 (15:27 +0200)] 
Provide a way of checking if the catalogs are up-to-date (#831)

3 years agoFix output of --list-locales to not be a bytes repr
Morgan Wahl [Sat, 26 Feb 2022 00:08:12 +0000 (19:08 -0500)] 
Fix output of --list-locales to not be a bytes repr

Co-authored-by: Aarni Koskela <akx@iki.fi>
3 years agoMerge pull request #826 from akx/cldr-40
Aarni Koskela [Fri, 8 Apr 2022 13:06:51 +0000 (16:06 +0300)] 
Merge pull request #826 from akx/cldr-40

CLDR 40

3 years agoCI: update OS versions + PyPy baseline to 3.7
Aarni Koskela [Fri, 8 Apr 2022 12:38:39 +0000 (15:38 +0300)] 
CI: update OS versions + PyPy baseline to 3.7

3 years agoMake test_smoke more thorough 826/head
Aarni Koskela [Fri, 28 Jan 2022 11:28:03 +0000 (13:28 +0200)] 
Make test_smoke more thorough

3 years agoShow CLDR download URL
Aarni Koskela [Fri, 28 Jan 2022 09:22:24 +0000 (11:22 +0200)] 
Show CLDR download URL

Fixes #811

3 years agoplural: parse new c, e operands (otherwise unsupported though)
Aarni Koskela [Tue, 25 Jan 2022 11:53:08 +0000 (13:53 +0200)] 
plural: parse new c, e operands (otherwise unsupported though)

3 years agoAdjust tests for CLDR 40 data
Aarni Koskela [Tue, 25 Jan 2022 11:36:52 +0000 (13:36 +0200)] 
Adjust tests for CLDR 40 data

3 years agoDownload CLDR 40.0
Aarni Koskela [Tue, 10 Nov 2020 10:23:43 +0000 (12:23 +0200)] 
Download CLDR 40.0

3 years agoPlural-Forms: Fix missing trailing semicolon
farhan5900 [Mon, 28 Mar 2022 05:32:39 +0000 (11:02 +0530)] 
Plural-Forms: Fix missing trailing semicolon

Adds missing semicolon in the code that generates the header that
is Catalog.plural_forms as well as in plural.to_gettext function.
Also modifies all the concerning test cases as well as test data files.

Closes https://github.com/python-babel/babel/issues/836

3 years agoMerge pull request #835 from akx/gettext-deprecations
Aarni Koskela [Fri, 8 Apr 2022 10:33:34 +0000 (13:33 +0300)] 
Merge pull request #835 from akx/gettext-deprecations

Gettext deprecation fixes (for Python 3.11 compatibility)

3 years agoPrefer setuptools imports to distutils imports
Aarni Koskela [Wed, 23 Feb 2022 18:52:35 +0000 (20:52 +0200)] 
Prefer setuptools imports to distutils imports

The non-conditional imports have been around for 6 to 17 years,
so they should be safe in conservative situations too.

Refs #824

3 years agoFix duplicate locations when writing without lineno
Sigurd Ljødal [Mon, 31 Jan 2022 16:47:21 +0000 (17:47 +0100)] 
Fix duplicate locations when writing without lineno

If the same translation appears multiple times in the same file,
duplicate locations would be written to the .po file when using
write_po(..., include_lineno=False).

3 years agoadd GitHub URL for PyPi
Andrii Oriekhov [Mon, 28 Feb 2022 15:52:43 +0000 (17:52 +0200)] 
add GitHub URL for PyPi

3 years agoAdd pytest warning filter for format_decimal deprecation
Aarni Koskela [Fri, 4 Feb 2022 10:29:45 +0000 (12:29 +0200)] 
Add pytest warning filter for format_decimal deprecation

3 years agoDon't use the deprecated format_number function internally or in tests
Aarni Koskela [Fri, 4 Feb 2022 10:29:35 +0000 (12:29 +0200)] 
Don't use the deprecated format_number function internally or in tests

3 years agoDon't assume `_output_charset` is a thing (it's not on Python 3.11) 835/head
Aarni Koskela [Fri, 28 Jan 2022 15:44:42 +0000 (17:44 +0200)] 
Don't assume `_output_charset` is a thing (it's not on Python 3.11)

Fixes #819

3 years agoAdd deprecations to l*gettext variants
Aarni Koskela [Fri, 28 Jan 2022 15:44:22 +0000 (17:44 +0200)] 
Add deprecations to l*gettext variants

3 years agoParse string date times indepentent of time zone
rachele-collin [Wed, 1 Apr 2020 16:05:11 +0000 (18:05 +0200)] 
Parse string date times indepentent of time zone

Parsing a date time string (such as for ``POT-Creation-Date`` or
``PO-Revision-Date``) as UTC time, in particular independent of the
local time zone.

Closes: #700
3 years agofix maltese plurals
Lukas Winkler [Mon, 28 Jun 2021 19:35:26 +0000 (21:35 +0200)] 
fix maltese plurals

3 years agoMerge pull request #834 from akx/improve-date-parse
Aarni Koskela [Fri, 28 Jan 2022 11:50:49 +0000 (13:50 +0200)] 
Merge pull request #834 from akx/improve-date-parse

Improve date/time parsing

3 years agoMerge pull request #832 from akx/extract-ignore-dirs
Aarni Koskela [Fri, 28 Jan 2022 11:50:04 +0000 (13:50 +0200)] 
Merge pull request #832 from akx/extract-ignore-dirs

Implement directory filter for extract

3 years agoAdd format argument to parse_* 834/head
Juliette Monsel [Sat, 20 Jul 2019 17:19:12 +0000 (19:19 +0200)] 
Add format argument to parse_*

``parse_date()`` does not allow the user to specify the date's format
and the 'medium' format is used by default in the call to
``get_date_format()`` on line 1144.

This results in a failure to parse the date in short format for the
locale 'sv_SE'. This commit adds the format argument to avoid this
failure. The default value is set to 'medium' to preserve the old behavior.

Fixes #657

Co-authored-by: Aarni Koskela <akx@iki.fi>
3 years agoAdd and emit dates.ParseError
Aarni Koskela [Thu, 27 Jan 2022 15:37:52 +0000 (17:37 +0200)] 
Add and emit dates.ParseError

3 years agoImprove partial time parsing
Aarni Koskela [Thu, 27 Jan 2022 15:09:39 +0000 (17:09 +0200)] 
Improve partial time parsing

Refs #442

Co-authored-by: David Bauer <david.bauer009@gmail.com>
Co-authored-by: Arthur Jovart <arthur@jovart.com>
3 years agoAdd frontend for extract directory filter 832/head
Aarni Koskela [Thu, 27 Jan 2022 14:20:34 +0000 (16:20 +0200)] 
Add frontend for extract directory filter

Co-authored-by: Kinshuk Dua <kinshukduaexam@gmail.com>
3 years agoextract_from_dir: make directory filter customizable
Aarni Koskela [Thu, 27 Jan 2022 13:53:26 +0000 (15:53 +0200)] 
extract_from_dir: make directory filter customizable

3 years agoMerge pull request #833 from python-babel/codecov
Aarni Koskela [Thu, 27 Jan 2022 16:56:47 +0000 (18:56 +0200)] 
Merge pull request #833 from python-babel/codecov

Fix Codecov

3 years agoCI: add caching for CLDR files 833/head
Aarni Koskela [Thu, 27 Jan 2022 16:47:23 +0000 (18:47 +0200)] 
CI: add caching for CLDR files

3 years agoCI: fix Tox/multi-environment Codecov uploads
Aarni Koskela [Thu, 27 Jan 2022 16:32:32 +0000 (18:32 +0200)] 
CI: fix Tox/multi-environment Codecov uploads

3 years agoTox/Makefile: replace test-cov with just test + envvar
Aarni Koskela [Thu, 27 Jan 2022 16:31:54 +0000 (18:31 +0200)] 
Tox/Makefile: replace test-cov with just test + envvar

3 years agoMakefile: remove quietness from all commands + PYTHONWARNINGS overrides from tests
Aarni Koskela [Thu, 27 Jan 2022 16:30:04 +0000 (18:30 +0200)] 
Makefile: remove quietness from all commands + PYTHONWARNINGS overrides from tests

3 years agoparse_locale(): upper-case variant tag to match file system
Aarni Koskela [Tue, 25 Jan 2022 13:14:22 +0000 (15:14 +0200)] 
parse_locale(): upper-case variant tag to match file system

   At all times, language tags and their subtags, including private use
   and extensions, are to be treated as case insensitive: there exist
   conventions for the capitalization of some of the subtags, but these
   MUST NOT be taken to carry meaning.

Fixes #814

3 years agoMerge pull request #830 from python-babel/docs-fixes
Aarni Koskela [Tue, 25 Jan 2022 15:21:54 +0000 (17:21 +0200)] 
Merge pull request #830 from python-babel/docs-fixes

Documentation fixes

3 years agoFix Sphinx manpage configuration 830/head
Aarni Koskela [Tue, 25 Jan 2022 15:06:10 +0000 (17:06 +0200)] 
Fix Sphinx manpage configuration

Fixes #775

3 years agoRefresh cmdline documentation
Aarni Koskela [Tue, 25 Jan 2022 14:54:47 +0000 (16:54 +0200)] 
Refresh cmdline documentation

Would have used https://sphinxcontrib-autoprogram.readthedocs.io/en/stable/ if we used argparse...

Fixes #771

3 years agoImprove number formatting example
Aarni Koskela [Tue, 25 Jan 2022 13:50:12 +0000 (15:50 +0200)] 
Improve number formatting example

Fixes #575

3 years agoFix Sphinx indentation complaint
Aarni Koskela [Tue, 25 Jan 2022 13:40:46 +0000 (15:40 +0200)] 
Fix Sphinx indentation complaint

Refs #801

3 years agoChangelog: rename to .rst, use :gh: for GitHub links
Aarni Koskela [Tue, 25 Jan 2022 13:40:30 +0000 (15:40 +0200)] 
Changelog: rename to .rst, use :gh: for GitHub links

Refs #801

3 years agoSet up .readthedocs.yml to build using Sphinx 4
Aarni Koskela [Tue, 25 Jan 2022 13:35:30 +0000 (15:35 +0200)] 
Set up .readthedocs.yml to build using Sphinx 4