]> git.ipfire.org Git - thirdparty/babel.git/log
thirdparty/babel.git
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

3 years agoImprove documentation for TimezoneTransition
Aarni Koskela [Tue, 25 Jan 2022 13:30:30 +0000 (15:30 +0200)] 
Improve documentation for TimezoneTransition

Fixes #823

3 years agoDate intervals: allow using `other` as fallback form
Aarni Koskela [Tue, 25 Jan 2022 12:07:50 +0000 (14:07 +0200)] 
Date intervals: allow using `other` as fallback form

Fixes #825

3 years agoMerge pull request #828 from python-babel/fix-ci-2022
Aarni Koskela [Tue, 25 Jan 2022 12:35:17 +0000 (14:35 +0200)] 
Merge pull request #828 from python-babel/fix-ci-2022

Fix CI, bump year to 2022

3 years agoUpdate copyright year to 2022 828/head
Aarni Koskela [Tue, 25 Jan 2022 12:27:29 +0000 (14:27 +0200)] 
Update copyright year to 2022

3 years agoCI: remove exclusion for Windows Pypy3
Aarni Koskela [Tue, 25 Jan 2022 12:26:23 +0000 (14:26 +0200)] 
CI: remove exclusion for Windows Pypy3

3 years agoCI: test on released Python 3.10
Aarni Koskela [Tue, 25 Jan 2022 12:26:09 +0000 (14:26 +0200)] 
CI: test on released Python 3.10

3 years agoHack around empty `err` in test_extract_error_code test
Aarni Koskela [Tue, 25 Jan 2022 12:23:31 +0000 (14:23 +0200)] 
Hack around empty `err` in test_extract_error_code test

3 years agoRemove unused tool configuration
Aarni Koskela [Tue, 10 Nov 2020 14:09:42 +0000 (16:09 +0200)] 
Remove unused tool configuration

3 years agoAdd Github issue template
Álvaro Mondéjar Rubio [Fri, 20 Aug 2021 08:12:15 +0000 (10:12 +0200)] 
Add Github issue template

3 years agoDrop the dot https://twitter.com/pytestdotorg/status/753767547866972160
Hugo van Kemenade [Sun, 12 Sep 2021 15:28:29 +0000 (18:28 +0300)] 
Drop the dot https://twitter.com/pytestdotorg/status/753767547866972160

3 years agoAdd support for Python 3.10
Hugo van Kemenade [Sun, 12 Sep 2021 15:11:50 +0000 (18:11 +0300)] 
Add support for Python 3.10

3 years agoRemove redundant _compat.py
Hugo van Kemenade [Sun, 12 Sep 2021 14:40:41 +0000 (17:40 +0300)] 
Remove redundant _compat.py

4 years agoImplement `--init-missing` option for `pybabel update` (#785)
ruro [Tue, 15 Jun 2021 10:56:16 +0000 (13:56 +0300)] 
Implement `--init-missing` option for `pybabel update` (#785)

* implement update --init-missing option

* trivial test that the --init-missing option exists

* add non-trivial update --init-missing test

4 years agoBecome 2.9.1
Aarni Koskela [Wed, 28 Apr 2021 19:04:48 +0000 (22:04 +0300)] 
Become 2.9.1

* Update copyright year
* Update changelog

4 years agoMerge pull request #782 from python-babel/locale-basename
Aarni Koskela [Wed, 28 Apr 2021 14:29:55 +0000 (17:29 +0300)] 
Merge pull request #782 from python-babel/locale-basename

Clean locale identifiers before loading from file

4 years agoDisallow special filenames on Windows 782/head
Aarni Koskela [Wed, 28 Apr 2021 08:47:42 +0000 (11:47 +0300)] 
Disallow special filenames on Windows

4 years agoRun locale identifiers through `os.path.basename()`
Aarni Koskela [Wed, 28 Apr 2021 07:33:40 +0000 (10:33 +0300)] 
Run locale identifiers through `os.path.basename()`

4 years agoMerge pull request #754 from python-babel/github-ci
Aarni Koskela [Fri, 4 Dec 2020 07:09:58 +0000 (09:09 +0200)] 
Merge pull request #754 from python-babel/github-ci

CI: Switch to GitHub Actions

4 years agoReplace Travis + Appveyor with GitHub Actions (WIP) 754/head
Aarni Koskela [Tue, 10 Nov 2020 14:19:04 +0000 (16:19 +0200)] 
Replace Travis + Appveyor with GitHub Actions (WIP)

4 years agoimport_cldr: use logging; add -q option
Aarni Koskela [Wed, 11 Nov 2020 13:59:41 +0000 (15:59 +0200)] 
import_cldr: use logging; add -q option

4 years agoQuiesce CLDR download progress bar if requested (or not a TTY)
Aarni Koskela [Wed, 11 Nov 2020 13:24:16 +0000 (15:24 +0200)] 
Quiesce CLDR download progress bar if requested (or not a TTY)

4 years agoMake the import warnings about unsupported number systems less verbose
Aarni Koskela [Tue, 10 Nov 2020 12:54:31 +0000 (14:54 +0200)] 
Make the import warnings about unsupported number systems less verbose

4 years agoUse Freezegun in test_format_current_moment
Aarni Koskela [Wed, 11 Nov 2020 12:11:38 +0000 (14:11 +0200)] 
Use Freezegun in test_format_current_moment

The earlier patch resulted in `unsupported operand type(s) for -: 'datetime' and 'datetime'` on Pypy3.

4 years agoBump version to 2.9.0 v2.9.0
Aarni Koskela [Wed, 11 Nov 2020 12:43:28 +0000 (14:43 +0200)] 
Bump version to 2.9.0

4 years agoTravis: Test on Python 3.9
Aarni Koskela [Wed, 11 Nov 2020 12:42:51 +0000 (14:42 +0200)] 
Travis: Test on Python 3.9

4 years agoFix deprecated .getchildren() call
Aarni Koskela [Wed, 11 Nov 2020 13:14:52 +0000 (15:14 +0200)] 
Fix deprecated .getchildren() call

Augments 167b71421f113e2210e4deefef5020402492e5be

4 years agoDistill changelog
Aarni Koskela [Wed, 11 Nov 2020 12:42:18 +0000 (14:42 +0200)] 
Distill changelog

4 years agoMerge branch '2.8-maintenance' into master
Aarni Koskela [Wed, 11 Nov 2020 11:58:54 +0000 (13:58 +0200)] 
Merge branch '2.8-maintenance' into master

4 years agoBump version to 2.8.1 2.8-maintenance v2.8.1
Aarni Koskela [Wed, 11 Nov 2020 09:28:06 +0000 (11:28 +0200)] 
Bump version to 2.8.1

4 years agoBump copyright year from 2019 to 2020
Aarni Koskela [Wed, 11 Nov 2020 09:27:58 +0000 (11:27 +0200)] 
Bump copyright year from 2019 to 2020

4 years agoDistill changelog
Aarni Koskela [Wed, 11 Nov 2020 09:27:00 +0000 (11:27 +0200)] 
Distill changelog

4 years agoPy.test 6 support (#752)
Aarni Koskela [Wed, 11 Nov 2020 08:35:35 +0000 (10:35 +0200)] 
Py.test 6 support (#752)

* Support Py.test 6+

* Run CI on Py.test 6 on new Pythons

Cherry-pick of commit 6e29f11

4 years agoPy.test 6 support (#752)
Aarni Koskela [Wed, 11 Nov 2020 08:35:35 +0000 (10:35 +0200)] 
Py.test 6 support (#752)

* Support Py.test 6+

* Run CI on Py.test 6 on new Pythons

4 years agoMerge pull request #734 from akx/cldr-37
Aarni Koskela [Tue, 10 Nov 2020 10:17:10 +0000 (12:17 +0200)] 
Merge pull request #734 from akx/cldr-37

CLDR 37 support

4 years agoHandle ZoneInfo objects in get_timezone_location, get_timezone_name (#741)
Alessio Bogon [Tue, 10 Nov 2020 09:34:57 +0000 (10:34 +0100)] 
Handle ZoneInfo objects in get_timezone_location, get_timezone_name (#741)

Fixes #740

4 years agoRemove deprecated 'sudo: false' from Travis configuraiton
Jon Dufresne [Sun, 1 Nov 2020 20:37:36 +0000 (12:37 -0800)] 
Remove deprecated 'sudo: false' from Travis configuraiton

https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration

4 years agoUse 'if not' instead of 'if ... is False' for no_fuzzy_matching
Aarni Koskela [Fri, 2 Oct 2020 09:35:56 +0000 (12:35 +0300)] 
Use 'if not' instead of 'if ... is False' for no_fuzzy_matching

Matches the behavior elsewhere in the same function

Fixes #698

4 years agoIgnore lack of coverage on lines that e.g. raise warnings 734/head
Aarni Koskela [Fri, 2 Oct 2020 09:29:48 +0000 (12:29 +0300)] 
Ignore lack of coverage on lines that e.g. raise warnings

4 years agoSkip deprecated l*gettext functions on Python 3.8+
Aarni Koskela [Fri, 2 Oct 2020 07:56:59 +0000 (10:56 +0300)] 
Skip deprecated l*gettext functions on Python 3.8+

4 years agoCorrect default timedelta format to 'long'
Aarni Koskela [Fri, 2 Oct 2020 07:56:37 +0000 (10:56 +0300)] 
Correct default timedelta format to 'long'

Augments 9327e0824a1bbed538e73d42b971988f8214b490

4 years agoAdapt things to new compound pattern format
Aarni Koskela [Thu, 1 Oct 2020 13:27:02 +0000 (16:27 +0300)] 
Adapt things to new compound pattern format

4 years agoSwitch downloader to CLDR 37
Aarni Koskela [Thu, 1 Oct 2020 12:54:08 +0000 (15:54 +0300)] 
Switch downloader to CLDR 37

4 years agoLazyProxy: Handle AttributeError in specified func (#724)
Nikiforov Konstantin [Wed, 30 Sep 2020 15:17:16 +0000 (20:17 +0500)] 
LazyProxy: Handle AttributeError in specified func (#724)

Fixes #723

Co-authored-by: Aarni Koskela <akx@iki.fi>
4 years agoAdded group_separator feature in number formatting (#726)
Abdullah Javed Nesar [Tue, 22 Sep 2020 12:14:27 +0000 (17:44 +0530)] 
Added group_separator feature in number formatting (#726)

5 years agodocs/numbers.rst : update parse_number comments (#708)
Brad Martin [Sun, 10 May 2020 18:02:16 +0000 (12:02 -0600)] 
docs/numbers.rst : update parse_number comments (#708)

* docs/numbers.rst : test format of revised comments

* docs/numbers.rst : test final doc changes

* docs/numbers.rst : refine format/language

* docs/numbers.rst : refine language/format

* docs/numbers.rst : refine language/format

* docs/numbers.rst : experiment with spacing

5 years agosimplify iteration code in "import_cldr.py"
Felix Schwarz [Tue, 5 May 2020 21:32:52 +0000 (21:32 +0000)] 
simplify iteration code in "import_cldr.py"

As Miro Hrončok pointed out we don't need ".iter()" in the script.

5 years agofix tests when using Python 3.9a6
Felix Schwarz [Tue, 5 May 2020 08:05:56 +0000 (08:05 +0000)] 
fix tests when using Python 3.9a6

In Python 3.9a6 integer values for future flags were changed to prevent
collision with compiler flags. We need to retrieve these at runtime so
the test suite works with Python <= 3.8 as well as Python 3.9.

5 years agostop using deprecated ElementTree methods "getchildren()" and "getiterator()"
Felix Schwarz [Tue, 5 May 2020 07:58:01 +0000 (09:58 +0200)] 
stop using deprecated ElementTree methods "getchildren()" and "getiterator()"

Both methods were removed in Python 3.9 as mentioned in the release notes:

> Methods getchildren() and getiterator() of classes ElementTree and Element in
> the ElementTree module have been removed. They were deprecated in Python 3.2.
> Use iter(x) or list(x) instead of x.getchildren() and x.iter() or
> list(x.iter()) instead of x.getiterator().

5 years agoUpdate license.rst
Tyler Kennedy [Tue, 25 Feb 2020 22:05:43 +0000 (17:05 -0500)] 
Update license.rst

The documentation refers to the license as the license for _flask_ instead of Babel.

5 years agocatalog.rst: Add __iter__ to Catalog documentation
CyanNani123 [Mon, 13 Jan 2020 22:13:01 +0000 (23:13 +0100)] 
catalog.rst: Add __iter__ to Catalog documentation

The declaration of __iter__ under the special-members
directive makes it visible in the documentation.
The docstring describing __iter__ already exists.

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

5 years agoMerge pull request #691 from nh2/testsuite-fix-unicode-error-printing
Aarni Koskela [Tue, 28 Jan 2020 06:42:24 +0000 (08:42 +0200)] 
Merge pull request #691 from nh2/testsuite-fix-unicode-error-printing

Fix unicode printing error on Python 2 without TTY.

5 years agoFix unicode printing error on Python 2 without TTY. 691/head
Niklas Hambüchen [Mon, 27 Jan 2020 23:37:22 +0000 (00:37 +0100)] 
Fix unicode printing error on Python 2 without TTY.

Until now, on Python 2.7, `python setup.py test | cat` crashed in the test
runner with

    ======================================================================
    ERROR: test_abort_invalid_po_file (tests.messages.test_pofile.ReadPoTestCase)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "src/babel/tests/messages/test_pofile.py", line 458, in test_abort_invalid_po_file
        output = pofile.read_po(buf, locale='fr', abort_invalid=False)
      File "src/babel/babel/messages/pofile.py", line 377, in read_po
        parser.parse(fileobj)
      File "src/babel/babel/messages/pofile.py", line 310, in parse
        self._process_message_line(lineno, line)
      File "src/babel/babel/messages/pofile.py", line 210, in _process_message_line
        self._process_keyword_line(lineno, line, obsolete)
      File "src/babel/babel/messages/pofile.py", line 222, in _process_keyword_line
        self._invalid_pofile(line, lineno, "Start of line didn't match any expected keyword.")
      File "src/babel/babel/messages/pofile.py", line 325, in _invalid_pofile
        print(u"WARNING: Problem on line {0}: {1}".format(lineno + 1, line))
    UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 84: ordinal not in range(128)

The test suite would show this when printing the `à` in the test pofile contents

    Pour toute question, veuillez communiquer avec Fulano  à nadie@blah.com

But this bug is not confined to the test suite only. Any call to `read_po()`
with invalid .po file could trigger it in non-test code when
`sys.stdout.encoding` is `None`, which is the default for Python 2 when
`sys.stdout.isatty()` is false (as induced e.g. by `| cat`).

The fix is to `repr()` the line when printing the WARNING.

5 years agoIntroduce invariant that _invalid_pofile() takes unicode line.
Niklas Hambüchen [Tue, 28 Jan 2020 01:46:25 +0000 (02:46 +0100)] 
Introduce invariant that _invalid_pofile() takes unicode line.

This makes debugging and reasoning about the code easier;
otherwise it is surprising that sometimes `line` is a unicode
and sometimes not.

So far, when it was not, it could either be only `""` or
`'Algo esta mal'`; thus this commit makes those two u"" strings.
In all other cases, it was guaranteed that it's unicode,
because all code paths leading to `_invalid_pofile()` went through

    if not isinstance(line, text_type):
        line = line.decode(self.catalog.charset)

before.

5 years agoReplace usage of parser.suite with ast.parse
Miro Hrončok [Sun, 5 Jan 2020 23:37:39 +0000 (00:37 +0100)] 
Replace usage of parser.suite with ast.parse

Replaced usage of the long-superseded "parser.suite" module in the
mako.util package for parsing the python magic encoding comment with the
"ast.parse" function introduced many years ago in Python 2.5, as
"parser.suite" is emitting deprecation warnings in Python 3.9.

Fixes https://github.com/sqlalchemy/mako/issues/310
See also https://github.com/sqlalchemy/mako/commit/2dae7d2c3da73653e6de329dc15c55056a0b9ab6

5 years agoMerge pull request #683 from python-babel/become-2.8.0 v2.8.0
Aarni Koskela [Tue, 31 Dec 2019 12:31:24 +0000 (14:31 +0200)] 
Merge pull request #683 from python-babel/become-2.8.0

Become 2.8.0

5 years agoBump version 683/head
Aarni Koskela [Tue, 31 Dec 2019 12:23:25 +0000 (14:23 +0200)] 
Bump version

5 years agoUpdate authors file
Aarni Koskela [Tue, 31 Dec 2019 12:22:11 +0000 (14:22 +0200)] 
Update authors file

5 years agoDistill changelog from git log
Aarni Koskela [Tue, 31 Dec 2019 12:21:49 +0000 (14:21 +0200)] 
Distill changelog from git log

5 years agoHardcode "ignore" method
sebleblanc [Tue, 3 Dec 2019 04:45:42 +0000 (04:45 +0000)] 
Hardcode "ignore" method

The "ignore" method used to force the opening of the file. Some editors (emacs) create symbolic links to use as synchronization locks. Those links have an extension that matches the opened file, but the links themselves do not point to an existing file, thus causing Babel to attempt to open a file that does not exist.

This fix skips opening of a file altogether when using the method "ignore" in the mapping file.

5 years agofix small decimal with disabled decimal_quantization
He Chen [Mon, 19 Aug 2019 20:06:41 +0000 (16:06 -0400)] 
fix small decimal with disabled decimal_quantization

5 years agoMerge pull request #679 from python-babel/cldr-36
Aarni Koskela [Tue, 31 Dec 2019 09:06:04 +0000 (11:06 +0200)] 
Merge pull request #679 from python-babel/cldr-36

CLDR 36

5 years agoCorrect format_unit test based on new Welsh data 679/head
Aarni Koskela [Tue, 31 Dec 2019 08:02:04 +0000 (10:02 +0200)] 
Correct format_unit test based on new Welsh data

5 years agoCLDR import: assume files without revision tags to be new
Aarni Koskela [Tue, 31 Dec 2019 07:58:03 +0000 (09:58 +0200)] 
CLDR import: assume files without revision tags to be new

5 years agoDownload CLDR 36.0
Aarni Koskela [Tue, 31 Dec 2019 07:37:50 +0000 (09:37 +0200)] 
Download CLDR 36.0

5 years agoTest on released Python 3.8
Aarni Koskela [Tue, 31 Dec 2019 08:46:45 +0000 (10:46 +0200)] 
Test on released Python 3.8

5 years agoUpgrade freezegun to fix CI failures
Aarni Koskela [Tue, 31 Dec 2019 08:13:37 +0000 (10:13 +0200)] 
Upgrade freezegun to fix CI failures

5 years agoAdd install of pytz before import_cldr
Steve (Gadget) Barnes [Fri, 18 Oct 2019 16:07:24 +0000 (17:07 +0100)] 
Add install of pytz before import_cldr

closes #670

6 years agoAdd year along dates in changelog
Romuald Brunet [Thu, 18 Jul 2019 12:44:10 +0000 (14:44 +0200)] 
Add year along dates in changelog

6 years agoattempt partial sorting at least
Mario Frasca [Mon, 27 May 2019 17:35:28 +0000 (12:35 -0500)] 
attempt partial sorting at least

see issue #606.  if one object has anything that doesn't compare to `int`, bring it to the top, and correctly sort the rest.

6 years agoMerge pull request #650 from python-babel/become-270 v2.7.0
Aarni Koskela [Mon, 27 May 2019 12:42:10 +0000 (15:42 +0300)] 
Merge pull request #650 from python-babel/become-270

Become 2.7.0

6 years agoBump copyright year from 2018 to 2019 650/head
Aarni Koskela [Mon, 27 May 2019 12:24:52 +0000 (15:24 +0300)] 
Bump copyright year from 2018 to 2019

6 years agoBump version
Aarni Koskela [Mon, 27 May 2019 12:23:28 +0000 (15:23 +0300)] 
Bump version

6 years agoDistill changelog from git log
Aarni Koskela [Mon, 27 May 2019 12:20:09 +0000 (15:20 +0300)] 
Distill changelog from git log

6 years agoUpdate AUTHORS with generate_authors.py
Aarni Koskela [Mon, 27 May 2019 12:00:21 +0000 (15:00 +0300)] 
Update AUTHORS with generate_authors.py

6 years agoparse_decimal(): assume spaces are equivalent to non-breaking spaces when not in...
Aarni Koskela [Mon, 27 May 2019 11:32:48 +0000 (14:32 +0300)] 
parse_decimal(): assume spaces are equivalent to non-breaking spaces when not in strict mode

Fixes #637

6 years agopy.test: document all_locales marker
Aarni Koskela [Mon, 27 May 2019 11:31:09 +0000 (14:31 +0300)] 
py.test: document all_locales marker

6 years agoCatalog update: keep user comments from destination by default
Aarni Koskela [Mon, 27 May 2019 10:50:52 +0000 (13:50 +0300)] 
Catalog update: keep user comments from destination by default

Closes #418

6 years agoMerge pull request #647 from akx/pybabel-exit-code
Aarni Koskela [Mon, 27 May 2019 10:16:54 +0000 (13:16 +0300)] 
Merge pull request #647 from akx/pybabel-exit-code

pybabel compile: exit with code 1 if errors were encountered

6 years agopybabel compile: exit with code 1 if errors were encountered 647/head
Aarni Koskela [Mon, 27 May 2019 09:30:01 +0000 (12:30 +0300)] 
pybabel compile: exit with code 1 if errors were encountered

Fixes #627

6 years agotest_frontend: DRY out path generation
Aarni Koskela [Mon, 27 May 2019 10:01:55 +0000 (13:01 +0300)] 
test_frontend: DRY out path generation

6 years agopofile: don't crash when message.locations can't be sorted
Aarni Koskela [Mon, 27 May 2019 08:24:33 +0000 (11:24 +0300)] 
pofile: don't crash when message.locations can't be sorted

Fixes #606

6 years agoAdd comparison operators to _NormalizedString
Aarni Koskela [Mon, 27 May 2019 08:19:08 +0000 (11:19 +0300)] 
Add comparison operators to _NormalizedString

Based on @hoangduytranuk's original implementation.

Fixes #612

6 years agoget_display_name(): Don't attempt to concatenate variant information to None
Aarni Koskela [Mon, 27 May 2019 08:01:38 +0000 (11:01 +0300)] 
get_display_name(): Don't attempt to concatenate variant information to None

Fixes #601

6 years agoCache locale_identifiers()
Aarni Koskela [Mon, 27 May 2019 07:50:41 +0000 (10:50 +0300)] 
Cache locale_identifiers()

Fixes #620

6 years agoUse CLDR 35.1
Aarni Koskela [Mon, 27 May 2019 07:29:26 +0000 (10:29 +0300)] 
Use CLDR 35.1

6 years agoTravis: test on Python 3.8-dev
Aarni Koskela [Mon, 27 May 2019 07:22:24 +0000 (10:22 +0300)] 
Travis: test on Python 3.8-dev

6 years agoMerge pull request #635 from hroncok/pytest4
Aarni Koskela [Mon, 27 May 2019 07:17:57 +0000 (10:17 +0300)] 
Merge pull request #635 from hroncok/pytest4

Fix conftest.py compatibility with pytest 4.3

6 years agoTests: Update pytest and pytest-cov 635/head
Miro Hrončok [Thu, 14 Mar 2019 19:24:23 +0000 (20:24 +0100)] 
Tests: Update pytest and pytest-cov

6 years agoFix conftest.py compatibility with pytest 4.3
Miro Hrončok [Thu, 14 Mar 2019 18:54:42 +0000 (19:54 +0100)] 
Fix conftest.py compatibility with pytest 4.3

While pytest in tox.ini is explicitly set to be 3.3.2, in Fedora 31
we are about to update to a newer version of pytest.
In order to be able to test babel, we need pytest 4.3 support.

This adds support for pytest 4.3 without breaking support for 3.3.2.

6 years agoSkip alt=... for week data (minDays, firstDay, weekendStart, weekendEnd)
Aarni Koskela [Fri, 1 Mar 2019 11:38:31 +0000 (13:38 +0200)] 
Skip alt=... for week data (minDays, firstDay, weekendStart, weekendEnd)

Fixes #624

6 years agofixes #619 wrong weeknumber for 31.12.2018 (#621)
BT-sschmid [Fri, 1 Mar 2019 11:00:44 +0000 (12:00 +0100)] 
fixes #619 wrong weeknumber for 31.12.2018 (#621)

The weeknumber was calculated to 53, but by definition the value must compute to 1.

the fix will compute the weeknumber by using date.isocalendar if locale.first_week_day == 0.

Also the computation of the year format 'YYYY' is replaced by isocalendar.

6 years agofrontend: Add omit-header to update_catalog
Cédric Krier [Fri, 1 Mar 2019 08:43:00 +0000 (09:43 +0100)] 
frontend: Add  omit-header to update_catalog

It is the same option as in extract_message but for when updating the
catalog.

6 years agoReplace odict with Python's collection.OrderedDict
Jon Dufresne [Sun, 30 Dec 2018 15:54:34 +0000 (10:54 -0500)] 
Replace odict with Python's collection.OrderedDict

The odict class duplicates collection.OrderedDict from Python's standard
lib. Simplify the code by using builtin Python features.

https://docs.python.org/3/library/collections.html#collections.OrderedDict

6 years agoRemove unnecessary compat shim 'binary_type'
Jon Dufresne [Thu, 11 Oct 2018 03:34:09 +0000 (20:34 -0700)] 
Remove unnecessary compat shim 'binary_type'

The bytes type is available on all supported Pythons. On Python 2, it is
an alias of str, same as binary_type. By removing the shim, makes the
code more forward compatible.