Sending SIGINT to the lite-server causes it to abort, not running any cleanup (i.e. finally blocks). This prevents collecting coverage data, as that data is only saved on clean interpreter shutdown.
lite-server
finally
coverage
After far too much bisection, I've tracked the problem down to importing the samba module (via ipaserver.dcerpc via the trust plugin).
samba
ipaserver.dcerpc
Just importing samba makes SIGINT cause Python to die, instead of raising KeyboardInterrupt. It's most likely due to the following braindead code in samba4-python's source4/scripting/python/pyglue.c:
KeyboardInterrupt
source4/scripting/python/pyglue.c
/* one of the most annoying things about python scripts is that they don't die when you hit control-C. This fixes that sillyness. As we do all database operations using transactions, this is also safe. */ signal(SIGINT, SIG_DFL);
This is a regression added in a7420c1. I've been using a workaround since then.
Upstream bug: https://bugzilla.samba.org/show_bug.cgi?id=9068
This needs to be put in the backlog, it only affects developers and there's no time now.
This was fixed upstream.
Metadata Update from @pviktori: - Issue assigned to pviktori - Issue set to the milestone: Ticket Backlog
Login to comment on this ticket.