Notification time stamped 2023-03-31 22:34:03 UTC
From 4aef760552acf5da3c4ea85bbfe669e0b8d6e97c Mon Sep 17 00:00:00 2001
From: Richard Shaw <hobbes1069(a)gmail.com>
Date: Feb 08 2021 23:54:46 +0000
Subject: Add patch for Python 3.10a5 compatibility.
---
diff --git a/ea26509594a3220b012071604d73bb42d0ecae2c...py-3-10-alpha-5.patch
b/ea26509594a3220b012071604d73bb42d0ecae2c...py-3-10-alpha-5.patch
new file mode 100644
index 0000000..c7f2c0f
--- /dev/null
+++ b/ea26509594a3220b012071604d73bb42d0ecae2c...py-3-10-alpha-5.patch
@@ -0,0 +1,80 @@
+From ad74e1c628b4fa2f67d8f7e342138e6e103832ea Mon Sep 17 00:00:00 2001
+From: "Sergey G. Brester" <serg.brester(a)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(a)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(a)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
diff --git a/fail2ban.spec b/fail2ban.spec
index 1eb8397..bb9e1f6 100644
--- a/fail2ban.spec
+++ b/fail2ban.spec
@@ -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/f259dac74721c00f0184bf4527713...
+# Python 3.10a5 compatibility
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1926201
+Patch2:
https://github.com/fail2ban/fail2ban/compare/ea26509594a3220b012071604d73...
+
BuildArch: noarch
https://src.fedoraproject.org/rpms/fail2ban/c/4aef760552acf5da3c4ea85bbfe...