pygments >= 2.12

momat at man.poznan.pl momat at man.poznan.pl
Tue Jan 6 12:38:08 UTC 2026


I've recently installed kallithea (repo tip) on Devuan Excalibur
(no systemd Debian 13 equivalent). I used as many Python packages
from the distribution and only installed with pip what was necessary.
This way I ended up using pygments 2.18 (used by markdown). I found
a bug and a simple solution related to an API change in pygments 2.12.

In the past the wrap method required the "outfile" attribute. It
was passed but never used, so in 2.12 it was removed. As a result,
kallithea fails to render markdown document. To fix it while
maintaining backward compatibility with older pygments this change
to kallithea/lib/helpers.py (line 165) is enough:

def wrap(self, source, outfile=None):

It makes the "outfile" an optional keyword attribute so it still
works when it is missing.

-- 
I hope this helps,
Pawel



More information about the kallithea-general mailing list