15
0
forked from pool/python-cepa

- Add patch use-fullargspec.patch:

- Stop using a function that was removed in Python 3.11.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cepa?expand=0&rev=6
This commit is contained in:
2023-03-08 04:38:07 +00:00
committed by Git OBS Bridge
parent 2273f7a47b
commit 6ef5938ada
3 changed files with 34 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Mar 8 04:31:43 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch use-fullargspec.patch:
- Stop using a function that was removed in Python 3.11.
-------------------------------------------------------------------
Thu Oct 27 22:11:38 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-cepa
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -28,6 +28,7 @@ Source: https://files.pythonhosted.org/packages/source/c/cepa/cepa-%{ver
# PATCH-FIX-UPSTREAM mock.patch gh#onionshare/cepa#1 mcepl@suse.com
# Replace use of the external mock module with the one in stdlib.
Patch0: mock.patch
Patch1: use-fullargspec.patch
BuildRequires: %{python_module cryptography}
BuildRequires: %{python_module setuptools}
BuildRequires: %{pythons}

26
use-fullargspec.patch Normal file
View File

@@ -0,0 +1,26 @@
Index: cepa-1.8.4/stem/control.py
===================================================================
--- cepa-1.8.4.orig/stem/control.py
+++ cepa-1.8.4/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):
Index: cepa-1.8.4/stem/util/conf.py
===================================================================
--- cepa-1.8.4.orig/stem/util/conf.py
+++ cepa-1.8.4/stem/util/conf.py
@@ -285,7 +285,7 @@ def uses_settings(handle, path, lazy_loa
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)