mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 15:43:49 +02:00
nyx: unbreak for python 3.11, adopt.
This commit is contained in:
parent
22080a571f
commit
1ac2fed929
2 changed files with 42 additions and 4 deletions
36
srcpkgs/nyx/patches/unbreak-for-python-3.11.patch
Normal file
36
srcpkgs/nyx/patches/unbreak-for-python-3.11.patch
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
From dcaddf2ab7f9d2ef8649f98bb6870995ebe0b893 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Juan Orti Alcaine <jortialc@redhat.com>
|
||||||
|
Date: Mon, 27 Jun 2022 19:38:34 +0200
|
||||||
|
Subject: [PATCH] Replace inspect.getargspec usage to support python 3.11
|
||||||
|
|
||||||
|
---
|
||||||
|
nyx/panel/__init__.py | 2 +-
|
||||||
|
test/__init__.py | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/nyx/panel/__init__.py b/nyx/panel/__init__.py
|
||||||
|
index 57ae1e30..99b36d38 100644
|
||||||
|
--- a/nyx/panel/__init__.py
|
||||||
|
+++ b/nyx/panel/__init__.py
|
||||||
|
@@ -78,7 +78,7 @@ def handle(self, 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()
|
||||||
|
diff --git a/test/__init__.py b/test/__init__.py
|
||||||
|
index b259f7b8..d9f0875c 100644
|
||||||
|
--- a/test/__init__.py
|
||||||
|
+++ b/test/__init__.py
|
||||||
|
@@ -94,7 +94,7 @@ def draw_func():
|
||||||
|
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):
|
|
@ -1,14 +1,16 @@
|
||||||
# Template file for 'nyx'
|
# Template file for 'nyx'
|
||||||
pkgname=nyx
|
pkgname=nyx
|
||||||
version=2.1.0
|
version=2.1.0
|
||||||
revision=5
|
revision=6
|
||||||
build_style=python3-module
|
build_style=python3-module
|
||||||
pycompile_module="nyx"
|
|
||||||
hostmakedepends="python3-setuptools"
|
hostmakedepends="python3-setuptools"
|
||||||
depends="python3-setuptools python3-stem tor"
|
depends="python3-setuptools python3-stem tor"
|
||||||
short_desc="Command-line status monitor for tor"
|
short_desc="Command-line status monitor for tor"
|
||||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
maintainer="Frank Steinborn <steinex@nognu.de>"
|
||||||
license="GPL-3.0-or-later"
|
license="GPL-3.0-or-later"
|
||||||
homepage="https://nyx.torproject.org/"
|
homepage="https://nyx.torproject.org/"
|
||||||
distfiles="${PYPI_SITE}/n/${pkgname}/${pkgname}-${version}.tar.gz"
|
distfiles="${PYPI_SITE}/n/nyx/nyx-${version}.tar.gz"
|
||||||
checksum=88521488d1c9052e457b9e66498a4acfaaa3adf3adc5a199892632f129a5390b
|
checksum=88521488d1c9052e457b9e66498a4acfaaa3adf3adc5a199892632f129a5390b
|
||||||
|
|
||||||
|
# tests fail due to needing a working TERM, etc.
|
||||||
|
make_check=no
|
||||||
|
|
Loading…
Add table
Reference in a new issue