Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-random2 for openSUSE:Factory checked in at 2021-04-17 23:24:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-random2 (Old) and /work/SRC/openSUSE:Factory/.python-random2.new.12324 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-random2" Sat Apr 17 23:24:58 2021 rev:5 rq:886229 version:1.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-random2/python-random2.changes 2019-11-04 17:11:13.336569824 +0100 +++ /work/SRC/openSUSE:Factory/.python-random2.new.12324/python-random2.changes 2021-04-17 23:25:03.285603216 +0200 @@ -1,0 +2,6 @@ +Sat Apr 17 06:37:03 UTC 2021 - Christophe Giboudeaux <[email protected]> + +- Add patch from Debian to fix build with python 3.9: + * python3.9.patch + +------------------------------------------------------------------- New: ---- python3.9.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-random2.spec ++++++ --- /var/tmp/diff_new_pack.SCU6ev/_old 2021-04-17 23:25:03.705603932 +0200 +++ /var/tmp/diff_new_pack.SCU6ev/_new 2021-04-17 23:25:03.709603939 +0200 @@ -25,6 +25,8 @@ License: Python-2.0 URL: https://pypi.python.org/pypi/random2 Source: https://files.pythonhosted.org/packages/source/r/random2/random2-%{version}.zip +# PATCH-FIX-UPSTREAM -- python3.9.patch Origin: Debian +Patch0: python3.9.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -45,7 +47,7 @@ adjusted. This package fixes that. %prep -%setup -q -n random2-%{version} +%autosetup -p1 -n random2-%{version} %build %python_build ++++++ python3.9.patch ++++++ Description: fix tests with python 3.9 Python docs for the function being tested now state: "Changed in version 3.9: This method now accepts zero for k." https://docs.python.org/3/library/random.html#random.getrandbits Author: Juhani Numminen <[email protected]> Bug-Debian: https://bugs.debian.org/973085 Last-Update: 2020-11-24 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/src/tests.py +++ b/src/tests.py @@ -291,7 +291,8 @@ # Verify argument checking self.assertRaises(TypeError, self.gen.getrandbits) self.assertRaises(TypeError, self.gen.getrandbits, 1, 2) - self.assertRaises(ValueError, self.gen.getrandbits, 0) + if sys.version_info < (3, 9): + self.assertRaises(ValueError, self.gen.getrandbits, 0) self.assertRaises(ValueError, self.gen.getrandbits, -1) self.assertRaises(TypeError, self.gen.getrandbits, 10.1) @@ -448,7 +449,8 @@ self.assertRaises(TypeError, self.gen.getrandbits) self.assertRaises(TypeError, self.gen.getrandbits, 'a') self.assertRaises(TypeError, self.gen.getrandbits, 1, 2) - self.assertRaises(ValueError, self.gen.getrandbits, 0) + if sys.version_info < (3, 9): + self.assertRaises(ValueError, self.gen.getrandbits, 0) self.assertRaises(ValueError, self.gen.getrandbits, -1) def test_randbelow_logic(self, _log=log, int=int):
