Python 3.10 breaks fail2ban

Today I updated from Tumbleweed 20220612 to 20220613. Apparently that changed the default version of python3 from python3.8 to python3.10: symbolic link /usr/bin/python3 now points to python3.10, where it used to point to python3.8.

This causes fail2ban to fail to start:


2022-06-26 19:31:37,636 fail2ban.server         [1898]: INFO    Starting Fail2ban v0.11.2 
2022-06-26 19:31:37,637 fail2ban.observer       [1898]: INFO    Observer start... 
2022-06-26 19:31:37,646 fail2ban.database       [1898]: INFO    Connected to fail2ban persistent database '/var/lib/fail2ban/fail2ban.sqlite3' 
2022-06-26 19:31:37,648 fail2ban.jail           [1898]: INFO    Creating new jail 'sshd' 
2022-06-26 19:31:37,769 fail2ban.jail           [1898]: INFO    Jail 'sshd' uses systemd {} 
2022-06-26 19:31:37,772 fail2ban.jail           [1898]: INFO    Initiated 'systemd' backend 
2022-06-26 19:31:37,775 fail2ban.filter         [1898]: INFO      maxLines: 1 
2022-06-26 19:31:37,832 fail2ban.transmitter    [1898]: WARNING Command <very very long line, removed> has failed. Received SystemError("PY_SSIZE_T_CLEAN macro must be defined for '#' formats") 
2022-06-26 19:31:37,833 fail2ban                [1898]: ERROR   NOK: ("PY_SSIZE_T_CLEAN macro must be defined for '#' formats",)

It appears there has been a breaking change in Python 3.10, as mentioned in the answer in https://stackoverflow.com/questions/70999481/how-do-i-resolve-py-ssize-t-clean-macro-must-be-defined-for-formats-for-py

Has anyone seen this issue with fail2ban, or is there a solution?

Hi
You must be using tumbleweed-cli for your update, else your using zypper dup?

You are way behind the eight ball if only at 20220613, latest is 20220625 and eight snapshot releases between then, suggest you get to that and check again…

Yes, I am using zypper dup. What I forgot to mention: this is on a Raspberry Pi 4, for which updates are released less frequently.

I’ve now reverted back to 20220612 and fail2ban works again.

A new update seems to just have been released, as now the output of zypper dup shows:

The following product is going to be upgraded:
openSUSE Tumbleweed 20220612-0 -> 20220622-0

I will try that later.

Same issue in 20220622-0, I will stick to 20220612-0 for the time being and maybe create a bug report later.

Same issue for me.

I just updated to 20220706 (zypper dup) and the issue is gone now.