python-cheetah/import-from-the-new-abc-module.patch

28 lines
724 B
Diff
Raw Permalink Normal View History

2022-06-15 15:12:03 +08:00
From d4f4de215094dc9c1f51427f3d24f66739115470 Mon Sep 17 00:00:00 2001
From: houyingchao <1348375921@qq.com>
Date: Wed, 15 Jun 2022 14:04:57 +0800
Subject: [PATCH] import-from-the-new-abc-module
2022-04-12 10:38:33 +08:00
---
2022-06-15 15:12:03 +08:00
Cheetah/NameMapper.py | 4 ++++
1 file changed, 4 insertions(+)
2022-04-12 10:38:33 +08:00
2022-06-15 15:12:03 +08:00
diff --git a/Cheetah/NameMapper.py b/Cheetah/NameMapper.py
index 3c16dff..d92cddd 100755
2022-04-12 10:38:33 +08:00
--- a/Cheetah/NameMapper.py
+++ b/Cheetah/NameMapper.py
2022-06-15 15:12:03 +08:00
@@ -140,6 +140,10 @@ Cheetah uses the optimized C version (_namemapper.c) if it has
2022-04-12 10:38:33 +08:00
been compiled or falls back to the Python version if not.
"""
2022-06-15 15:12:03 +08:00
2022-04-12 10:38:33 +08:00
+try:
+ from collections.abc import Mapping
+except ImportError:
+ from collections import Mapping
import inspect
from pprint import pformat
2022-06-15 15:12:03 +08:00
2022-04-12 10:38:33 +08:00
--
2022-06-15 15:12:03 +08:00
2.23.0
2022-04-12 10:38:33 +08:00