Migration for python 3.11+ 35/288235/1 accepted/tizen_base accepted/tizen_base_dev tizen_base accepted/tizen/base/20230227.020128 accepted/tizen/base/20230302.084200 accepted/tizen/base/20230307.031310 accepted/tizen/base/dev/20230602.080653
authorJinWang An <jinwang.an@samsung.com>
Tue, 14 Feb 2023 04:36:46 +0000 (13:36 +0900)
committerJinWang An <jinwang.an@samsung.com>
Tue, 14 Feb 2023 04:37:14 +0000 (13:37 +0900)
Change-Id: Ic39a85a56f7f0b955156addd7da6606ba7ee730f
Signed-off-by: JinWang An <jinwang.an@samsung.com>
packaging/Migration_for_python_3.11.patch [new file with mode: 0644]
packaging/python3-unittest2.spec

diff --git a/packaging/Migration_for_python_3.11.patch b/packaging/Migration_for_python_3.11.patch
new file mode 100644 (file)
index 0000000..9ee8656
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/unittest2/compatibility.py b/unittest2/compatibility.py
+index 9e5f1a5..2d20c19 100644
+--- a/unittest2/compatibility.py
++++ b/unittest2/compatibility.py
+@@ -140,7 +140,7 @@ except ImportError:
+ ###  ChainMap (helper for configparser and string.Template)
+ ########################################################################
+-class ChainMap(collections.MutableMapping):
++class ChainMap(collections.abc.MutableMapping):
+     ''' A ChainMap groups multiple dicts (or other mappings) together
+     to create a single, updateable view.
index 84579f3..0e50e6c 100644 (file)
@@ -24,6 +24,7 @@ License:        BSD-3-Clause
 Group:          Development/Languages/Python
 Source:         http://pypi.python.org/packages/source/u/unittest2/unittest2-%{version}.tar.gz
 Source1001:     %{name}.manifest
+Source1002:     Migration_for_python_3.11.patch
 
 BuildRequires:  python3-argparse
 BuildRequires:  python3-devel
@@ -47,9 +48,11 @@ framework in Python 2.7. It is tested to run on Python 2.4 - 2.7.
 
 %prep
 %setup -q -n unittest2-%{version}
+%{__patch} -p1 < %{SOURCE1002}
 
 %build
 cp %{SOURCE1001} .
+
 %{_bindir}/python3 setup.py build
 
 %install