Bug 48958 - unify pyhook loading code
unify pyhook loading code
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 4.4
Other Linux
: P5 normal (vote)
: UCS@school 4.4 v2
Assigned To: Daniel Tröder
Ole Schwiegert
:
: 48021 (view as bug list)
Depends on: 48021 48188 48189
Blocks: 49268
  Show dependency treegraph
 
Reported: 2019-03-12 07:09 CET by Daniel Tröder
Modified: 2019-04-09 14:23 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2019-03-12 07:09:50 CET
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.
Comment 1 Daniel Tröder univentionstaff 2019-03-13 16:56:15 CET
Loading and caching of ImportPyHook classes and objects is now simplified and centralized in ucsschool.importer.utils.import_pyhook.

The PyHooksLoader class can still be used, when class objects are required (e.g. in ucsschool.importer.utils.configuration_checks), but in most cases the convenience classes and functions are sufficient.

[4.4] 159343224 Bug #48958: fix wrong formatting
[4.4] 7f3301830 Bug #48958: add convenience wrapper for easy usage of PyHooksLoader
[4.4] bb2be4d4b Bug #48958: use new ImportPyHookLoader convenience functions
[4.4] 8e1a38ffd Bug #48958: improve type hints and py3 compatibility
[4.4] 9c8a292a9 Bug #48958: honor dry-run when ImportUser class is used directly
[4.4] 105731e4e Bug #48958: advisories

ucs-school-lib (12.1.0-1)
ucs-school-import (17.0.5-5)
ucs-school-umc-exam (9.0.0-3)
Comment 2 Daniel Tröder univentionstaff 2019-03-13 17:00:26 CET
*** Bug 48021 has been marked as a duplicate of this bug. ***
Comment 3 Ole Schwiegert univentionstaff 2019-03-18 09:38:54 CET
Changelog&Advisories: OK
Code read: OK
Testing was done during QA for some other bugs regarding the Pyhooks
Exam Mode tested with no problems.
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2019-04-01 00:44:11 CEST
UCS@school 4.4 v2 has been released.

https://docs.software-univention.de/changelog-ucsschool-4.4v2-de.html

If this error occurs again, please clone this bug.