Date: Sunday, April 23, 2023 @ 20:57:19
  Author: kpcyrd
Revision: 1448429

upgpkg: python-stem 1.8.1-2 - port to python 3.11

Added:
  python-stem/trunk/python3-11.patch
Modified:
  python-stem/trunk/PKGBUILD

------------------+
 PKGBUILD         |    9 ++++++---
 python3-11.patch |   39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-04-23 20:41:54 UTC (rev 1448428)
+++ PKGBUILD    2023-04-23 20:57:19 UTC (rev 1448429)
@@ -4,7 +4,7 @@
 pkgname=python-stem
 _pypiname=${pkgname#*-}
 pkgver=1.8.1
-pkgrel=1
+pkgrel=2
 pkgdesc='Python controller library for Tor'
 url='https://stem.torproject.org/'
 arch=('any')
@@ -14,9 +14,11 @@
 optdepends=('tor: tor-server to talk to')
 replaces=('stem')
 provides=('stem')
-source=(https://files.pythonhosted.org/packages/source/${_pypiname::1}/${_pypiname}/${_pypiname}-${pkgver}.tar.gz{,.asc})
+source=(https://files.pythonhosted.org/packages/source/${_pypiname::1}/${_pypiname}/${_pypiname}-${pkgver}.tar.gz{,.asc}
+        python3-11.patch)
 sha256sums=('81d43a7c668ba9d7bc1103b2e7a911e9d148294b373d27a59ae8da79ef7a3e2f'
-            'SKIP')
+            'SKIP'
+            '8d5b906ec0a007946a943516e0bb997e0fcf10a6544bca893ce06600c6114d4c')
 validpgpkeys=('68278CC5DD2D1E85C4E45AD90445B7AB9ABBEEC6') # Damian Johnson 
(www.atagar.com) <[email protected]>
 
 prepare() {
@@ -30,6 +32,7 @@
     -e '/|test.integ.installation.TestInstallation/d' \
     -e '/|test.integ.control.controller.TestController/d'
   rm 
test/integ/{client/connection,{installation,process},control/controller}.py
+  patch -Np1 -i ../python3-11.patch
 }
 
 build() {

Added: python3-11.patch
===================================================================
--- python3-11.patch                            (rev 0)
+++ python3-11.patch    2023-04-23 20:57:19 UTC (rev 1448429)
@@ -0,0 +1,39 @@
+diff --git a/stem/control.py b/stem/control.py
+index e192e295..e6fab6cf 100644
+--- a/stem/control.py
++++ b/stem/control.py
+@@ -474,7 +474,7 @@ def with_default(yields = False):
+ 
+   def decorator(func):
+     def get_default(func, args, kwargs):
+-      arg_names = inspect.getargspec(func).args[1:]  # drop 'self'
++      arg_names = inspect.getfullargspec(func).args[1:]  # drop 'self'
+       default_position = arg_names.index('default') if 'default' in arg_names 
else None
+ 
+       if default_position is not None and default_position < len(args):
+diff --git a/stem/prereq.py b/stem/prereq.py
+index 4af6c093..4009c317 100644
+--- a/stem/prereq.py
++++ b/stem/prereq.py
+@@ -241,7 +241,7 @@ def is_mock_available():
+ 
+     # check for mock's new_callable argument for patch() which was introduced 
in version 0.8.0
+ 
+-    if 'new_callable' not in inspect.getargspec(mock.patch).args:
++    if 'new_callable' not in inspect.getfullargspec(mock.patch).args:
+       raise ImportError()
+ 
+     return True
+diff --git a/stem/util/conf.py b/stem/util/conf.py
+index 80399810..15c4db8b 100644
+--- a/stem/util/conf.py
++++ b/stem/util/conf.py
+@@ -285,7 +285,7 @@ def uses_settings(handle, path, lazy_load = True):
+         config.load(path)
+         config._settings_loaded = True
+ 
+-      if 'config' in inspect.getargspec(func).args:
++      if 'config' in inspect.getfullargspec(func).args:
+         return func(*args, config = config, **kwargs)
+       else:
+         return func(*args, **kwargs)

Reply via email to