Bug 51235 - Migrate univention-management-console to Python 3
Migrate univention-management-console to Python 3
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4-4-errata
Assigned To: Florian Best
Johannes Keiser
:
Depends on:
Blocks: 51299 51353
  Show dependency treegraph
 
Reported: 2020-05-06 20:03 CEST by Florian Best
Modified: 2020-05-25 16:10 CEST (History)
4 users (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 Florian Best univentionstaff 2020-05-06 20:03:51 CEST
The Univention Management Console Server needs to be python 3 compatible.
Comment 1 Florian Best univentionstaff 2020-05-08 13:58:15 CEST
The UMC code has been migrated to be Python 3 compatible.

univention-management-console (11.0.4-73)
5875f2c77208 | Bug #51235: fix typo json.loads() → json.load()
e66ce4129c58 | Bug #51235: explicitly only catch error in json.load() not in the evaluation of ACL rules
689ee99c9937 | Bug #51235: catch more errors when using json.load()
56aef458a56a | Bug #51235: fix use of urlparse
b2909560821d | Bug #51235: migrate UMC-Server to python 3
5cd717d8ccf2 | Revert "Bug #51235: UMC: Add missing __init__.py"
c34674a0a470 | Bug #51235: fix fuzzy
11a4759f9fe2 | Bug #51235: UMC: migrate to use argparse
1c246aadef63 | Bug #51235: UMC: Workaround for API change in python3-daemon
7a894752968b | Bug #51235: UMC: Every module can specify the python version it is run with
f96ee9d0a1fc | Bug #51235: UMC: Replace pickle with JSON for ACL cache
d547739604aa | Bug #51235: UMC: Exception.with_traceback() is a method in python3
8fc4225d8728 | Bug #51235: UMC: Add Python 3 compatibility
ebfed71b4002 | Bug #51235: UMC: Fix import error
cac00b4745db | Bug #51235: UMC: Add missing __init__.py
d066e2906e26 | Bug #51235: UMC: Python input() compatibility
1ae0b4101c5a | Bug #51235: UMC: mypy annotations
d512cecdcc8d | Bug #51235: UMC: Adapt to Python 3 iterator protocol change

univention-management-console.yaml
b3e364f54046 | YAML Bug #51235

univention-ucs-translation-template (6.0.0-15)
1dc9efaedd5c | Bug #51235: fix python 3 compatibility for dh-umc-module-build

univention-ucs-translation-template.yaml
9a84f333c45e | YAML Bug #51235
Comment 2 Johannes Keiser univentionstaff 2020-05-13 13:42:52 CEST
OK: univention-management-console-server can be started with python3
OK: modules can be marked to be started with python3 (and they also run with python3)
OK: UMC still behaves the same under python2
OK: yaml
-> verified
Comment 3 Felix Botner univentionstaff 2020-05-14 15:16:37 CEST
there seems to be a collateral dammage in umc-set (umc-client)

this worked before:

umc-set -U atest1 -P univention4 -e -o '{"password": {"password": "univention4", "new_password": "univention5"}}'

now i get 

usage: usage: umc-set [options] command <arguments>
umc-set: error: too few arguments
Comment 4 Florian Best univentionstaff 2020-05-14 18:44:46 CEST
(In reply to Felix Botner from comment #3)
> there seems to be a collateral dammage in umc-set (umc-client)
> 
> this worked before:
> 
> umc-set -U atest1 -P univention4 -e -o '{"password": {"password":
> "univention4", "new_password": "univention5"}}'
> 
> now i get 
> 
> usage: usage: umc-set [options] command <arguments>
> umc-set: error: too few arguments

Oh right, it's been fixed in:

univention-management-console (11.0.4-76)
d992dbbef5a1 | Bug #51235: fix broken umc-client
Comment 5 Julia Bremer univentionstaff 2020-05-18 08:30:45 CEST
http://jenkins.knut.univention.de:8080/job/UCS-4.4/job/UCS-4.4-4/job/AutotestJoin/lastCompletedBuild/SambaVersion=s4,Systemrolle=master/testReport/59_udm/21_request_new_license/master091/

fails since your latest change with

[2020-05-18 01:11:33.409295] Captured stderr call-----------------------------
[2020-05-18 01:11:33.409304] Traceback (most recent call last):
[2020-05-18 01:11:33.409314]   File "/usr/sbin/umc-command", line 295, in <module>
[2020-05-18 01:11:33.409326]     arguments.arguments.insert(0, command)
[2020-05-18 01:11:33.409342] AttributeError: 'str' object has no attribute 'insert'
Comment 6 Florian Best univentionstaff 2020-05-18 12:51:21 CEST
Fixed in:

univention-management-console (11.0.4-77)
3020d1be0eff | Bug #51235: fix broken umc-client
Comment 7 Johannes Keiser univentionstaff 2020-05-20 11:36:46 CEST
OK: fixed positional arguments
-> verified