Your message dated Thu, 12 Jan 2023 10:07:08 +0100
with message-id <[email protected]>
and subject line Re: crmsh: Fails with python3.11
has caused the Debian Bug report #1028510,
regarding crmsh: Fails with python3.11
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 [email protected]
immediately.)
--
1028510: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1028510
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: crmsh
Version: 4.4.0-3
Severity: serious
Tags: upstream patch
Dear Maintainer,
Your package fails with python3.11:
autopkgtest [17:21:55]: test pacemaker-node-status.sh: [-----------------------
+ DAEMON_TIMEOUT=60
+ CRM_TIMEOUT=5
+ ulimit -H -l unlimited
+ service corosync start
+ service pacemaker start
+ sleep 60
+ crm_node -n
+ NODE=node1
+ [ -z node1 ]
+ getent hosts node1
+ echo 127.0.0.1 node1
+ crm status
+ grep Online:.*node1
Traceback (most recent call last):
File "/usr/sbin/crm", line 35, in <module>
from crmsh import main
File "/usr/lib/python3/dist-packages/crmsh/main.py", line 17, in <module>
from . import ui_root
File "/usr/lib/python3/dist-packages/crmsh/ui_root.py", line 201, in <module>
Root.init_ui()
File "/usr/lib/python3/dist-packages/crmsh/command.py", line 503, in init_ui
prepare(children, child, aliases)
File "/usr/lib/python3/dist-packages/crmsh/command.py", line 488, in prepare
info = ChildInfo(child, cls)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/crmsh/command.py", line 558, in __init__
self.children = self.level.init_ui()
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/crmsh/command.py", line 503, in init_ui
prepare(children, child, aliases)
File "/usr/lib/python3/dist-packages/crmsh/command.py", line 488, in prepare
info = ChildInfo(child, cls)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/crmsh/command.py", line 558, in __init__
self.children = self.level.init_ui()
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/crmsh/command.py", line 503, in init_ui
prepare(children, child, aliases)
File "/usr/lib/python3/dist-packages/crmsh/command.py", line 494, in prepare
add_help(info)
File "/usr/lib/python3/dist-packages/crmsh/command.py", line 476, in add_help
ui_utils.pretty_arguments(info.function, nskip=2)),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/crmsh/ui_utils.py", line 116, in
pretty_arguments
specs = inspect.getargspec(f)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean:
'getargs'?
autopkgtest [17:22:56]: test pacemaker-node-status.sh: -----------------------]
autopkgtest [17:22:57]: test pacemaker-node-status.sh: - - - - - - - - - -
results - - - - - - - - - -
pacemaker-node-status.sh FAIL non-zero exit status 1
The attached patch resolves the issue by using inspect.getfullargspec() instead.
Kind Regards,
Bas
diff -Nru crmsh-4.4.0/debian/changelog crmsh-4.4.0/debian/changelog
--- crmsh-4.4.0/debian/changelog 2022-11-13 13:18:35.000000000 +0100
+++ crmsh-4.4.0/debian/changelog 2023-01-12 07:13:14.000000000 +0100
@@ -1,3 +1,10 @@
+crmsh (4.4.0-3.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Add patch to not use inspect.getargspec, removed from python3.11.
+
+ -- Bas Couwenberg <[email protected]> Thu, 12 Jan 2023 07:13:14 +0100
+
crmsh (4.4.0-3) unstable; urgency=medium
* d/patches: fix crmadmin parsing (Closes: #1023824)
diff -Nru crmsh-4.4.0/debian/patches/getargspec.patch
crmsh-4.4.0/debian/patches/getargspec.patch
--- crmsh-4.4.0/debian/patches/getargspec.patch 1970-01-01 01:00:00.000000000
+0100
+++ crmsh-4.4.0/debian/patches/getargspec.patch 2023-01-12 07:13:14.000000000
+0100
@@ -0,0 +1,24 @@
+Description: Don't use inspect.getargspec, removed in Python 3.11.
+Author: Bas Couwenberg <[email protected]>
+Forwarded: https://github.com/ClusterLabs/crmsh/pull/1112
+
+--- a/crmsh/ui_utils.py
++++ b/crmsh/ui_utils.py
+@@ -113,7 +113,7 @@ def pretty_arguments(f, nskip=0):
+ Returns a prettified representation
+ of the command arguments
+ '''
+- specs = inspect.getargspec(f)
++ specs = inspect.getfullargspec(f)
+ named_args = []
+ if specs.defaults is None:
+ named_args += specs.args
+@@ -140,7 +140,7 @@ def validate_arguments(f, args, nskip=0)
+
+ Note: Does not support keyword arguments.
+ '''
+- specs = inspect.getargspec(f)
++ specs = inspect.getfullargspec(f)
+ min_args = len(specs.args)
+ if specs.defaults is not None:
+ min_args -= len(specs.defaults)
diff -Nru crmsh-4.4.0/debian/patches/series crmsh-4.4.0/debian/patches/series
--- crmsh-4.4.0/debian/patches/series 2022-11-13 13:02:22.000000000 +0100
+++ crmsh-4.4.0/debian/patches/series 2023-01-12 07:11:27.000000000 +0100
@@ -13,3 +13,4 @@
0017-Fix-profiles-adoc.patch
0018-Fix-python3-install.patch
0019-Fix-crmadmin-parsing.patch
+getargspec.patch
--- End Message ---
--- Begin Message ---
fixed 1028510 crmsh/4.4.0-4
thanks
On 1/12/23 07:37, Bas Couwenberg wrote:
The attached patch resolves the issue by using inspect.getfullargspec() instead.
crmsh (4.4.0-4) includes the patch but did not close this issue in the
changelog.
Kind Regards,
Bas
--
GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146 50D1 6750 F10A E88D 4AF1
--- End Message ---