Files @ fe050a93936b
Branch filter:

Location: kallithea/pytype_requirements.txt - annotation

mads
hg: Redirect Mercurial stdout/stderr to logging when running as WSGI

Any "console" output from Mercurial when Kallithea is running from WSGI
should end up in Kallithea's logs. That seems like a nice general feature.

This will however also solve another rare but more critical problem:

Mercurial is writing to sys.stdout / sys.stderr, using several layers of
wrapping. Since Mercurial 5.5 (with
https://repo.mercurial-scm.org/hg/rev/8e04607023e5 ), all writes are given a
memoryview.

Apache httpd mod_wsgi is invoking the WSGI with a custom mod_wsgi.Log injected
in sys.stdout / sys.stderr . This logger can however not handle memoryview -
https://github.com/GrahamDumpleton/mod_wsgi/issues/863 .
1
2
3
4
5
6
7
8
9
# Note: we support pytype on Python3.9
pytype==2021.4.1
# optional modules that we want for pytype checking
ipython
kajiki
psycopg2
python-ldap
python-pam
tgext.debugbar