File: fix-getargspec-to-getfullargspec.patch

package info (click to toggle)
python-oauth2client 4.1.3-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,468 kB
  • sloc: python: 11,266; makefile: 170; sh: 51
file content (21 lines) | stat: -rw-r--r-- 847 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: Py 3.11: fix getargspec to getfullargspec
Author: Thomas Goirand <zigo@debian.org>
Bug-Debian: https://bugs.debian.org/1026468
Forwarded: no
Last-Update: 2022-12-23

Index: python-oauth2client/oauth2client/_helpers.py
===================================================================
--- python-oauth2client.orig/oauth2client/_helpers.py
+++ python-oauth2client/oauth2client/_helpers.py
@@ -136,7 +136,9 @@ def positional(max_positional_args):
     if isinstance(max_positional_args, six.integer_types):
         return positional_decorator
     else:
-        args, _, _, defaults = inspect.getargspec(max_positional_args)
+        argspec = inspect.getfullargspec(max_positional_args)
+        defaults = argspec.defaults
+        args = argspec.args
         return positional(len(args) - len(defaults))(max_positional_args)