Package: release.debian.org Severity: normal X-Debbugs-Cc: [email protected], William Desportes <[email protected]>, Otto Kekäläinen <[email protected]>, Giacomo Paviano <[email protected]> Control: affects -1 + src:python-hpilo User: [email protected] Usertags: unblock
Please unblock package python-hpilo A lot of different people in CC have been working on this package during debconf. Also upstream was involved. [ Reason ] Does not work at all. [ Impact ] William would have to use a windows laptop to administer this hardware. [ Tests ] Only manual testing is possible, William could test once again if requested. [ Risks ] Leaf package, minimal risk [ Checklist ] [x] all changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in testing -> here under [ Other info ] Have a nice day unblock python-hpilo/4.4.3-5 diff --git a/debian/changelog b/debian/changelog index 88f2f59..514ddc8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +python-hpilo (4.4.3-5) unstable; urgency=medium + + [ Alexandre Detiste ] + * Remove trailing comma from Maintainer: field that confused UDD & the + Tracker + + [ Giacomo Paviano ] + * Make `hpilo_cli get_product_name` Python3-compatible (Closes: #1109265) + + -- Otto Kekäläinen <[email protected]> Sat, 26 Jul 2025 11:02:42 -0700 + python-hpilo (4.4.3-4) unstable; urgency=medium * d/control: Adopt package. Add mysel as Uploaders. Closes: #888079. diff --git a/debian/control b/debian/control index ee96297..da4fc63 100644 --- a/debian/control +++ b/debian/control @@ -1,5 +1,5 @@ Source: python-hpilo -Maintainer: Debian Python Team <[email protected]>, +Maintainer: Debian Python Team <[email protected]> Uploaders: Emmanuel Arias <[email protected]>, Section: python Testsuite: autopkgtest-pkg-python diff --git a/debian/patches/python3-fixes-01.patch b/debian/patches/python3-fixes-01.patch new file mode 100644 index 0000000..ed6a024 --- /dev/null +++ b/debian/patches/python3-fixes-01.patch @@ -0,0 +1,28 @@ +Description: Fix AttributeError for 'im_func', 'func_code' in Python 3 + Simplified the introspection logic for hpilo.Ilo methods by unifying + Python 2 and 3 compatibility checks. This includes handling attributes + __code__/func_code and __defaults__/func_defaults. +Bug-Debian: https://bugs.debian.org/1109265 +Forwarded: https://github.com/seveas/python-hpilo/pull/302 +Author: Giacomo Paviano <[email protected]> +Reviewed-By: Andrea Pappacoda <[email protected]> +Last-Update: 2025-07-22 + +--- a/hpilo_cli ++++ b/hpilo_cli +@@ -251,12 +251,12 @@ def hpilo_help(option, opt_str, value, parser, exitcode=0): + else: + if value in ilo_methods: + import re, textwrap +- func = getattr(hpilo.Ilo, value).im_func +- code = func.func_code ++ func = getattr(hpilo.Ilo, value) if PY3 else getattr(hpilo.Ilo, value).im_func ++ code = func.__code__ if PY3 else func.func_code + args = '' + if code.co_argcount > 1: + args = code.co_varnames[:code.co_argcount] +- defaults = func.func_defaults or [] ++ defaults = func.__defaults__ if PY3 else func.func_defaults or [] + args = ["%s=%s" % (x, x.upper()) for x in args[:len(args)-len(defaults)]] + \ + ["[%s=%s]" % (x,str(y)) for x, y in zip(args[len(args)-len(defaults):], defaults) if x != 'progress'] + args = ' ' + ' '.join(args[1:]) diff --git a/debian/patches/python3-fixes-02.patch b/debian/patches/python3-fixes-02.patch new file mode 100644 index 0000000..df34526 --- /dev/null +++ b/debian/patches/python3-fixes-02.patch @@ -0,0 +1,20 @@ +Description: Fix SyntaxWarning for invalid escape sequence in re.sub + Replaced the regular expression '\s+' with a raw string r'\s+' to + resolve the SyntaxWarning: invalid escape sequence '\s'. +Bug-Debian: https://bugs.debian.org/1109265 +Forwarded: https://github.com/seveas/python-hpilo/pull/302 +Author: Giacomo Paviano <[email protected]> +Reviewed-By: Andrea Pappacoda <[email protected]> +Last-Update: 2025-07-22 + +--- a/hpilo_cli ++++ b/hpilo_cli +@@ -266,7 +266,7 @@ def hpilo_help(option, opt_str, value, parser, exitcode=0): + doc = re.sub(r':[a-z]+:`(.*?)`', r'\1', doc) + if 'API note' in doc: + doc = doc[:doc.find('API note')].strip() +- doc = re.sub('\s+', ' ', doc) ++ doc = re.sub(r'\s+', ' ', doc) + print(textwrap.fill(doc, 80)) + else: + print("No such method: %s" % value) diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..b818884 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,2 @@ +python3-fixes-01.patch +python3-fixes-02.patch

