Replace deprecated Python “inspect.getargspec” (#29963)

This has been deprecated since Python 3.0 and is removed in Python 3.11.
We can use “inspect.getfullargspec” instead.

Fixes #29962.
pull/30011/head
Ben Beasley 3 years ago committed by GitHub
parent 7417386956
commit c805c4e2d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/python/grpcio/grpc/_auth.py

@ -30,7 +30,7 @@ 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
self._is_jwt = 'additional_claims' in inspect.getfullargspec(
credentials.get_access_token).args
def __call__(self, context, callback):

Loading…
Cancel
Save