Skip to content

Commit

Permalink
fix: Add google-auth to aiohttp extra (#386)
Browse files Browse the repository at this point in the history
* fix: Add google-auth as a dependency to resolve broken tests.

* Make google-auth a required dependency for the optional async feature.

* Fix doc test failure. Remove GOOGLE_AUTH references in noxfile

---------

Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: cojenco <cathyo@google.com>
  • Loading branch information
3 people authored Aug 1, 2023
1 parent 58eb04a commit 30c2ebd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

SYSTEM_TEST_ENV_VARS = ("GOOGLE_APPLICATION_CREDENTIALS",)
BLACK_VERSION = "black==22.3.0"
GOOGLE_AUTH = "google-auth >= 1.22.0, < 3.0dev"

DEFAULT_PYTHON_VERSION = "3.8"
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"]
Expand All @@ -40,7 +39,6 @@ def unit(session):

# Install all test dependencies, then install this package in-place.
session.install("mock", "pytest", "pytest-cov", "pytest-asyncio<=0.14.0")
session.install(GOOGLE_AUTH, "-c", constraints_path)
session.install("-e", ".[requests,aiohttp]", "-c", constraints_path)

# Run py.test against the unit tests.
Expand Down Expand Up @@ -120,14 +118,13 @@ def docfx(session):
@nox.session(python=DEFAULT_PYTHON_VERSION)
def doctest(session):
"""Run the doctests."""
session.install("-e", ".[requests]")
session.install("-e", ".[requests,aiohttp]")
session.install("sphinx==4.0.1", "alabaster", "recommonmark")
session.install(
"sphinx",
"sphinx_rtd_theme",
"sphinx-docstring-typing >= 0.0.3",
"mock",
GOOGLE_AUTH,
)

# Run the doctests with Sphinx.
Expand Down Expand Up @@ -224,7 +221,6 @@ def system(session):
# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
session.install("mock", "pytest", "google-cloud-testutils")
session.install(GOOGLE_AUTH, "-c", constraints_path)
session.install("-e", ".[requests,aiohttp]", "-c", constraints_path)

# Run py.test against the async system tests.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
'requests': [
'requests >= 2.18.0, < 3.0.0dev',
],
'aiohttp': 'aiohttp >= 3.6.2, < 4.0.0dev'
'aiohttp': ['aiohttp >= 3.6.2, < 4.0.0dev', 'google-auth >= 1.22.0, < 2.0dev']
}

setuptools.setup(
Expand Down

0 comments on commit 30c2ebd

Please sign in to comment.