summaryrefslogtreecommitdiff
path: root/dev-python/cherrypy/files/cherrypy-18.6.1-py311.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/cherrypy/files/cherrypy-18.6.1-py311.patch')
-rw-r--r--dev-python/cherrypy/files/cherrypy-18.6.1-py311.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/dev-python/cherrypy/files/cherrypy-18.6.1-py311.patch b/dev-python/cherrypy/files/cherrypy-18.6.1-py311.patch
new file mode 100644
index 000000000000..5d629dd8c333
--- /dev/null
+++ b/dev-python/cherrypy/files/cherrypy-18.6.1-py311.patch
@@ -0,0 +1,32 @@
+From 8245a74aa4e090c40445535a9ce3997ed9904798 Mon Sep 17 00:00:00 2001
+From: Dominic Davis-Foster <dominic@davis-foster.co.uk>
+Date: Fri, 28 Jan 2022 23:11:52 +0000
+Subject: [PATCH] Switch from inspect.getargspec to inspect.getfullargspec
+
+inspect.getargspec has been deprecated since 3.0
+---
+ cherrypy/_cpdispatch.py | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/cherrypy/_cpdispatch.py b/cherrypy/_cpdispatch.py
+index 83eb79cb..5c506e99 100644
+--- a/cherrypy/_cpdispatch.py
++++ b/cherrypy/_cpdispatch.py
+@@ -206,12 +206,8 @@ except ImportError:
+ def test_callable_spec(callable, args, kwargs): # noqa: F811
+ return None
+ else:
+- getargspec = inspect.getargspec
+- # Python 3 requires using getfullargspec if
+- # keyword-only arguments are present
+- if hasattr(inspect, 'getfullargspec'):
+- def getargspec(callable):
+- return inspect.getfullargspec(callable)[:4]
++ def getargspec(callable):
++ return inspect.getfullargspec(callable)[:4]
+
+
+ class LateParamPageHandler(PageHandler):
+--
+2.35.1
+