conda create -n test python=3.9
conda activate test
pip install --no-cache-dir google-auth==1.18.0 google-api-core==1.21.0 google-api-python-client==2.9.0
(test) heh@ubuntu:~$ python
Python 3.9.7 (default, Sep 16 2021, 13:09:58)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import googleapiclient._auth as _auth
>>> _auth.credentials_from_file("a")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/heh/anaconda3/envs/test/lib/python3.9/site-packages/googleapiclient/_auth.py", line 44, in credentials_from_file
credentials, _ = google.auth.load_credentials_from_file(filename, scopes=scopes, quota_project_id=quota_project_id)
TypeError: load_credentials_from_file() got an unexpected keyword argument 'quota_project_id'
>>> _auth.default_credentials("a")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/heh/anaconda3/envs/test/lib/python3.9/site-packages/googleapiclient/_auth.py", line 54, in default_credentials
credentials, _ = google.auth.default(scopes=scopes, quota_project_id=quota_project_id)
TypeError: default() got an unexpected keyword argument 'quota_project_id'
These versions of
google-api-python-clientrequiresgoogle-auth>=1.16.0,<2dev. However, some of the code cannot work withgoogle-auth1.18.0 and earlier becausegoogle.auth.load_credentials_from_file()andgoogle.auth.default()do not accept thequota_project_idparameter. I think it will be better to increase the minimum version ofgoogle-authfor thesegoogle-api-python-clientversions.Here are the details:
Environment details
google-api-python-clientversion: 2.6.0, 2.7.0, 2.8.0, 2.9.0Steps to reproduce
Create a clean Python environment and install relevant packages
Code example