details: https://code.tryton.org/tryton/commit/c37864848b9c
branch: 8.0
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 5a759e7ca238 -r c37864848b9c trytond/trytond/application.py
--- a/trytond/trytond/application.py Mon Oct 05 18:21:13 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")