[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1110098: marked as done (unblock: python-hpilo/4.4.3-5)



Your message dated Thu, 31 Jul 2025 17:44:55 +0000
with message-id <E1uhXKp-004h8n-1C@respighi.debian.org>
and subject line unblock python-hpilo
has caused the Debian Bug report #1110098,
regarding unblock: python-hpilo/4.4.3-5
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1110098: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1110098
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
X-Debbugs-Cc: python-hpilo@packages.debian.org, William Desportes <williamdes@wdes.fr>, Otto Kekäläinen <otto@debian.org>, Giacomo Paviano <pavianogiacomo@gmail.com>
Control: affects -1 + src:python-hpilo
User: release.debian.org@packages.debian.org
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 <otto@debian.org>  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 <team+python@tracker.debian.org>,
+Maintainer: Debian Python Team <team+python@tracker.debian.org>
 Uploaders: Emmanuel Arias <eamanu@debian.org>,
 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 <pavianogiacomo@gmail.com>
+Reviewed-By: Andrea Pappacoda <tachi@debian.org>
+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 <pavianogiacomo@gmail.com>
+Reviewed-By: Andrea Pappacoda <tachi@debian.org>
+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

--- End Message ---
--- Begin Message ---
Unblocked python-hpilo.

--- End Message ---

Reply to: