Repository: googleapis/google-api-python-client

Issue:
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
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'
```



Discussion:
Hi @hehao98 , Thank you for reporting this issue. I was able to re-create the issue with the latest release. We'll need to bump the minimum version for `google-auth` to `1.19.0` and add a test for this issue. PRs are welcome!

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -37,7 +37,7 @@
     # NOTE: Maintainers, please do not require google-auth>=2.x.x
     # Until this issue is closed
     # https://github.com/googleapis/google-cloud-python/issues/10566
-    "google-auth>=1.16.0,<3.0.0dev",
+    "google-auth>=1.19.0,<3.0.0dev",
     "google-auth-httplib2>=0.1.0",
     # NOTE: Maintainers, please do not require google-api-core>=2.x.x
     # Until this issue is closed


Test patch:
diff --git a/testing/constraints-3.6.txt b/testing/constraints-3.6.txt
--- a/testing/constraints-3.6.txt
+++ b/testing/constraints-3.6.txt
@@ -6,7 +6,7 @@
 # e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev",
 # Then this file should have foo==1.14.0
 httplib2==0.15.0
-google-auth==1.16.0
+google-auth==1.19.0
 google-auth-httplib2==0.0.3
 google-api-core==1.31.5
 uritemplate==3.0.1
\ No newline at end of file
diff --git a/testing/constraints-3.7.txt b/testing/constraints-3.7.txt
--- a/testing/constraints-3.7.txt
+++ b/testing/constraints-3.7.txt
@@ -6,7 +6,7 @@
 # e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev",
 # Then this file should have foo==1.14.0
 httplib2==0.15.0
-google-auth==1.16.0
+google-auth==1.19.0
 google-auth-httplib2==0.0.3
 google-api-core==1.31.5
 uritemplate==3.0.1
\ No newline at end of file