From 532643c3631b39023291092b80814c4846099d9f Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Nov 29 2021 12:06:11 +0000 Subject: Don't use deprecated unittest aliases trough nose, they are removed in Python 3.11 --- diff --git a/19.patch b/19.patch new file mode 100644 index 0000000..7d2bb3c --- /dev/null +++ b/19.patch @@ -0,0 +1,35 @@ +From 27279feaed2cd253b50683db9239d829de48f64a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Mon, 29 Nov 2021 12:27:00 +0100 +Subject: [PATCH] Don't use deprecated unittest aliases trough nose, they are + removed in Python 3.11 + +--- + ipython_genutils/tests/test_path.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/ipython_genutils/tests/test_path.py b/ipython_genutils/tests/test_path.py +index 04ca85d..4a9e75d 100644 +--- a/ipython_genutils/tests/test_path.py ++++ b/ipython_genutils/tests/test_path.py +@@ -47,17 +47,17 @@ def dst(self, *args): + return os.path.join(self.tempdir.name, *args) + + def assert_inode_not_equal(self, a, b): +- nt.assert_not_equals(os.stat(a).st_ino, os.stat(b).st_ino, ++ nt.assert_not_equal(os.stat(a).st_ino, os.stat(b).st_ino, + "%r and %r do reference the same indoes" %(a, b)) + + def assert_inode_equal(self, a, b): +- nt.assert_equals(os.stat(a).st_ino, os.stat(b).st_ino, ++ nt.assert_equal(os.stat(a).st_ino, os.stat(b).st_ino, + "%r and %r do not reference the same indoes" %(a, b)) + + def assert_content_equal(self, a, b): + with open(a) as a_f: + with open(b) as b_f: +- nt.assert_equals(a_f.read(), b_f.read()) ++ nt.assert_equal(a_f.read(), b_f.read()) + + @skip_win32 + def test_link_successful(self): diff --git a/python-ipython_genutils.spec b/python-ipython_genutils.spec index c38c586..0efe24f 100644 --- a/python-ipython_genutils.spec +++ b/python-ipython_genutils.spec @@ -9,6 +9,9 @@ License: BSD URL: https://github.com/ipython/%{srcname} Source0: https://pypi.python.org/packages/source/i/%{srcname}/%{srcname}-%{version}.tar.gz +# Don't use deprecated unittest aliases trough nose, they are removed in Python 3.11 +Patch1: %{url}/pull/19.patch + BuildArch: noarch %description @@ -39,7 +42,7 @@ IPython/Jupyter should depend on it. %prep -%setup -q -n %{srcname}-%{version} +%autosetup -p1 -n %{srcname}-%{version} %build