Added
Link Here
|
1 |
From 2b6bb2c1bed8f7009631e8f8c306fa3160324a49 Mon Sep 17 00:00:00 2001 |
2 |
From: "Sergey G. Brester" <serg.brester@sebres.de> |
3 |
Date: Mon, 8 Feb 2021 17:19:24 +0100 |
4 |
Subject: [PATCH] follow bpo-37324: :ref:`collections-abstract-base-classes` |
5 |
moved to the :mod:`collections.abc` module |
6 |
|
7 |
(since 3.10-alpha.5 `MutableMapping` is missing in collections module) |
8 |
--- |
9 |
fail2ban/server/action.py | 5 ++++- |
10 |
1 file changed, 4 insertions(+), 1 deletion(-) |
11 |
|
12 |
diff --git fail2ban/server/action.py fail2ban/server/action.py |
13 |
index 3bc48fe0..f0f1e6f5 100644 |
14 |
--- fail2ban/server/action.py |
15 |
+++ fail2ban/server/action.py |
16 |
@@ -30,7 +30,10 @@ import tempfile |
17 |
import threading |
18 |
import time |
19 |
from abc import ABCMeta |
20 |
-from collections import MutableMapping |
21 |
+try: |
22 |
+ from collections.abc import MutableMapping |
23 |
+except ImportError: |
24 |
+ from collections import MutableMapping |
25 |
|
26 |
from .failregex import mapTag2Opt |
27 |
from .ipdns import DNSUtils |
28 |
-- |
29 |
2.32.0 |
30 |
|