aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.com>2023-01-01 20:10:42 +0300
committershadchin <shadchin@yandex-team.com>2023-01-01 20:10:42 +0300
commit5503ad57eb3d86e606518cbf88d9da289ce87d53 (patch)
tree14e7e8b9e37f6c753893713842a2bc91c8f242c0 /contrib
parent7d35dcfceadb9be958d546a3b5302d2433be80ce (diff)
downloadydb-5503ad57eb3d86e606518cbf88d9da289ce87d53.tar.gz
Fix grpcio with Python 3.11
Diffstat (limited to 'contrib')
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_auth.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_auth.py b/contrib/libs/grpc/src/python/grpcio/grpc/_auth.py
index 2d38320aff..1398251ccf 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_auth.py
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_auth.py
@@ -14,6 +14,7 @@
"""GRPCAuthMetadataPlugins for standard authentication."""
import inspect
+import sys
import grpc
@@ -30,8 +31,11 @@ class GoogleCallCredentials(grpc.AuthMetadataPlugin):
self._credentials = credentials
# Hack to determine if these are JWT creds and we need to pass
# additional_claims when getting a token
- self._is_jwt = 'additional_claims' in inspect.getargspec( # pylint: disable=deprecated-method
- credentials.get_access_token).args
+ if sys.version_info[0] == 2:
+ args = inspect.getargspec(credentials.get_access_token).args
+ else:
+ args = inspect.getfullargspec(credentials.get_access_token).args
+ self._is_jwt = 'additional_claims' in args
def __call__(self, context, callback):
try: