pygments >= 2.12
Mads Kiilerich
mads at kiilerich.com
Tue Jan 6 21:43:18 UTC 2026
Hi Pawel
Thanks. I have applied the fix.
Note that the setup.py install procedure makes it clear that Kallithea
currently only supports pygments < 2.8 . You might encounter other
problems by using unsupported versions. Other libraries might cause even
more serious problems.
It would however be nice to bump the officially supported pygments
version. And to keep the changes simple, perhaps drop support
for pygments < 2.8 ... at least for running the tests. Updating pygments
will unblock the upgrade of other libraries ... which might expose other
problems, which makes it more risky and non-trivial.
Regards,
Mads
On 06/01/2026 13:38, momat at man.poznan.pl wrote:
> 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.
>
More information about the kallithea-general
mailing list