← All tasks
pythongoogleapis/google-api-python-client #1606Not a task: not reproduced

google-api-python-client 2.6.0, 2.7.0, 2.8.0, 2.9.0 cannot work with google-auth 1.18.0 and earlier

envgap__googleapis__google-api-python-client-1606

01 / FAILURE SIGNATURE

As reported upstream

TypeError: load_credentials_from_file() got an unexpected keyword argument 'quota_project_id'
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
64ad8ccd9f7a59d576795deeccf2a23e7a6f4183
Manifest
setup.py
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

googleapis/google-api-python-client #1606 · read the original issue
These versions of `google-api-python-client` requires `google-auth>=1.16.0,<2dev`. However, some of the code cannot work with `google-auth` 1.18.0 and earlier because`google.auth.load_credentials_from_file()` and `google.auth.default()` do not accept the `quota_project_id` parameter. I think it will be better to increase the minimum version of `google-auth` for these `google-api-python-client` versions.



Here are the details:



#### Environment details



  - OS type and version: Ubuntu 20.04

  - Python version: 3.9.7

  - pip version: 21.2.4

  - `google-api-python-client` version: 2.6.0, 2.7.0, 2.8.0, 2.9.0



#### Steps to reproduce



Create a clean Python environment and install relevant packages

  

```

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

```



#### Code example



```

(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'

```

Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]