Bug#1051353: freecad: Can't create window in arch workbench

Petter Reinholdtsen pere at hungry.com
Thu Sep 7 06:46:26 BST 2023


Control: tags -1 + patch

For the record, I was mistaken about the problem also being present in
FreeCAD 0.21.  I was comparing against the wrong file locally to come to
this incorrect conclusion.  The follow change to the problematic
getargspec() calls are lifted from upstream.  Can you test to see if it
solve your problem?  There are other changes in 0.21 to this file, and I
am unsure if any of them are needed.  It might be a better idea to
upgrade FreeCAD in Debian to 0.21 instead of backporting this fix.

--- a/src/Mod/Draft/draftguitools/gui_snapper.py
+++ b/src/Mod/Draft/draftguitools/gui_snapper.py
@@ -1426,7 +1426,7 @@ class Snapper:
             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 @@ class Snapper:
             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)


-- 
Happy hacking
Petter Reinholdtsen



More information about the debian-science-maintainers mailing list