update to 2.9.0

The test suite only passed after forcing the timezone to UTC.
This commit is contained in:
Felix Schwarz 2020-11-16 22:25:48 +01:00
parent 8e02de60cd
commit 2c7f3316c2
4 changed files with 10 additions and 80 deletions

11
.gitignore vendored
View File

@ -1,8 +1,3 @@
Babel-0.9.5.tar.gz
/Babel-0.9.6.tar.gz
/Babel-1.3.tar.gz
/Babel-2.3.4.tar.gz
/Babel-2.5.1.tar.gz
/Babel-2.6.0.tar.gz
/Babel-2.7.0.tar.gz
/Babel-2.8.0.tar.gz
/Babel-0.9.*.tar.gz
/Babel-1.*.tar.gz
/Babel-2.*.tar.gz

View File

@ -1,66 +0,0 @@
commit f3651bebd3216cc276f7642c3807cc8d08f2bd23
Author: Felix Schwarz <felix.schwarz@oss.schwarz.eu>
Date: Tue May 5 08:05:56 2020 +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.
diff --git a/tests/test_util.py b/tests/test_util.py
index a6a4450..b9343aa 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._compat import BytesIO
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'))

View File

@ -10,15 +10,13 @@
Name: babel
Version: 2.8.0
Release: 7%{?dist}
Version: 2.9.0
Release: 1%{?dist}
Summary: Tools for internationalizing Python applications
License: BSD
URL: https://babel.pocoo.org/
Source0: %{pypi_source}
# https://github.com/python-babel/babel/pull/712
Patch0: babel-python39a6-compat.patch
BuildArch: noarch
@ -135,7 +133,7 @@ rm -f "$BUILDDIR/html/.buildinfo"
%py3_install
%check
export TZ=America/New_York
export TZ=UTC
%if !%{with bootstrap}
%{__python3} -m pytest
%endif
@ -161,6 +159,9 @@ export TZ=America/New_York
%endif
%changelog
* Mon Nov 16 22:22:25 CET 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 2.9.0-1
- update to 2.9.0
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (Babel-2.8.0.tar.gz) = f9687b36176c146a8ace073197111463d24fca343bb1dbee8b0e37a7f37b68b4cd77ffbe3bf14a20f8f64c701aa860e0b5e6076658a95dbee2556f0688d68d91
SHA512 (Babel-2.9.0.tar.gz) = 250d1a19741eb0d1bda9d6b862f2d4779b6c67f10b8e045f450a271a16587e30f26f35ccccfea8ca13bb519582d2ef83569fa4381d0590fb9b61bf3ebf67e5f6