Open O-ring opened 7 months ago
@penguinolog are you aware of this change?
@penguinolog are you aware of this change?
I can recheck everything, but I'm trying to cover all changes by tests + all explicit sizing properties changed by me are covered by unit tests . Fixed regressions also covered by specific tests
Stop: sizing
is normally defined by Widget
, without dirty magic all subclasses should have it
@wardi I'll check speedometer code on Monday morning.
Hello penguinolog,
I have applied your patch and now speedometer works with both urwid 2.3.4 and the 2.4.4 versions.
Thanks,
Marco
Hmm, better to properly merge fix on both sides before issue closing
I updated urwid to version 2.5 and now the speedometer works.
On startup these messages are reported:
/usr/lib64/python3.9/site-packages/Speedometer-2.9-py3.9.egg/EGG-INFO/scripts/speedometer.py:226: ColumnsWarning: <main.SpeedGraph object at 0x7f4b3d1b44c0> is not a Widget d = GraphDisplay(tap, smoothed) /usr/lib64/python3.9/site-packages/Speedometer-2.9-py3.9.egg/EGG-INFO/scripts/speedometer.py:226: ColumnsWarning: <main.SpeedGraph object at 0x7f4b3d1a6d30> is not a Widget d = GraphDisplay(tap, smoothed) /usr/lib64/python3.9/site-packages/urwid/widget/widget.py:112: ColumnsWarning: <main.SpeedGraph object at 0x7f4b3d1b44c0> is not Widget. canv = fn(self, size, focus=focus) /usr/lib64/python3.9/site-packages/urwid/widget/widget.py:112: ColumnsWarning: <main.SpeedGraph object at 0x7f4b3d1a6d30> is not Widget. canv = fn(self, size, focus=focus)
I updated urwid to version 2.5 and now the speedometer works.
On startup these messages are reported: Valid warnings and PR with fix is still open.
Hello everyone,
I get this error after upgrading from urwid 2.3.4 to 2.4.4
Traceback (most recent call last): File "/usr/bin/speedometer.py", line 4, in
import('pkg_resources').run_script('Speedometer==2.9', 'speedometer.py')
File "/usr/lib64/python3.9/site-packages/pkg_resources/init.py", line 651, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib64/python3.9/site-packages/pkg_resources/init.py", line 1455, in run_script
exec(script_code, namespace, namespace)
File "/usr/lib64/python3.9/site-packages/Speedometer-2.9-py3.9.egg/EGG-INFO/scripts/speedometer.py", line 1421, in
File "/usr/lib64/python3.9/site-packages/Speedometer-2.9-py3.9.egg/EGG-INFO/scripts/speedometer.py", line 992, in console
File "/usr/lib64/python3.9/site-packages/Speedometer-2.9-py3.9.egg/EGG-INFO/scripts/speedometer.py", line 997, in do_display
File "/usr/lib64/python3.9/site-packages/Speedometer-2.9-py3.9.egg/EGG-INFO/scripts/speedometer.py", line 279, in main
File "/usr/lib64/python3.9/site-packages/urwid/event_loop/main_loop.py", line 343, in run
self._run()
File "/usr/lib64/python3.9/site-packages/urwid/event_loop/main_loop.py", line 445, in _run
self.event_loop.run()
File "/usr/lib64/python3.9/site-packages/urwid/event_loop/select_loop.py", line 182, in run
self._loop()
File "/usr/lib64/python3.9/site-packages/urwid/event_loop/select_loop.py", line 224, in _loop
alarm_callback()
File "/usr/lib64/python3.9/site-packages/urwid/event_loop/main_loop.py", line 652, in entering_idle
self.draw_screen()
File "/usr/lib64/python3.9/site-packages/urwid/event_loop/main_loop.py", line 669, in draw_screen
canvas = self._topmost_widget.render(self.screen_size, focus=True)
File "/usr/lib64/python3.9/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/overlay.py", line 784, in render
bottom_c = self.bottom_w.render(real_size)
File "/usr/lib64/python3.9/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/attr_map.py", line 151, in render
canv = self._original_widget.render(size, focus=focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/columns.py", line 899, in render
w.render(w_size, focus=focus and self.focus_position == i),
File "/usr/lib64/python3.9/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/pile.py", line 795, in render
canv = w.render(w_size, focus=focus and item_focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/widget.py", line 780, in render
canv = get_delegate(self).render(size, focus=focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/frame.py", line 604, in render
body = self.body.render((maxcol, maxrow - ftrim - htrim), focus and self.focus_part == "body")
File "/usr/lib64/python3.9/site-packages/urwid/widget/widget.py", line 112, in cachedrender
canv = fn(self, size, focus=focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/columns.py", line 887, in render
widths, , size_args = self.get_column_sizes(size, focus)
File "/usr/lib64/python3.9/site-packages/urwid/widget/columns.py", line 822, in get_column_sizes
w_sizing = widget.sizing()
AttributeError: 'SpeedGraph' object has no attribute 'sizing'