From 20023b376cf5ddcd159eb277342f8e5e84f108d4ae447f8eb1bcfb6ffcba5565 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 27 Oct 2022 13:10:35 +0000 Subject: [PATCH] - Remove no-inspect-getargspec.patch, because we unbundle bottle.py (gh#pympler/pympler#148). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pympler?expand=0&rev=17 --- no-inspect-getargspec.patch | 33 --------------------------------- python-Pympler.changes | 6 ++++++ python-Pympler.spec | 7 ++++--- 3 files changed, 10 insertions(+), 36 deletions(-) delete mode 100644 no-inspect-getargspec.patch diff --git a/no-inspect-getargspec.patch b/no-inspect-getargspec.patch deleted file mode 100644 index d65043e..0000000 --- a/no-inspect-getargspec.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- - pympler/util/bottle.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/pympler/util/bottle.py -+++ b/pympler/util/bottle.py -@@ -41,7 +41,7 @@ import base64, cgi, email.utils, functoo - from datetime import date as datedate, datetime, timedelta - from tempfile import TemporaryFile - from traceback import format_exc, print_exc --from inspect import getargspec -+from inspect import getfullargspec - from unicodedata import normalize - - -@@ -554,7 +554,7 @@ class Route(object): - ''' Return a list of argument names the callback (most likely) accepts - as keyword arguments. If the callback is a decorated function, try - to recover the original function before inspection. ''' -- return getargspec(self.get_undecorated_callback())[0] -+ return getfullargspec(self.get_undecorated_callback())[0] - - def get_config(self, key, default=None): - ''' Lookup a config field and return its value, first checking the -@@ -2645,7 +2645,7 @@ def yieldroutes(func): - d(x=5, y=6) -> '/d' and '/d/' and '/d//' - """ - path = '/' + func.__name__.replace('__','/').lstrip('/') -- spec = getargspec(func) -+ spec = getfullargspec(func) - argc = len(spec[0]) - len(spec[3] or []) - path += ('/<%s>' * argc) % tuple(spec[0][:argc]) - yield path diff --git a/python-Pympler.changes b/python-Pympler.changes index 2a0cd26..b69a8a4 100644 --- a/python-Pympler.changes +++ b/python-Pympler.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Oct 27 12:15:13 UTC 2022 - Matej Cepl + +- Remove no-inspect-getargspec.patch, because we unbundle + bottle.py (gh#pympler/pympler#148). + ------------------------------------------------------------------- Wed Oct 26 21:16:00 UTC 2022 - Matej Cepl diff --git a/python-Pympler.spec b/python-Pympler.spec index 42ba494..09fd293 100644 --- a/python-Pympler.spec +++ b/python-Pympler.spec @@ -28,9 +28,7 @@ Source: https://files.pythonhosted.org/packages/source/P/Pympler/Pympler # PATCH-FIX-UPSTREAM pympler-flaky-tests.patch gh#pympler/pympler#90 mcepl@suse.com # More cycles needed with more recent versions of Python Patch0: pympler-flaky-tests.patch -# PATCH-FIX-UPSTREAM no-inspect-getargspec.patch gh#pympler/pympler#148 mcepl@suse.com -# Replaced removed method inspect.getargspec -Patch1: no-inspect-getargspec.patch +BuildRequires: %{python_module bottle} BuildRequires: %{python_module dbm} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} @@ -51,6 +49,9 @@ can easily be identified. %prep %autosetup -p1 -n Pympler-%{version} +# Remove bundled bottle (gh#pympler/pympler#148) +rm pympler/util/bottle.py + %build %python_build