Bug#1031566: freecad-common: inspect.getargspec is used in gui_snapper.py which is no longer supported by python >= 3.10

Manfred Tremmmel Manfred.Tremmel at iiv.de
Sat Feb 18 18:53:31 GMT 2023


Package: freecad-common
Version: 0.20.2+dfsg1-4
Severity: normal
Tags: patch




-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-3-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de:en_US:en_GB
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- no debconf information

Recognized this error when trying the arch tutorials, I wasn't able to add doors or windows to the house.
The console has shown the error-message:
AttributeError: module 'inspect' has no attribute 'getargspec'.
-------------- next part --------------
--- gui_snapper.py.orig	2023-02-18 19:41:38.699975796 +0100
+++ gui_snapper.py	2023-02-18 19:41:15.843883848 +0100
@@ -1426,7 +1426,7 @@
             Gui.Snapper.off()
             self.ui.offUi()
             if callback:
-                if len(inspect.getargspec(callback).args) > 1:
+                if len(inspect.getfullargspec(callback).args) > 1:
                     obj = None
                     if self.snapInfo and ("Object" in self.snapInfo) and self.snapInfo["Object"]:
                         obj = App.ActiveDocument.getObject(self.snapInfo["Object"])
@@ -1445,7 +1445,7 @@
             Gui.Snapper.off()
             self.ui.offUi()
             if callback:
-                if len(inspect.getargspec(callback).args) > 1:
+                if len(inspect.getfullargspec(callback).args) > 1:
                     callback(None, None)
                 else:
                     callback(None)
-------------- next part --------------
--- gui_snapper.py.orig	2023-02-18 19:41:38.699975796 +0100
+++ gui_snapper.py	2023-02-18 19:41:15.843883848 +0100
@@ -1426,7 +1426,7 @@
             Gui.Snapper.off()
             self.ui.offUi()
             if callback:
-                if len(inspect.getargspec(callback).args) > 1:
+                if len(inspect.getfullargspec(callback).args) > 1:
                     obj = None
                     if self.snapInfo and ("Object" in self.snapInfo) and self.snapInfo["Object"]:
                         obj = App.ActiveDocument.getObject(self.snapInfo["Object"])
@@ -1445,7 +1445,7 @@
             Gui.Snapper.off()
             self.ui.offUi()
             if callback:
-                if len(inspect.getargspec(callback).args) > 1:
+                if len(inspect.getfullargspec(callback).args) > 1:
                     callback(None, None)
                 else:
                     callback(None)
-------------- next part --------------
--- gui_snapper.py.orig	2023-02-18 19:41:38.699975796 +0100
+++ gui_snapper.py	2023-02-18 19:41:15.843883848 +0100
@@ -1426,7 +1426,7 @@
             Gui.Snapper.off()
             self.ui.offUi()
             if callback:
-                if len(inspect.getargspec(callback).args) > 1:
+                if len(inspect.getfullargspec(callback).args) > 1:
                     obj = None
                     if self.snapInfo and ("Object" in self.snapInfo) and self.snapInfo["Object"]:
                         obj = App.ActiveDocument.getObject(self.snapInfo["Object"])
@@ -1445,7 +1445,7 @@
             Gui.Snapper.off()
             self.ui.offUi()
             if callback:
-                if len(inspect.getargspec(callback).args) > 1:
+                if len(inspect.getfullargspec(callback).args) > 1:
                     callback(None, None)
                 else:
                     callback(None)


More information about the debian-science-maintainers mailing list