details: https://code.tryton.org/tryton/commit/71f61bb7189f
branch: 8.2
user: Nicolas Évrard <[email protected]>
date: Wed Sep 23 10:50:27 2026 +0200
description:
Turn the assert on the threads after Pool initialization into an
exception
People running with PYTHONOPTIMIZE set deserve to know that something
is going
wrong
(grafted from 261e0c174ddf435fda240d13ae518cc961a47e8a)
diffstat:
trytond/trytond/application.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 891bdb4fd632 -r 71f61bb7189f trytond/trytond/application.py
--- a/trytond/trytond/application.py Tue Oct 06 13:53:41 2026 +0200
+++ b/trytond/trytond/application.py Wed Sep 23 10:50:27 2026 +0200
@@ -46,4 +46,7 @@
for thread in threads:
thread.join()
-assert len(threads := threading.enumerate()) == 1, f"len({threads}) != 1"
+if len(threads := threading.enumerate()) != 1:
+ raise RuntimeError(
+ f"There are {len(threads)} threads running after initializing"
+ " the Pool")