On Sun, Jun 09, 2024 at 04:55:32PM +0000, Bywater wrote: > >Synopsis: Certain key presses cause nyx-2.1.0p5 to crash > >Category: user, aarch64 > >Environment: > System : OpenBSD 7.5 > Details : OpenBSD 7.5-current (GENERIC.MP) #64: Fri Jun 7 00:47:53 MDT 2024 > dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP > > Architecture: OpenBSD.arm64 > Machine : arm64 > >Description: > > Running a Tor bridge using tor-0.4.8.11, with nyx-2.1.0p5 to monitor it. Nyx > is a command-line tool kind of like htop -- you can scroll up and down with > the arrow keys or mouse to look through logs, config file, connections, etc. > I had been using OpenBSD 7.5 stable with tor-0.4.8.10p0, nyx-2.1.0p4, and > python-3.10.14, and everything worked fine. Now, after upgrading to current, > pressing certain keys will cause nyx to exit back to the command line. Not > every key, only certain keys. They are:
> if inspect.getargspec(self._action).args == ['key']: > ^^^^^^^^^^^^^^^^^^ > AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: > 'getargs'? > $ getargspec() was deprecated for a while, still present in python 3.10 and removed from python 3.11. Using getfullargspec() instead should work. Can you try this patch? Index: Makefile =================================================================== RCS file: /cvs/ports/net/nyx/Makefile,v diff -u -p -r1.11 Makefile --- Makefile 6 May 2024 12:23:47 -0000 1.11 +++ Makefile 9 Jun 2024 17:12:53 -0000 @@ -2,7 +2,7 @@ COMMENT = terminal status monitor for T MODPY_EGG_VERSION = 2.1.0 DISTNAME = nyx-${MODPY_EGG_VERSION} -REVISION = 5 +REVISION = 6 CATEGORIES = net Index: patches/patch-nyx_panel___init___py =================================================================== RCS file: patches/patch-nyx_panel___init___py diff -N patches/patch-nyx_panel___init___py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-nyx_panel___init___py 9 Jun 2024 17:12:53 -0000 @@ -0,0 +1,12 @@ +Index: nyx/panel/__init__.py +--- nyx/panel/__init__.py.orig ++++ nyx/panel/__init__.py +@@ -78,7 +78,7 @@ class KeyHandler(collections.namedtuple('Help', ['key' + is_match = self._key_func(key) if self._key_func else key.match(self.key) + + if is_match: +- if inspect.getargspec(self._action).args == ['key']: ++ if inspect.getfullargspec(self._action).args == ['key']: + self._action(key) + else: + self._action() Index: patches/patch-test___init___py =================================================================== RCS file: patches/patch-test___init___py diff -N patches/patch-test___init___py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-test___init___py 9 Jun 2024 17:12:53 -0000 @@ -0,0 +1,12 @@ +Index: test/__init__.py +--- test/__init__.py.orig ++++ test/__init__.py +@@ -94,7 +94,7 @@ def render(func, *args, **kwargs): + nyx.curses.CURSES_SCREEN.erase() + start_time = time.time() + +- func_args = inspect.getargspec(func).args ++ func_args = inspect.getfullargspec(func).args + + if func_args[:1] == ['subwindow'] or func_args[:2] == ['self', 'subwindow']: + def _draw(subwindow):