pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: py-curtsies with recent python3
Thanks, that was quick.
While here, there is also a problem with bpython-urwid using recent
pythons. The interface starts, but a single typed character leads to:
...
$ bpython-urwid
Traceback (most recent call last):
File "/usr/pkg/bin/bpython-urwid", line 11, in <module>
load_entry_point('bpython==0.16', 'console_scripts', 'bpython-urwid')()
File "/usr/pkg/lib/python3.7/site-packages/bpython/urwid.py", line
1317, in main
myrepl.main_loop.screen.run_wrapper(run_with_screen_before_mainloop)
File "/usr/pkg/lib/python3.7/site-packages/urwid/display_common.py",
line 773, in run_wrapper
return fn()
File "/usr/pkg/lib/python3.7/site-packages/bpython/urwid.py", line
1268, in run_with_screen_before_mainloop
myrepl.main_loop.run()
File "/usr/pkg/lib/python3.7/site-packages/urwid/main_loop.py", line
286, in run
self._run()
File "/usr/pkg/lib/python3.7/site-packages/urwid/main_loop.py", line
384, in _run
self.event_loop.run()
File "/usr/pkg/lib/python3.7/site-packages/urwid/main_loop.py", line
788, in run
self._loop()
File "/usr/pkg/lib/python3.7/site-packages/urwid/main_loop.py", line
825, in _loop
self._watch_files[fd]()
File "/usr/pkg/lib/python3.7/site-packages/urwid/raw_display.py",
line 404, in <lambda>
event_loop, callback, self.get_available_raw_input())
File "/usr/pkg/lib/python3.7/site-packages/urwid/raw_display.py",
line 502, in parse_input
callback(processed, processed_codes)
File "/usr/pkg/lib/python3.7/site-packages/urwid/main_loop.py", line
408, in _update
keys = self.input_filter(keys, raw)
File "/usr/pkg/lib/python3.7/site-packages/urwid/main_loop.py", line
547, in input_filter
return self._input_filter(keys, raw)
File "/usr/pkg/lib/python3.7/site-packages/bpython/urwid.py", line
289, in decoding_input_filter
converted_keys.append(key.decode(encoding))
AttributeError: 'str' object has no attribute 'decode'
....
which is from the decoding_input_filter function invoked in the main
loop, so I need:
...
--- bpython/urwid.py.ORIG 2019-05-07 10:56:38.629058215 +0100
+++ bpython/urwid.py 2019-05-07 11:12:52.751848960 +0100
@@ -612,7 +612,7 @@
self.main_loop = urwid.MainLoop(
self.frame, palette,
event_loop=event_loop, unhandled_input=self.handle_input,
- input_filter=input_filter, handle_mouse=False)
+ input_filter=None, handle_mouse=False)
# String is straight from bpython.cli
self.statusbar = Statusbar(config,
...
In this case decoding_input_filter is totally unnecessary (not to
mention its second parameter doesn't get used at all).
Surely it is an upstream buglet, but might be useful to someone who
wants to run it. Also, bpython-curses doesn't quite work - the
selection lists are shown empty, although tab-complete works.
On Tue, 7 May 2019 at 10:44, Adam <adam%netbsd.org@localhost> wrote:
>
> > Hi,
> >
> > Is there a way to conditionalise the requires.txt for this package,
> > based on the version of python in use, given that there is no
> > additional typing module for later pythons (I think the last to have
> > it was 3.4, but am not sure anymore)? This stops e.g. bpython from
> > working with these until
> > /usr/pkg/lib/python3.7/site-packages/curtsies-0.3.0-py3.7.egg-info/requires.txt
> > (for instance) is manually modified (by just taking 'typing' row out).
>
> Chavdar,
>
> I have fixed that by patching setup.py.
>
> Please, update your source tree, and give it a try.
>
> Thanks for reporting this.
>
> Kind regards,
> Adam
--
----
Home |
Main Index |
Thread Index |
Old Index