diff --git a/py313-interpreter-repr.patch b/py313-interpreter-repr.patch new file mode 100644 index 0000000..d26e002 --- /dev/null +++ b/py313-interpreter-repr.patch @@ -0,0 +1,22 @@ +From 1c08845b05d022692252ed45cb07e9cb9647caac Mon Sep 17 00:00:00 2001 +From: Vinay Sajip +Date: Wed, 14 Feb 2024 14:46:14 +0000 +Subject: [PATCH] Fix #214: Update representation of interpreter in test. + +--- + tests/test_scripts.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_scripts.py b/tests/test_scripts.py +index 5c38687..74ee647 100644 +--- a/tests/test_scripts.py ++++ b/tests/test_scripts.py +@@ -340,7 +340,7 @@ def test_script_run(self): + self.assertIn(b'

Current Working Directory:

', stdout) + self.assertIn(os.getcwd().encode('utf-8'), stdout) + else: +- self.assertIn(b'[Interpreter(id=0, isolated=None)]', stderr) ++ self.assertIn(b'[Interpreter(0)]', stderr) + self.assertEqual(p.returncode, 1) + + @unittest.skipUnless(os.name == 'posix', 'Test only valid for POSIX') diff --git a/python-distlib.changes b/python-distlib.changes index d692eaf..3a06152 100644 --- a/python-distlib.changes +++ b/python-distlib.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Mon Jul 1 08:04:02 UTC 2024 - Dirk Müller + +- add py313-interpreter-repr.patch to fix testsuite with python + 3.13 + +------------------------------------------------------------------- +Mon Jul 1 06:03:36 UTC 2024 - Dirk Müller + +- depend on testsuite + ------------------------------------------------------------------- Tue Dec 19 09:57:22 UTC 2023 - Dirk Müller diff --git a/python-distlib.spec b/python-distlib.spec index d745aea..bc5f621 100644 --- a/python-distlib.spec +++ b/python-distlib.spec @@ -1,7 +1,7 @@ # # spec file for package python-distlib # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,8 +24,10 @@ Summary: Distribution utilities License: Python-2.0 URL: https://github.com/pypa/distlib Source: https://files.pythonhosted.org/packages/source/d/distlib/distlib-%{version}.tar.gz +Patch1: https://github.com/pypa/distlib/commit/1c08845b05d022692252ed45cb07e9cb9647caac.patch#/py313-interpreter-repr.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} +BuildRequires: %{python_module testsuite} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -36,8 +38,7 @@ BuildArch: noarch Python distribution utilities. %prep -%setup -q -n distlib-%{version} -%autopatch -p1 +%autosetup -p1 -n distlib-%{version} # This test module requires internet access and are unnecessary sed -i '/from test_locators import LocatorTestCase/d' tests/distlib_tests.py