Univention Bugzilla – Bug 49268
[4.3] unify pyhook loading code
Last modified: 2023-03-25 06:42:16 CET
Backport to 4.3. +++ This bug was initially created as a clone of Bug #48958 +++ The UCS@school code loads different subclassses of PyHook with duplicate loading and caching code in multiple Python modules. Refactor to use a common function for all PyHook users.
Merged commits from 4.4 into 4.3: [4.3] b46ad27fe Bug #49268: fix wrong formatting [4.3] 89adf9be8 Bug #49268: add convenience wrapper for easy usage of PyHooksLoader [4.3] 72e236390 Bug #49268: use new ImportPyHookLoader convenience functions [4.3] 48523accb Bug #49268: improve type hints and py3 compatibility [4.3] 4d46651b4 Bug #49268: honor dry-run when ImportUser class is used directly [4.3] 029fd0a10 Bug #49268: advisories QA: * package builds will be done after merging Bug #49264 and Bug #49266 * running 90_ucsschool/2*hook* successfully should be enough as functional test.
Test failed: http://jenkins.knut.univention.de:8080/job/UCSschool-4.3/job/Install%20Singleserver/lastCompletedBuild/Config=s4-all-components,TestGroup=base1/testReport/90_ucsschool/246_import_user_config_pyhook/test/
Missed backporting ucs-test code from Bug #48189. [4.3] 526ff143c Bug #49268: check for preexisting hooks [4.3] 49b977071 Bug #49268: adapt tests to check_for_non_empty_pyhooks ucs-test-ucsschool (5.0.4-11)
What I tested (using the http api): Added a hook and imported -> OK Added additional a config hook and imported -> OK (different configs are used) 246_import_user_config_pyhook -> OK YAML -> OK