diff --git a/fix-collections.MutableMapping-no-support-for-python-3.10.patch b/fix-collections.MutableMapping-no-support-for-python-3.10.patch new file mode 100644 index 0000000..1060041 --- /dev/null +++ b/fix-collections.MutableMapping-no-support-for-python-3.10.patch @@ -0,0 +1,14 @@ +diff -Nur a/unittest2/compatibility.py b/unittest2/compatibility.py +--- a/unittest2/compatibility.py 2014-10-29 18:51:58.000000000 +0800 ++++ b/unittest2/compatibility.py 2022-03-31 11:21:09.580805329 +0800 +@@ -1,4 +1,10 @@ + import collections ++try: ++ from collections import abc ++ collections.MutableMapping = abc.MutableMapping ++except: ++ pass ++ + import os + import sys + diff --git a/python-unittest2.spec b/python-unittest2.spec index bf86539..85b92cf 100644 --- a/python-unittest2.spec +++ b/python-unittest2.spec @@ -1,6 +1,6 @@ Name: python-unittest2 Version: 1.1.0 -Release: 17 +Release: 18 Summary: New features added to the unittest testing framework in Python 2.7 and onwards License: BSD URL: http://pypi.python.org/pypi/unittest2 @@ -8,6 +8,7 @@ Source0: https://pypi.python.org/packages/source/u/unittest2/unittest2-%{ Patch0000: unittest2-1.1.0-remove-argparse-from-requires.patch Patch0001: unittest2-1.1.0-backport-tests-from-py3.5.patch +Patch0002: fix-collections.MutableMapping-no-support-for-python-3.10.patch BuildArch: noarch %description @@ -51,6 +52,9 @@ cd - %{python3_sitelib}/unittest2* %changelog +* Thu Mar 22 2022 wulei - 1.1.0-18 +- Fix collections.MutableMapping no support for python 3.10 + * Fri Sep 11 2020 zhangjiapeng - 1.1.0-17 - Remove python2-unittest2 subpackage