From d578b9b884636ec605b627122db1fa48e9a7625c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Verg=C3=A9?= Date: Mon, 5 Sep 2022 11:23:33 +0200 Subject: [PATCH] Remove deprecated unittest aliases patch This reverts commit 204c8a9 "Refactor deprecated unittest aliases for Python 3.11 compatibility". --- 51.patch | 27 --------------------------- python-pathspec.spec | 5 +---- 2 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 51.patch diff --git a/51.patch b/51.patch deleted file mode 100644 index eb9699f..0000000 --- a/51.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 46bad125f2d599a409704b6c1dcda47b709b4aec Mon Sep 17 00:00:00 2001 -From: Karthikeyan Singaravelan -Date: Sun, 10 Oct 2021 08:19:25 +0000 -Subject: [PATCH] Refactor deprecated unittest aliases for Python 3.11 - compatibility. - ---- - pathspec/tests/test_gitwildmatch.py | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/pathspec/tests/test_gitwildmatch.py b/pathspec/tests/test_gitwildmatch.py -index 9868381..f9b4b66 100644 ---- a/pathspec/tests/test_gitwildmatch.py -+++ b/pathspec/tests/test_gitwildmatch.py -@@ -543,6 +543,11 @@ def test_09_single_exclamation_mark_fail(self): - - def _check_invalid_pattern(self, git_ignore_pattern): - expected_message_pattern = re.escape(repr(git_ignore_pattern)) -- with self.assertRaisesRegexp(GitWildMatchPatternError, expected_message_pattern): -+ # assertRaisesRegexp was a deprecated alias removed in Python 3.11 -+ if hasattr(self, 'assertRaisesRegex'): -+ assertRaisesRegex = self.assertRaisesRegex -+ else: -+ assertRaisesRegex = self.assertRaisesRegexp -+ with assertRaisesRegex(GitWildMatchPatternError, expected_message_pattern): - GitWildMatchPattern(git_ignore_pattern) - diff --git a/python-pathspec.spec b/python-pathspec.spec index d701b99..fe4a8ce 100644 --- a/python-pathspec.spec +++ b/python-pathspec.spec @@ -7,9 +7,6 @@ License: MPLv2.0 URL: https://github.com/cpburnz/python-path-specification Source0: https://files.pythonhosted.org/packages/source/p/pathspec/pathspec-%{version}.tar.gz -# Refactor deprecated unittest aliases for Python 3.11 compatibility -Patch1: %{url}/pull/51.patch - BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -30,7 +27,7 @@ is derived from Rsync's wildmatch. Git uses wildmatch for its gitignore files. %prep -%autosetup -p1 -n pathspec-%{version} +%autosetup -n pathspec-%{version} # Remove bundled egg-info rm -rf pathspec.egg-info