I forwarded the above report to [email protected], though that list is rather inactive and it seems my email has not gone through (or it just hasn't yet shown up here http://sourceforge.net/mailarchive/forum.php?forum_name=wicd-devel)
Attached is a raw git commit with the following diffstat: commit 3fe12fe0d777102839f8c8a559a92995ff14810d (HEAD, master) Author: Isis Lovecruft <[email protected]> AuthorDate: Tue May 21 01:20:32 2013 +0000 Commit: Isis Lovecruft <[email protected]> CommitDate: Tue May 21 01:20:32 2013 +0000 Add 33-focus_property.patch to debian/patches/ and debian/patches/series. debian/patches/33-focus_property.patch | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 97 insertions(+) Also attached is the dquilt patch file, debian/patches/33-focus_property.patch. Thanks for all your work to maintain this! -- <(A)3 isis agora lovecruft GPG: 4096R/A3ADB67A2CDB8B35 Current Keys: https://blog.patternsinthevoid.net/isis.txt
commit 3fe12fe0d777102839f8c8a559a92995ff14810d tree 693f5b4948bccf986c6b98f42150c5785493c093 parent 88e44e48c14ccd7423338b2f16201abed4a2d327 author Isis Lovecruft <[email protected]> 1369099232 +0000 committer Isis Lovecruft <[email protected]> 1369099232 +0000 gpgsig -----BEGIN PGP SIGNATURE----- iQJuBAABCgBYBQJRmswtBYMB4TOASxSAAAAAABoAKGlzaXNAcGF0dGVybnNpbnRo ZXZvaWQubmV0MEE2QTU4QTE0QjU5NDZBQkRFMThFMjA3QTNBREI2N0EyQ0RCOEIz NQAKCRCjrbZ6LNuLNUf6D/9oos5KtZYvCYDUF2tpSnjIusaGe9+wCbM15g87TuR0 0D+3daHIW2BTprylvzEvhftLrwTCmpirj7xCQ7077+gkEjd+k1NIdAnTjXJokDAE 0AVHRESM3/wIndr2rmDLYFlkiaVqnfyPcUThM8hPthVzsrRNfBfB0Y1CMzW6gG+I TZAKhHZdAGK61A1KARrRp+6HSoqW1KPIeh2t9rtR//Ag+035ZoOWw6vEegZPCo4V oQag+SdfjLmixkZ22uVniFaxaGE6TgG1qFKWsxwH8G0O51StNKv+oOAwhbij69BT Lx4mAsp9KKDPoYIk/B/omKIbni8U4crCuBddUiOIcQ+Wu162/MoHM2tpQRBXGuQX WSDpkmKkx3IG667+O6tShp0BTBpAYCroac7RXcqJZm+S+TeE+bbnqdH4PB41ogb4 c1g5yav7UtVV/cks+Dl3cc9TqdS0Kv7fhuU1hUlVNo8AnlPAAwgfp95Ul2sFslHs 4iux0jqx75cySRQFgl4YvK1bAH6l+e1XBpMWTkQOi6njvQid0OvxJQsOURtYQS3u +ip6mpXcsMm2j6sux2LhTq9Z8iBqNMAKoDC2jBuizaQcQiyzRm6hQFmeX4bJrOz7 kCST6dI0F14NckP80fo7AaHIVdJRGT1sWlOsrt36pUc5UHHTxxoxtEtnrofXAOlm eQ== =9wfA -----END PGP SIGNATURE----- Add 33-focus_property.patch to debian/patches/ and debian/patches/series. diff --git a/debian/patches/33-focus_property.patch b/debian/patches/33-focus_property.patch new file mode 100644 index 0000000..17ea720 --- /dev/null +++ b/debian/patches/33-focus_property.patch @@ -0,0 +1,96 @@ +Description: fix AttributeError for self.focus property +Forwarded: yes [email protected] +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=709120 +Author: Isis Agora Lovecruft <[email protected]> +Last-Update: 2013-05-21 + +Fixes a bug due to setting inherited property without overriding parent methods. + + * In curses_misc.py, the class ComboBox(urwid.WidgetWrap) attempts to set set + the attribute 'self.focus' in the method ComboBox.__init__(), though in + urwid.WidgetWrap 'focus' in a property. Because it the 'focus' property is + inherited, the @property methods for it must either: + + 1) If the desire is to reuse the parent class, urwid.WidgetWrap, methods, + do: + + @property + def focus(self): return super(ComboBox, self)._get_focus() + @property.setter + def focus(self, index): return super(ComboBox, self)._set_focus(index) + @property.deleter + def focus(self): return super(ComboBox, self)._del_focus() + + 2) If the desire is to create new property descriptors, do: + + def __init__(self, focus, [...]): + [...] + self._focus = focus + + @property + def focus(self): return self._focus + @property.setter + def focus(self, index): self._focus = index + @property.deleter + def focus(self): del self._focus + + I went with #2. +--- a/curses/curses_misc.py ++++ b/curses/curses_misc.py +@@ -314,9 +314,9 @@ + #Send key to underlying widget: + self._w.keypress(dim, k) + +- #def get_size(self): +- +- def __init__(self,label='',list=[],attrs=('body','editnfc'),focus_attr='focus',use_enter=True,focus=0,callback=None,user_args=None): ++ def __init__(self, label='', list=[], attrs=('body','editnfc'), ++ focus_attr='focus', use_enter=True, focus=0, callback=None, ++ user_args=None): + """ + label : bit of text that preceeds the combobox. If it is "", then + ignore it +@@ -348,9 +348,7 @@ + + # We need this to pick our keypresses + self.use_enter = use_enter +- +- self.focus = focus +- ++ self._focus = focus + self.callback = callback + self.user_args = user_args + +@@ -358,10 +356,23 @@ + self.parent = None + self.ui = None + self.row = None ++ ++ @property ++ def focus(self): ++ return self._focus ++ ++ @focus.setter ++ def focus(self, index): ++ self._focus = index ++ ++ @focus.deleter ++ def focus(self): ++ del self._focus ++ + def set_list(self,list): + self.list = list + +- def set_focus(self,index): ++ def set_focus(self, index): + self.focus = index + # API changed between urwid 0.9.8.4 and 0.9.9 + try: +@@ -373,6 +384,7 @@ + + def rebuild_combobox(self): + self.build_combobox(self.parent,self.ui,self.row) ++ + def build_combobox(self,parent,ui,row): + str,trash = self.label.get_text() + diff --git a/debian/patches/series b/debian/patches/series index d6f65fb..b902fe3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ 04-fix_resolv.conf_backup-restore.patch 26-support_etc-network_scripts.patch 32-prefer_gksu.patch +33-focus_property.patch
Description: fix AttributeError for self.focus property Forwarded: yes [email protected] Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=709120 Author: Isis Agora Lovecruft <[email protected]> Last-Update: 2013-05-21 Fixes a bug due to setting inherited property without overriding parent methods. * In curses_misc.py, the class ComboBox(urwid.WidgetWrap) attempts to set set the attribute 'self.focus' in the method ComboBox.__init__(), though in urwid.WidgetWrap 'focus' in a property. Because it the 'focus' property is inherited, the @property methods for it must either: 1) If the desire is to reuse the parent class, urwid.WidgetWrap, methods, do: @property def focus(self): return super(ComboBox, self)._get_focus() @property.setter def focus(self, index): return super(ComboBox, self)._set_focus(index) @property.deleter def focus(self): return super(ComboBox, self)._del_focus() 2) If the desire is to create new property descriptors, do: def __init__(self, focus, [...]): [...] self._focus = focus @property def focus(self): return self._focus @property.setter def focus(self, index): self._focus = index @property.deleter def focus(self): del self._focus I went with #2. --- a/curses/curses_misc.py +++ b/curses/curses_misc.py @@ -314,9 +314,9 @@ #Send key to underlying widget: self._w.keypress(dim, k) - #def get_size(self): - - def __init__(self,label='',list=[],attrs=('body','editnfc'),focus_attr='focus',use_enter=True,focus=0,callback=None,user_args=None): + def __init__(self, label='', list=[], attrs=('body','editnfc'), + focus_attr='focus', use_enter=True, focus=0, callback=None, + user_args=None): """ label : bit of text that preceeds the combobox. If it is "", then ignore it @@ -348,9 +348,7 @@ # We need this to pick our keypresses self.use_enter = use_enter - - self.focus = focus - + self._focus = focus self.callback = callback self.user_args = user_args @@ -358,10 +356,23 @@ self.parent = None self.ui = None self.row = None + + @property + def focus(self): + return self._focus + + @focus.setter + def focus(self, index): + self._focus = index + + @focus.deleter + def focus(self): + del self._focus + def set_list(self,list): self.list = list - def set_focus(self,index): + def set_focus(self, index): self.focus = index # API changed between urwid 0.9.8.4 and 0.9.9 try: @@ -373,6 +384,7 @@ def rebuild_combobox(self): self.build_combobox(self.parent,self.ui,self.row) + def build_combobox(self,parent,ui,row): str,trash = self.label.get_text()
signature.asc
Description: Digital signature

