From 43bbbc1a71c4de780307b190fe1afc715fb29fb3 Mon Sep 17 00:00:00 2001 From: xigaoxinyan Date: Tue, 12 Apr 2022 10:38:33 +0800 Subject: [PATCH] spec --- fix-the-ImportManger-infinite-recursion.patch | 22 -------------- import-from-the-new-abc-module.patch | 29 +++++++++++++++++++ python-cheetah.spec | 7 +++-- 3 files changed, 34 insertions(+), 24 deletions(-) delete mode 100644 fix-the-ImportManger-infinite-recursion.patch create mode 100644 import-from-the-new-abc-module.patch diff --git a/fix-the-ImportManger-infinite-recursion.patch b/fix-the-ImportManger-infinite-recursion.patch deleted file mode 100644 index 5121cc0..0000000 --- a/fix-the-ImportManger-infinite-recursion.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 18219344a05a2db8aaa39f401567d18b9ffd57c6 Mon Sep 17 00:00:00 2001 -Subject: fix the ImportManger infinite recursion - ---- - Cheetah/ImportManager.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Cheetah/ImportManager.py b/Cheetah/ImportManager.py -index dbb2c96..d752755 100644 ---- a/Cheetah/ImportManager.py -+++ b/Cheetah/ImportManager.py -@@ -21,6 +21,7 @@ import sys - import imp - import marshal - from Cheetah.compat import string_type -+import _bootlocale - - _installed = False - --- -2.23.0 - diff --git a/import-from-the-new-abc-module.patch b/import-from-the-new-abc-module.patch new file mode 100644 index 0000000..5b5622e --- /dev/null +++ b/import-from-the-new-abc-module.patch @@ -0,0 +1,29 @@ +From 488f246543f8a18ee8ecf8748edec72ade508288 Mon Sep 17 00:00:00 2001 +From: xigaoxinyan +Date: Thu, 7 Apr 2022 19:25:39 +0800 +Subject: [PATCH] ImportError-py3.10 + +--- + NameMapper.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/NameMapper.py b/NameMapper.py +index 68ded17..f5207e0 100644 +--- a/Cheetah/NameMapper.py ++++ b/Cheetah/NameMapper.py +@@ -139,8 +139,10 @@ difference in realistic usage scenarios. + Cheetah uses the optimized C version (_namemapper.c) if it has + been compiled or falls back to the Python version if not. + """ +- +-from collections import Mapping ++try: ++ from collections.abc import Mapping ++except ImportError: ++ from collections import Mapping + import inspect + from pprint import pformat + from Cheetah.compat import PY2 +-- +2.27.0 + diff --git a/python-cheetah.spec b/python-cheetah.spec index 932c076..e132226 100644 --- a/python-cheetah.spec +++ b/python-cheetah.spec @@ -1,6 +1,6 @@ Name: python-cheetah Version: 3.1.0 -Release: 9 +Release: 10 Summary: The Python-Powered Template Engine License: MIT URL: http://cheetahtemplate.org/ @@ -9,7 +9,7 @@ BuildRequires: gcc python3-devel python3-setuptools python3-markdown python3-py Patch0001: cheetah-3.0.0-dont-run-tests-twice.patch Patch0002: fix-the-regressions-test-error.patch -Patch0003: fix-the-ImportManger-infinite-recursion.patch +Patch0003: import-from-the-new-abc-module.patch %description Cheetah3 is a free and open source template engine and code-generation tool written in Python. @@ -47,6 +47,9 @@ export PATH="%{buildroot}/%{_bindir}:$PATH" PYTHONPATH="%{buildroot}/%{python3_s %{python3_sitearch}/ %changelog +* Tue Apr 12 2022 xigaoxinyan - 3.1.0-10 +- import from the new abc module inside of collections + * Wed Oct 21 2020 chengzihan - 3.1.0-9 - Remove subpackage python2-cheetah