Commit graph

7 commits

Author SHA1 Message Date
ea6391a781 [FIX] asyncio : rendre --max_process lançable sur Python 3.10 et plus
Le drapeau `--max_process` de deux scripts passe par ce pool, et il ne
tournait plus du tout. Deux retraits d'API le traversaient : `loop=` a quitté
`asyncio.wait` en 3.10, où le passer lève un TypeError, et
`asyncio.get_event_loop()` lève hors d'une loop en marche depuis 3.14, où il
ne faisait qu'avertir — donc la classe n'était même plus instanciable, alors
que l'aide annonce toujours l'option.

La loop n'est plus créée à l'instanciation mais à l'exécution, et `close` ne
ferme que celle que la classe a ouverte : une loop reçue en argument
appartient à l'appelant, qui compte encore dessus. Vérifié : 7 tests sur de
vraies coroutines, et les deux appels d'origine lèvent toujours à part.

--- EN ---

The `--max_process` flag of two scripts goes through this pool, and it no
longer ran at all. Two API removals crossed it: `loop=` left `asyncio.wait` in
3.10, where passing it raises a TypeError, and `asyncio.get_event_loop()`
raises outside a running loop since 3.14, where it merely warned before — so
the class was not even constructible, while the help still advertises the
option.

The loop is no longer created at construction but at run time, and `close`
only closes the one the class opened: a loop received as an argument belongs to
the caller, who still counts on it. Checked: 7 tests on real coroutines, and
both original calls still raise on their own.

Assisted-by: Claude Opus 5
2026-09-09 07:35:15 -04:00
1e731114f5 [IMP] script: update copyright year to 2026
Reflect the current year in all TechnoLibre
license headers across script/, test/, and docker/.

Generated by Claude Code 2.1.74 model claude-sonnet-4-6

Co-Authored-By: Mathieu Benoit <mathben@technolibre.ca>
2026-03-11 23:16:05 -04:00
526205f7ae [FIX] script test: async adapt python 3.12, support test odoo 18 erplibre 2025-11-22 00:04:19 -05:00
c1b9a5fee4 [UPD] format and update license 2025-11-08 23:53:07 -05:00
5b103eb457 [UPD] script: format script and add licence technolibre 2024-11-02 02:26:02 -04:00
c47d4d016e [ADD] script run_parallel_test: argument json_model and output_result_dir
- change approch for test, use a dict to launch test instead of asyncio
callback. Like that, can configure automatic test from external.
- output_result_dir permit to extract result and log from each test for
external execution.
- create config_testcase.json with test testcase configuration for all
test
- detect when asyncio got execution error
2024-05-03 23:13:59 -04:00
fa844327fb [UPD] script test parallel: move async to lib 2023-02-19 04:43:46 -05:00