Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-prestring for
openSUSE:Factory checked in at 2021-04-29 01:38:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-prestring (Old)
and /work/SRC/openSUSE:Factory/.python-prestring.new.12324 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-prestring"
Thu Apr 29 01:38:27 2021 rev:2 rq:889012 version:0.9.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-prestring/python-prestring.changes
2020-08-17 14:40:52.842594698 +0200
+++
/work/SRC/openSUSE:Factory/.python-prestring.new.12324/python-prestring.changes
2021-04-29 01:39:33.314676619 +0200
@@ -1,0 +2,5 @@
+Wed Apr 28 11:48:04 UTC 2021 - Mark??ta Machov?? <[email protected]>
+
+- Add py39.patch to fix tests
+
+-------------------------------------------------------------------
New:
----
py39.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-prestring.spec ++++++
--- /var/tmp/diff_new_pack.JDaLWk/_old 2021-04-29 01:39:33.838677361 +0200
+++ /var/tmp/diff_new_pack.JDaLWk/_new 2021-04-29 01:39:33.842677366 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-prestring
#
-# 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 @@
License: MIT
URL: https://github.com/podhmo/prestring
Source:
https://github.com/podhmo/prestring/archive/%{version}.tar.gz#/prestring-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM
https://github.com/podhmo/prestring/commit/55165f7b1a622577801f8d6c2bd3d0f16555be4b
Fix test for py39 (#75)
+Patch0: py39.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -41,6 +43,7 @@
%prep
%setup -q -n prestring-%{version}
+%autopatch -p1
%build
%python_build
++++++ py39.patch ++++++
>From 55165f7b1a622577801f8d6c2bd3d0f16555be4b Mon Sep 17 00:00:00 2001
From: podhmo <[email protected]>
Date: Sun, 28 Mar 2021 14:27:35 +0900
Subject: [PATCH] Fix test for py39 (#75)
* test: remove try-except
* test: fix tests (work-around)
---
prestring/tests/test_lazy_object.py | 33 +++++++++++++++++------------
1 file changed, 20 insertions(+), 13 deletions(-)
diff --git a/prestring/tests/test_lazy_object.py
b/prestring/tests/test_lazy_object.py
index f528009..a41457f 100644
--- a/prestring/tests/test_lazy_object.py
+++ b/prestring/tests/test_lazy_object.py
@@ -29,23 +29,30 @@ def test_with_actual_types(self):
self.assertEqual(str(target), "x: int, y: bool, *")
def test_with_actual_types2(self):
- try:
- import typing as t
-
- target = self._makeOne(
- ["x", "y", "z"],
- types={
- "x": int,
- "y": t.Optional[int],
- "z": t.Sequence[t.Optional[int]],
- },
- )
+ import typing as t
+
+ target = self._makeOne(
+ ["x", "y", "z"],
+ types={
+ "x": int,
+ "y": t.Optional[int],
+ "z": t.Sequence[t.Optional[int]],
+ },
+ )
+
+ # TODO: fix, this is work-around
+ import sys
+
+ if (3, 9) > sys.version_info:
self.assertEqual(
str(target),
"x: int, y: 'typing.Union[int, NoneType]', z:
'typing.Sequence[typing.Union[int, NoneType]]'",
)
- except ImportError:
- pass
+ else:
+ self.assertEqual(
+ str(target),
+ "x: int, y: 'typing.Optional[int]', z:
'typing.Sequence[typing.Optional[int]]'",
+ )
@test_target("prestring:LazyKeywords")