Subject: python3: documentation of sys.excepthook is inconsistent about SystemExit

From: Matthew Vernon <[email-masked]>
Date: Tue, 15 Feb 2022 10:31:29 +0000

Package: python3
Version: 3.9.2-3
Severity: normal
Tags: upstream

Hi,

sys.excepthook is called to handle any uncaught exception, other than SystemExit.

This behaviour is described correctly in help(sys).

help(sys.excepthook) and the web documentation[0] both lack the IMO
important fact that python doesn't call excepthook for SystemExit. It
would be nice if they did :)

Thanks,

Matthew

[0] https://docs.python.org/3.11/library/sys.html#sys.excepthook 

-- System Information:
Debian Release: 11.2
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-7-amd64 (SMP w/16 CPU threads)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages python3-minimal depends on:
ii  dpkg               1.20.9
ii  python3.9-minimal  3.9.2-1

python3-minimal recommends no packages.

python3-minimal suggests no packages.

-- no debconf information