Univention Bugzilla – Bug 52658
Migrate UDM components of UCS@school to Python 3
Last modified: 2021-07-01 12:08:18 CEST
The UDM modules/hooks/syntaces of UCS@school need to be Python 3 compatible. ucs-school-import/modules/univention/admin/hooks.d/schoolOU.py ucs-school-import/modules/univention/admin/hooks.d/schoolAdminGroup.py ucs-school-import/udm_hook/ucsschool_user_options.py ucs-school-import/udm_hook/ucsschool_purge_timestamp.py ucs-school-import/udm_hook/ucsschool_role_computers.py ucs-school-import/syntax/syntax.ucs-school-import.py
The list was missing: ucs-school-umc-helpdesk/modules/univention/admin/handlers/settings/console_helpdesk.py
ucs-school-import.yaml 88c93d17e76c | Bug #52658: migrate UDM hooks to be python3 compatible ucs-school-import (17.0.61) 88c93d17e76c | Bug #52658: migrate UDM hooks to be python3 compatible ucs-school-umc-helpdesk.yaml 1e82b0b6e6af | Bug #52658: migrate settings/console_helpdesk to Python 3 ucs-school-umc-helpdesk (15.0.0-4) 1e82b0b6e6af | Bug #52658: migrate settings/console_helpdesk to Python 3
Before commiting to the UCS@school repository (in all branches), please use the pre-commit hooks. For installation instructions see: https://pre-commit.com/ Basically that's: $ curl https://pre-commit.com/install-local.py | python - $ cd git/ucsschool $ pre-commit install --install-hooks Then the provided Makefile can be used to run the formatters and linters without invoking "git commit" and without additional virtualenvs: $ make # see available options $ make lint # This checks python files modified by you. $ make lint-all # This checks all python files in the repository $ make format # This formats all changed python files. $ make format-all # This formats all python files in the repository
Fixed the pre-commit (black, isort) issues: ucs-school-umc-helpdesk (15.0.0-5) df383bc46ab2 | fixup! Bug #52658: migrate settings/console_helpdesk to Python 3 ucs-school-import (17.0.63) bded3c306496 | fixup! Bug #52658: migrate UDM hooks to be python3 compatible
OK: code review OK: Debian package updates OK: manual tests of UDM hooks and modules Reopen: The UMC files of package ucs-school-umc-helpdesk are missing and thus the UMC module does not work anymore.
(In reply to Daniel Tröder from comment #6) > Reopen: The UMC files of package ucs-school-umc-helpdesk are missing and > thus the UMC module does not work anymore. Oh yes, dh-umc-module-install was missing. Fixed in: ucs-school-umc-helpdesk (15.0.0-5) f7247cb5888c | fixup! Bug #52589: migrate ucs-school-umc-helpdesk to dh_python 2bff5f2a5192 | fixup! Bug #52589: migrate ucs-school-umc-helpdesk to dh_python 13e49f6d748f | fixup! Bug #52589: migrate ucs-school-umc-helpdesk to dh_python
OK: Helpdesk UMC module works as expected.
I had errors in the hook schoolOU.py: * None should be used in the modlist instead of [b''] to remove a value. * Since we decode object classes we don't need OBJECTCLASS_SCHOOLOU to be bytestring. * Since container/ou provides modules options since 2016 we don't need hook_open() anymore. fixed in: ucs-school-import (17.0.66) 0d4582b79d08 | fixup! Bug #52658: migrate UDM hooks to be python3 compatible Package: ucs-school-import Version: 17.0.66A~4.4.0.202106071217 Branch: ucs_4.4-0 Scope: ucs-school-4.4
OK: fix code review OK: manual test OK: Jenkins tests OK: package updates
Errata updates for UCS@school 4.4 v9 have been released. https://docs.software-univention.de/changelog-ucsschool-4.4v9-de.html If this error occurs again, please clone this bug.