Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-PyICU for openSUSE:Factory checked in at 2021-04-29 22:44:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-PyICU (Old) and /work/SRC/openSUSE:Factory/.python-PyICU.new.1947 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-PyICU" Thu Apr 29 22:44:44 2021 rev:9 rq:888967 version:2.6 Changes: -------- --- /work/SRC/openSUSE:Factory/python-PyICU/python-PyICU.changes 2020-12-16 10:59:53.239534519 +0100 +++ /work/SRC/openSUSE:Factory/.python-PyICU.new.1947/python-PyICU.changes 2021-04-29 22:44:57.276151153 +0200 @@ -1,0 +2,6 @@ +Wed Apr 28 08:06:12 UTC 2021 - Steve Kowalik <steven.kowa...@suse.com> + +- Add patch support-icu-69.patch: + * Support ICU 69 + +------------------------------------------------------------------- New: ---- support-icu-69.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-PyICU.spec ++++++ --- /var/tmp/diff_new_pack.dksRVZ/_old 2021-04-29 22:44:57.844148623 +0200 +++ /var/tmp/diff_new_pack.dksRVZ/_new 2021-04-29 22:44:57.844148623 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-PyICU # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,8 @@ Group: Development/Libraries/Python URL: https://github.com/ovalhub/pyicu Source0: https://files.pythonhosted.org/packages/source/P/PyICU/%{modname}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM: Support for ICU 69 commited upstream, spread over 2 commits +Patch0: support-icu-69.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} @@ -46,6 +48,7 @@ %prep %setup -q -n %{modname}-%{version} +%autopatch -p1 %build export CXXFLAGS="%{optflags} -fno-strict-aliasing" ++++++ support-icu-69.patch ++++++ >From 15d2ba67677369aae8b0964f18e9cdbf70a414b2 Mon Sep 17 00:00:00 2001 From: ovalhub <11970237+oval...@users.noreply.github.com> Date: Fri, 26 Mar 2021 12:53:37 -0700 Subject: [PATCH] fix build and test failures with icu 69rc --- numberformat.cpp | 6 ++++++ test/test_DateTimeParserGenerator.py | 1 - test/test_NumberFormatter.py | 16 ++++++++++++---- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/numberformat.cpp b/numberformat.cpp index a5deba1..5a5e6ee 100644 --- a/numberformat.cpp +++ b/numberformat.cpp @@ -597,10 +597,12 @@ DECLARE_BY_VALUE_TYPE(FormattedNumber, t_formattednumber, FormattedValue, /* FormattedNumberRange */ /* t_formattednumberrange declared in numberformat.h */ +#if U_ICU_VERSION_HEX <= VERSION_HEX(69, 0, 0) static PyObject *t_formattednumberrange_getFirstDecimal( t_formattednumberrange *self); static PyObject *t_formattednumberrange_getSecondDecimal( t_formattednumberrange *self); +#endif static PyObject *t_formattednumberrange_getIdentityResult( t_formattednumberrange *self); #if U_ICU_VERSION_HEX >= VERSION_HEX(68, 0, 0) @@ -609,8 +611,10 @@ static PyObject *t_formattednumberrange_getDecimalNumbers( #endif static PyMethodDef t_formattednumberrange_methods[] = { +#if U_ICU_VERSION_HEX <= VERSION_HEX(69, 0, 0) DECLARE_METHOD(t_formattednumberrange, getFirstDecimal, METH_NOARGS), DECLARE_METHOD(t_formattednumberrange, getSecondDecimal, METH_NOARGS), +#endif DECLARE_METHOD(t_formattednumberrange, getIdentityResult, METH_NOARGS), #if U_ICU_VERSION_HEX >= VERSION_HEX(68, 0, 0) DECLARE_METHOD(t_formattednumberrange, getDecimalNumbers, METH_NOARGS), @@ -5208,6 +5212,7 @@ static PyObject *t_formattednumber_getOutputUnit(t_formattednumber *self) /* FormattedNumberRange */ +#if U_ICU_VERSION_HEX <= VERSION_HEX(69, 0, 0) static PyObject *t_formattednumberrange_getFirstDecimal( t_formattednumberrange *self) { @@ -5227,6 +5232,7 @@ static PyObject *t_formattednumberrange_getSecondDecimal( return PyUnicode_FromUnicodeString(&u); } +#endif static PyObject *t_formattednumberrange_getIdentityResult( t_formattednumberrange *self) diff --git a/test/test_DateTimeParserGenerator.py b/test/test_DateTimeParserGenerator.py index 6d37c22..ef9a00f 100644 --- a/test/test_DateTimeParserGenerator.py +++ b/test/test_DateTimeParserGenerator.py @@ -63,7 +63,6 @@ class TestDateTimePatternGenerator(TestCase): else: self.assertEqual(sdf.format(self.date), u'09. von mai, 17:30') self.assertEqual(sdf.toPattern(), u"dd'. von' MMMM, HH:mm") - def testGetBestPattern(self): """Test a few different languages and common patterns.""" diff --git a/test/test_NumberFormatter.py b/test/test_NumberFormatter.py index a69f39b..8c85005 100644 --- a/test/test_NumberFormatter.py +++ b/test/test_NumberFormatter.py @@ -161,13 +161,21 @@ class TestNumberRangeFormatter(TestCase): self.assertEqual(str(value), u'0,333-0,25') self.assertEqual(repr(value), u'<FormattedNumberRange: 0,333-0,25>') - self.assertEqual(value.getFirstDecimal(), u'3.33E-1') - self.assertEqual(value.getSecondDecimal(), u'2.5E-1') + if ICU_VERSION < '69.0': + self.assertEqual(value.getFirstDecimal(), u'3.33E-1') + self.assertEqual(value.getSecondDecimal(), u'2.5E-1') + self.assertEqual( + [(x.getStart(), x.getLimit()) for x in value], + [(0, 1), (1, 2), (2, 5), (6, 7), (7, 8), (8, 10)]) + else: + self.assertEqual( + [(x.getStart(), x.getLimit()) for x in value], + [(0, 5), (0, 1), (1, 2), (2, 5), (6, 10), (6, 7), (7, 8), + (8, 10)]) + if ICU_VERSION >= '68.0': self.assertEqual(value.getDecimalNumbers(), (b'0.333', b'0.25')) - self.assertEqual([(x.getStart(), x.getLimit()) for x in value], - [(0, 1), (1, 2), (2, 5), (6, 7), (7, 8), (8, 10)]) if __name__ == "__main__": -- GitLab