Accepting request 856578 from home:stroeder:branches:devel:languages:python

- removed obsolete patches
  * python383.patch
  * pytest6.patch
- update to 2.9.0
  * Improvements
    - CLDR: Use CLDR 37 – Aarni Koskela (#734)
    - Dates: Handle ZoneInfo objects in get_timezone_location, get_timezone_name - Alessio Bogon (#741)
    - Numbers: Add group_separator feature in number formatting - Abdullah Javed Nesar (#726)
  * Bugfixes
    - Dates: Correct default Format().timedelta format to 'long' to mute deprecation warnings – Aarni Koskela
    - Import: Simplify iteration code in "import_cldr.py" – Felix Schwarz
    - Import: Stop using deprecated ElementTree methods "getchildren()" and "getiterator()" – Felix Schwarz
    - Messages: Fix unicode printing error on Python 2 without TTY. – Niklas Hambüchen
    - Messages: Introduce invariant that _invalid_pofile() takes unicode line. – Niklas Hambüchen
    - Tests: fix tests when using Python 3.9 – Felix Schwarz
    - Tests: Remove deprecated 'sudo: false' from Travis configuration – Jon Dufresne
    - Tests: Support Py.test 6.x – Aarni Koskela
    - Utilities: LazyProxy: Handle AttributeError in specified func – Nikiforov Konstantin (#724)
    - Utilities: Replace usage of parser.suite with ast.parse – Miro Hrončok
    - Support Py.test 6 - Aarni Koskela (#747, #750, #752)
  * Documentation
    - Update parse_number comments – Brad Martin (#708)
    - Add __iter__ to Catalog documentation – @CyanNani123

OBS-URL: https://build.opensuse.org/request/show/856578
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Babel?expand=0&rev=53
This commit is contained in:
Markéta Machová 2020-12-17 08:57:30 +00:00 committed by Git OBS Bridge
parent 4d736bc6df
commit c5fdf5f085
6 changed files with 31 additions and 89 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1aac2ae2d0d8ea368fa90906567f5c08463d98ade155c0c4bfedd6a0f7160e38
size 8444381

3
Babel-2.9.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:da031ab54472314f210b0adcff1588ee5d1d1d0ba4dbd07b94dba82bde791e05
size 8682986

View File

@ -1,13 +0,0 @@
Index: Babel-2.8.0/conftest.py
===================================================================
--- Babel-2.8.0.orig/conftest.py
+++ Babel-2.8.0/conftest.py
@@ -8,4 +8,7 @@ babel_path = local(__file__).dirpath().j
def pytest_collect_file(path, parent):
if babel_path.common(path) == babel_path:
if path.ext == ".py":
- return DoctestModule(path, parent)
+ try:
+ return DoctestModule.from_parent(parent, fspath=path)
+ except AttributeError:
+ return DoctestModule(path, parent)

View File

@ -1,3 +1,30 @@
-------------------------------------------------------------------
Wed Dec 16 23:03:10 UTC 2020 - Michael Ströder <michael@stroeder.com>
- removed obsolete patches
* python383.patch
* pytest6.patch
- update to 2.9.0
* Improvements
- CLDR: Use CLDR 37 Aarni Koskela (#734)
- Dates: Handle ZoneInfo objects in get_timezone_location, get_timezone_name - Alessio Bogon (#741)
- Numbers: Add group_separator feature in number formatting - Abdullah Javed Nesar (#726)
* Bugfixes
- Dates: Correct default Format().timedelta format to 'long' to mute deprecation warnings Aarni Koskela
- Import: Simplify iteration code in "import_cldr.py" Felix Schwarz
- Import: Stop using deprecated ElementTree methods "getchildren()" and "getiterator()" Felix Schwarz
- Messages: Fix unicode printing error on Python 2 without TTY. Niklas Hambüchen
- Messages: Introduce invariant that _invalid_pofile() takes unicode line. Niklas Hambüchen
- Tests: fix tests when using Python 3.9 Felix Schwarz
- Tests: Remove deprecated 'sudo: false' from Travis configuration Jon Dufresne
- Tests: Support Py.test 6.x Aarni Koskela
- Utilities: LazyProxy: Handle AttributeError in specified func Nikiforov Konstantin (#724)
- Utilities: Replace usage of parser.suite with ast.parse Miro Hrončok
- Support Py.test 6 - Aarni Koskela (#747, #750, #752)
* Documentation
- Update parse_number comments Brad Martin (#708)
- Add __iter__ to Catalog documentation @CyanNani123
-------------------------------------------------------------------
Thu Aug 27 12:38:55 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>

View File

@ -19,14 +19,12 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-Babel
Version: 2.8.0
Version: 2.9.0
Release: 0
Summary: Internationalization utilities
License: BSD-3-Clause
URL: http://babel.pocoo.org/
Source: https://files.pythonhosted.org/packages/source/B/Babel/Babel-%{version}.tar.gz
Patch0: python383.patch
Patch1: pytest6.patch
BuildRequires: %{python_module freezegun}
BuildRequires: %{python_module py >= 1.4.14}
BuildRequires: %{python_module pytest >= 2.3.5}
@ -53,8 +51,6 @@ A collection of tools for internationalizing Python applications.
%prep
%setup -q -n Babel-%{version}
%patch0 -p1
%patch1 -p1
%build
%python_build

View File

@ -1,68 +0,0 @@
From 7bdaa28a55e8d8228d5434effa4b1473ab7b3669 Mon Sep 17 00:00:00 2001
From: Felix Schwarz <felix.schwarz@oss.schwarz.eu>
Date: Tue, 5 May 2020 08:05:56 +0000
Subject: [PATCH] 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.
---
tests/test_util.py | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/tests/test_util.py b/tests/test_util.py
index a6a4450c..b9343aaa 100644
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -11,6 +11,7 @@
# individuals. For the exact contribution history, see the revision
# history and logs, available at http://babel.edgewall.org/log/.
+import __future__
import unittest
import pytest
@@ -20,6 +21,12 @@
from babel.util import parse_future_flags
+class _FF:
+ division = __future__.division.compiler_flag
+ print_function = __future__.print_function.compiler_flag
+ with_statement = __future__.with_statement.compiler_flag
+ unicode_literals = __future__.unicode_literals.compiler_flag
+
def test_distinct():
assert list(util.distinct([1, 2, 1, 3, 4, 4])) == [1, 2, 3, 4]
assert list(util.distinct('foobar')) == ['f', 'o', 'b', 'a', 'r']
@@ -70,25 +77,25 @@ def test_parse_encoding_non_ascii():
from __future__ import print_function,
division, with_statement,
unicode_literals
-''', 0x10000 | 0x2000 | 0x8000 | 0x20000),
+''', _FF.print_function | _FF.division | _FF.with_statement | _FF.unicode_literals),
('''
from __future__ import print_function, division
print('hello')
-''', 0x10000 | 0x2000),
+''', _FF.print_function | _FF.division),
('''
from __future__ import print_function, division, unknown,,,,,
print 'hello'
-''', 0x10000 | 0x2000),
+''', _FF.print_function | _FF.division),
('''
from __future__ import (
print_function,
division)
-''', 0x10000 | 0x2000),
+''', _FF.print_function | _FF.division),
('''
from __future__ import \\
print_function, \\
division
-''', 0x10000 | 0x2000),
+''', _FF.print_function | _FF.division),
])
def test_parse_future(source, result):
fp = BytesIO(source.encode('latin-1'))