public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Charalampos Stratakis <cstratak@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/fail2ban] rawhide: Fix compatibility with Python 3.15
Date: Tue, 16 Jun 2026 00:41:22 GMT	[thread overview]
Message-ID: <178157048282.1.983951786368107182.rpms-fail2ban-f618bbd73be3@fedoraproject.org> (raw)

            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

                 reply	other threads:[~2026-06-16  0:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178157048282.1.983951786368107182.rpms-fail2ban-f618bbd73be3@fedoraproject.org \
    --to=cstratak@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox