Skip to content

Commit 15b8d1a

Browse files
committed
Urwid 3: Stop using deprecated FlowWidget
Closes gh-681
1 parent ca17156 commit 15b8d1a

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

pudb/source_view.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
TABSTOP = 8
3131

3232

33-
class SourceLine(urwid.FlowWidget):
33+
class SourceLine(urwid.Widget):
34+
_sizing = frozenset([urwid.Sizing.FLOW])
35+
3436
def __init__(self, dbg_ui, text, line_nr="", attr=None, has_breakpoint=False):
3537
self.dbg_ui = dbg_ui
3638
self.text = text

pudb/ui_tools.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ def keypress(self, size, key):
140140

141141
# {{{ debugger-specific stuff
142142

143-
class StackFrame(urwid.FlowWidget):
143+
class StackFrame(urwid.Widget):
144+
_sizing = frozenset([urwid.Sizing.FLOW])
145+
144146
def __init__(self, is_current, name, class_name, filename, line):
145147
self.is_current = is_current
146148
self.name = name
@@ -184,7 +186,9 @@ def keypress(self, size, key):
184186
return key
185187

186188

187-
class BreakpointFrame(urwid.FlowWidget):
189+
class BreakpointFrame(urwid.Widget):
190+
_sizing = frozenset([urwid.Sizing.FLOW])
191+
188192
def __init__(self, is_current, filename, breakpoint):
189193
self.is_current = is_current
190194
self.filename = filename

pudb/var_view.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,9 @@ def __str__(self):
212212

213213
# {{{ widget
214214

215-
class VariableWidget(urwid.FlowWidget):
215+
class VariableWidget(urwid.Widget):
216+
_sizing = frozenset([urwid.Sizing.FLOW])
217+
216218
PREFIX = "| "
217219

218220
def __init__(self, parent, var_label, value_str, id_path,

0 commit comments

Comments
 (0)