From 90ccf99caa89af779ebd20911864c7fb0b415c61 Mon Sep 17 00:00:00 2001 From: xigaoxinyan Date: Tue, 17 May 2022 15:09:59 +0800 Subject: [PATCH] fix-collection.MutableMapping-no-support-for-python3.10 --- ...utableMapping-no-support-for-python-3.10.patch | 15 +++++++++++++++ python-Pympler.spec | 6 +++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 fix-collections.MutableMapping-no-support-for-python-3.10.patch 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..ed8f49d --- /dev/null +++ b/fix-collections.MutableMapping-no-support-for-python-3.10.patch @@ -0,0 +1,15 @@ +diff -Nur a/pympler/util/bottle.py b/pympler/util/bottle.py +--- a/pympler/util/bottle.py 2019-04-07 00:39:01.308185000 +0800 ++++ b/pympler/util/bottle.py 2022-05-17 10:10:10.356385260 +0800 +@@ -84,7 +84,10 @@ + from urllib.parse import urlencode, quote as urlquote, unquote as urlunquote + urlunquote = functools.partial(urlunquote, encoding='latin1') + from http.cookies import SimpleCookie +- from collections import MutableMapping as DictMixin ++ try: ++ from collections.abc import MutableMapping as DictMixin ++ except: ++ from collections import MutableMapping as DictMixin + import pickle + from io import BytesIO + from configparser import ConfigParser diff --git a/python-Pympler.spec b/python-Pympler.spec index 4b66c05..57af443 100644 --- a/python-Pympler.spec +++ b/python-Pympler.spec @@ -2,11 +2,12 @@ %global pname Pympler Name: python-%{pname} Version: 0.9 -Release: 2 +Release: 3 Summary: A development tool to measure, monitor and analyze the memory behavior of Python objects. License: Apache-2.0 and MIT URL: https://github.com/pympler/pympler Source0: https://files.pythonhosted.org/packages/e8/e2/2f3a086701bb62b1c478a3921836271177838a3c98cdc6b82c3bb36d3854/Pympler-0.9.tar.gz +Patch0: fix-collections.MutableMapping-no-support-for-python-3.10.patch BuildArch: noarch %description Pympler is a development tool to measure, monitor and analyze the memory @@ -99,6 +100,9 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Tue May 17 2022 xigaoxinyan - 0.9-3 +- Fix collections.MutableMapping no support for python3.10 + * Fri Jul 30 2021 chenyanpanHW - 0.9-2 - DESC: delete -S git from %autosetup