Univention Bugzilla – Bug 51996
Migration univention-appcenter-control script to Python 3
Last modified: 2022-10-06 22:56:34 CEST
App developers can use the `univention-appcenter-control` script to interact with the App Provider Portal via an upload interface, see https://docs.software-univention.de/app-provider.html#upload-interface The script is written in Python 2 and should be migrated to Python 3.
Created attachment 10487 [details] Result after running 2-to-3 It could be an easy fix. I just ran `2-to-3` on the script and the patch is very small. But I cannot tell, what else may need to be considered.
Please use six.with_metaclass() and from six.moves import input().
(In reply to Florian Best from comment #2) > Please use six.with_metaclass() and from six.moves import input(). Please do not do that. The script runs on the laptop of any App Provider. They may not have six installed. Also, there is no need to support Python 2 and 3 at the same time.
Is this necessary for UCS 5.0?
An app developer complained about the script being Python 2. It's the only script on the system where Python 2 is needed.
Created attachment 10947 [details] patch
Created attachment 10948 [details] patch (with argparse --required=True for subparsers)
Created attachment 10949 [details] Replace UMC Auth with HTTP basic auth On top of the patch another patch to use basic HTTP auth which improves speed by re-using opened module processes.
MR: https://git.knut.univention.de/univention/internal/univention-management-console-module-appcenter-selfservice/-/merge_requests/2
e50b068586d7 | Bug #51996: use HTTP basic auth e19f7874b449 | Bug #51996: migrate univention-appcenter-control to Python 3
Script now works with python3 (only)