public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/fail2ban] rawhide: Fix compatibility with Python 3.15
@ 2026-06-16 0:41 Charalampos Stratakis
0 siblings, 0 replies; only message in thread
From: Charalampos Stratakis @ 2026-06-16 0:41 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/fail2ban
Branch : rawhide
Commit : f618bbd73be36a634756c7a97202c510376ad877
Author : Charalampos Stratakis <cstratak@redhat.com>
Date : 2026-06-16T01:59:07+02:00
Stats : +36/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/fail2ban/c/f618bbd73be36a634756c7a97202c510376ad877?branch=rawhide
Log:
Fix compatibility with Python 3.15
- Resolves: rhbz#2423879
---
diff --git a/7528fce11b7de0d6df6152c2365540dc1d554561.patch b/7528fce11b7de0d6df6152c2365540dc1d554561.patch
new file mode 100644
index 0000000..d8a382b
--- /dev/null
+++ b/7528fce11b7de0d6df6152c2365540dc1d554561.patch
@@ -0,0 +1,33 @@
+From 7528fce11b7de0d6df6152c2365540dc1d554561 Mon Sep 17 00:00:00 2001
+From: "Sergey G. Brester" <github@sebres.de>
+Date: Thu, 1 Jan 2026 21:43:27 +0100
+Subject: [PATCH] refactor module loading to use exec_module: load_module is
+ deprecated;
+
+closes gh-4126
+---
+ fail2ban/server/utils.py | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/fail2ban/server/utils.py b/fail2ban/server/utils.py
+index 02a6bc6db9..133add24b9 100644
+--- a/fail2ban/server/utils.py
++++ b/fail2ban/server/utils.py
+@@ -29,6 +29,7 @@
+ import sys
+ from threading import Lock
+ import time
++import types
+ from ..helpers import getLogger, _merge_dicts, uni_decode
+ from collections import OrderedDict
+
+@@ -352,6 +353,7 @@ def pid_exists(pid):
+ def load_python_module(pythonModule):
+ pythonModuleName = os.path.splitext(
+ os.path.basename(pythonModule))[0]
+- mod = importlib.machinery.SourceFileLoader(
+- pythonModuleName, pythonModule).load_module()
++ ldr = importlib.machinery.SourceFileLoader(pythonModuleName, pythonModule)
++ mod = types.ModuleType(ldr.name)
++ ldr.exec_module(mod)
+ return mod
diff --git a/fail2ban.spec b/fail2ban.spec
index 0df341a..c536f8e 100644
--- a/fail2ban.spec
+++ b/fail2ban.spec
@@ -53,6 +53,9 @@ Patch5: https://github.com/fail2ban/fail2ban/commit/54c0effceb998b73545073ac59c4
# Needed for Dovecot change to loging format in 2.4, fixed in f2b version 1.1.1.
# https://bugzilla.redhat.com/show_bug.cgi?id=2426440
Patch6: https://github.com/fail2ban/fail2ban/commit/04ff4c060cdc233af9a6deeb85a6523da0416f31.patch
+# Fix compatibility with Python 3.15
+# https://bugzilla.redhat.com/show_bug.cgi?id=2423879
+Patch7: https://github.com/fail2ban/fail2ban/commit/7528fce11b7de0d6df6152c2365540dc1d554561.patch
BuildArch: noarch
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-16 0:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-16 0:41 [rpms/fail2ban] rawhide: Fix compatibility with Python 3.15 Charalampos Stratakis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox