Bug 53355 - Migrate univention-directory-notifier to Python 3
Migrate univention-directory-notifier to Python 3
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Notifier (univention-directory-notifier)
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-0-errata
Assigned To: Nikola Radovanovic
Philipp Hahn
: python3-migration
Depends on:
Blocks: 54204 56366 54203
  Show dependency treegraph
 
Reported: 2021-05-31 10:56 CEST by Florian Best
Modified: 2023-08-18 09:09 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): bitesize
Max CVSS v3 score:


Attachments
Patch univention-translog for Python 3 (1.07 KB, patch)
2021-07-05 12:59 CEST, Per Macha (ext)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2021-05-31 10:56:49 CEST
univention-directory-notifier should be migrated to be Python 3 compatible.

> management/univention-directory-notifier/univention-translog
Comment 1 Per Macha (ext) univentionstaff 2021-07-05 12:59:12 CEST
Created attachment 10761 [details]
Patch univention-translog for Python 3
Comment 2 Per Macha (ext) univentionstaff 2021-07-05 20:15:13 CEST
In "management/univention-directory-notifier/debian/control" replace "python-univention-lib" with "python3-univention-lib".
Comment 4 Nikola Radovanovic univentionstaff 2021-11-25 09:56:34 CET
13d0405998 | Make univention-translog prune idempotent
4b83c0e37b | Migrate univention-directory-notifier to Python 3
1bb9728302 | Advisory update
dc5ecb65d0 | Advisory update
Comment 5 Nikola Radovanovic univentionstaff 2021-11-25 16:19:05 CET
(In reply to Per Macha (ext) from comment #2)
> In "management/univention-directory-notifier/debian/control" replace
> "python-univention-lib" with "python3-univention-lib".

Replaced - sorry I miss this one
Comment 6 Arvid Requate univentionstaff 2021-11-25 17:15:21 CET
This looks like a small regression:

root@primary20:~# /usr/share/univention-directory-notifier/univention-translog 
Traceback (most recent call last):
  File "/usr/share/univention-directory-notifier/univention-translog", line 1444, in <module>
    exit(main())
  File "/usr/share/univention-directory-notifier/univention-translog", line 424, in main
    return opt.func(opt) or 0
AttributeError: 'Namespace' object has no attribute 'func'
Comment 7 Nikola Radovanovic univentionstaff 2021-11-25 18:26:38 CET
https://git.knut.univention.de/univention/ucs/-/merge_requests/192

Problem was due bit different way Python 3 handles argument parsing. It was not detected by 2to3 and also was not failing when some arguments were passed.
Comment 11 Nikola Radovanovic univentionstaff 2021-12-01 14:50:42 CET
4b83c0e37b | Migrate univention-directory-notifier to Python 3
1bb9728302 | Advisory update
dc5ecb65d0 | Advisory update
a35ba58c61 | update package dependency for python3
39818732c4 | Advisory update
858b07f42c | Advisory
bddd2c7b91 | Migrate univention-directory-notifier to Python 3
8aba5f0f7b | Advisory update
Comment 12 Philipp Hahn univentionstaff 2021-12-07 08:52:47 CET
OK: Code review
OK: apt install ucs-test-directory-notifier/apt
OK: ucs-test -E dangerous -s directory-notifier
OK: univention-join
FIXED: Python logging deprecation warning

[5.0-0] 74a8c4894b Bug #53355: univention-directory-notifier 14.0.5-5A~5.0.0.202112061402
 doc/errata/staging/univention-directory-notifier.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

[5.0-0] 7d49622914 style[univention-translog]: Fix deprecation
 doc/errata/staging/univention-directory-notifier.yaml        | 2 +-
 management/univention-directory-notifier/debian/changelog    | 6 ++++++
 management/univention-directory-notifier/univention-translog | 4 ++--
 3 files changed, 9 insertions(+), 3 deletions(-)

Package: univention-directory-notifier
Version: 14.0.5-5A~5.0.0.202112061402
Branch: ucs_5.0-0
Scope: errata5.0-0

I extended ucs/test/ucs-test/tests/25_directory-notifier/01_univention_translog_tool.py and while doing this noticed Bug #54203 and Bug #54204.

[5.0-0] e5fe3c0e68 test[univention-translog]: XFail bugs
 test/ucs-test/debian/changelog                                           |  6 ++++++
 test/ucs-test/debian/control                                             |  1 +
 test/ucs-test/tests/25_directory-notifier/01_univention_translog_tool.py | 15 +++++++++++----
 3 files changed, 18 insertions(+), 4 deletions(-)

[5.0-0] c8de0daefe doc[test]: PEP-484 type annotations
 test/ucs-test/univention/testing/conftest.py | 8 ++++++++
 1 file changed, 8 insertions(+)

[5.0-0] 4dc3aa7587 style[test]: Use set comprehension
 test/ucs-test/univention/testing/conftest.py | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

Package: ucs-test
Version: 10.0.6-81A~5.0.0.202112070832
Branch: ucs_5.0-0
Scope: errata5.0-0