Add patch for Python 3.10a5 compatibility.
This commit is contained in:
parent
029795b77a
commit
4aef760552
2 changed files with 84 additions and 0 deletions
|
|
@ -0,0 +1,80 @@
|
|||
From ad74e1c628b4fa2f67d8f7e342138e6e103832ea Mon Sep 17 00:00:00 2001
|
||||
From: "Sergey G. Brester" <serg.brester@sebres.de>
|
||||
Date: Mon, 8 Feb 2021 17:19:24 +0100
|
||||
Subject: [PATCH 2/4] follow bpo-37324:
|
||||
:ref:`collections-abstract-base-classes` moved to the :mod:`collections.abc`
|
||||
module
|
||||
|
||||
(since 3.10-alpha.5 `MutableMapping` is missing in collections module)
|
||||
---
|
||||
fail2ban/server/action.py | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/fail2ban/server/action.py b/fail2ban/server/action.py
|
||||
index 4615401ed..16ff66212 100644
|
||||
--- a/fail2ban/server/action.py
|
||||
+++ b/fail2ban/server/action.py
|
||||
@@ -30,7 +30,10 @@
|
||||
import threading
|
||||
import time
|
||||
from abc import ABCMeta
|
||||
-from collections import MutableMapping
|
||||
+try:
|
||||
+ from collections.abc import MutableMapping
|
||||
+except ImportError:
|
||||
+ from collections import MutableMapping
|
||||
|
||||
from .failregex import mapTag2Opt
|
||||
from .ipdns import DNSUtils
|
||||
|
||||
From a785aab392d8de2ecb685d8bdd9266a0c7f8edf8 Mon Sep 17 00:00:00 2001
|
||||
From: "Sergey G. Brester" <serg.brester@sebres.de>
|
||||
Date: Mon, 8 Feb 2021 17:25:45 +0100
|
||||
Subject: [PATCH 3/4] amend for `Mapping`
|
||||
|
||||
---
|
||||
fail2ban/server/actions.py | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/fail2ban/server/actions.py b/fail2ban/server/actions.py
|
||||
index 967908af6..91e1ebaf3 100644
|
||||
--- a/fail2ban/server/actions.py
|
||||
+++ b/fail2ban/server/actions.py
|
||||
@@ -28,7 +28,10 @@
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
-from collections import Mapping
|
||||
+try:
|
||||
+ from collections.abc import Mapping
|
||||
+except ImportError:
|
||||
+ from collections import Mapping
|
||||
try:
|
||||
from collections import OrderedDict
|
||||
except ImportError:
|
||||
|
||||
From 0e2e2bf37da59649a1c3392b04b9480f84dac446 Mon Sep 17 00:00:00 2001
|
||||
From: "Sergey G. Brester" <serg.brester@sebres.de>
|
||||
Date: Mon, 8 Feb 2021 17:35:59 +0100
|
||||
Subject: [PATCH 4/4] amend for `Mapping` (jails)
|
||||
|
||||
---
|
||||
fail2ban/server/jails.py | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/fail2ban/server/jails.py b/fail2ban/server/jails.py
|
||||
index 972a8c4bd..27e12ddf6 100644
|
||||
--- a/fail2ban/server/jails.py
|
||||
+++ b/fail2ban/server/jails.py
|
||||
@@ -22,7 +22,10 @@
|
||||
__license__ = "GPL"
|
||||
|
||||
from threading import Lock
|
||||
-from collections import Mapping
|
||||
+try:
|
||||
+ from collections.abc import Mapping
|
||||
+except ImportError:
|
||||
+ from collections import Mapping
|
||||
|
||||
from ..exceptions import DuplicateJailException, UnknownJailException
|
||||
from .jail import Jail
|
||||
|
|
@ -18,6 +18,10 @@ Patch0: fail2ban-partof.patch
|
|||
# Fixes century selector for tests
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1912472
|
||||
Patch1: https://github.com/fail2ban/fail2ban/commit/f259dac74721c00f0184bf45277137771fc747fe.patch
|
||||
# Python 3.10a5 compatibility
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1926201
|
||||
Patch2: https://github.com/fail2ban/fail2ban/compare/ea26509594a3220b012071604d73bb42d0ecae2c...py-3-10-alpha-5.patch
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue