prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Tests broken on Python < 3.8
  ```python
  _______ ERROR collecting tests_async/transport/test_aiohttp_requests.py ________
  ImportError while importing test module '/home/tseaver/projects/agendaless/Google/src/google-auth/tests_async/transport/test_aiohttp_requests.py'.
  Hint: make sure your test modules/packages have valid Python names.
  Traceback:
  .nox/unit-3-6/lib/python3.6/site-packages/aioresponses/compat.py:14: in <module>
      from unittest import IsolatedAsyncioTestCase, skipIf
  E   ImportError: cannot import name 'IsolatedAsyncioTestCase'
  
  During handling of the above exception, another exception occurred:
  /opt/Python-3.6.10/lib/python3.6/importlib/__init__.py:126: in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
  tests_async/transport/test_aiohttp_requests.py:16: in <module>
      from aioresponses import aioresponses, core
  .nox/unit-3-6/lib/python3.6/site-packages/aioresponses/__init__.py:2: in <module>
      from .core import CallbackResult, aioresponses
  .nox/unit-3-6/lib/python3.6/site-packages/aioresponses/core.py:23: in <module>
      from .compat import (
  .nox/unit-3-6/lib/python3.6/site-packages/aioresponses/compat.py:29: in <module>
      from asynctest import fail_on, skipIf
  E   ModuleNotFoundError: No module named 'asynctest'
  ```
  
  Due to https://github.com/pnuckowski/aioresponses/issues/172
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `noxfile.py`
  Content:
  ```
  1 # Copyright 2019 Google LLC
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #      http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 
  15 import nox
  16 
  17 TEST_DEPENDENCIES = [
  18     "flask",
  19     "freezegun",
  20     "mock",
  21     "oauth2client",
  22     "pyopenssl",
  23     "pytest",
  24     "pytest-cov",
  25     "pytest-localserver",
  26     "requests",
  27     "urllib3",
  28     "cryptography",
  29     "responses",
  30     "grpcio",
  31 ]
  32 
  33 ASYNC_DEPENDENCIES = ["pytest-asyncio", "aioresponses"]
  34 
  35 BLACK_VERSION = "black==19.3b0"
  36 BLACK_PATHS = [
  37     "google",
  38     "tests",
  39     "tests_async",
  40     "noxfile.py",
  41     "setup.py",
  42     "docs/conf.py",
  43 ]
  44 
  45 
  46 @nox.session(python="3.7")
  47 def lint(session):
  48     session.install("flake8", "flake8-import-order", "docutils", BLACK_VERSION)
  49     session.install(".")
  50     session.run("black", "--check", *BLACK_PATHS)
  51     session.run(
  52         "flake8",
  53         "--import-order-style=google",
  54         "--application-import-names=google,tests,system_tests",
  55         "google",
  56         "tests",
  57         "tests_async",
  58     )
  59     session.run(
  60         "python", "setup.py", "check", "--metadata", "--restructuredtext", "--strict"
  61     )
  62 
  63 
  64 @nox.session(python="3.6")
  65 def blacken(session):
  66     """Run black.
  67 
  68     Format code to uniform standard.
  69 
  70     This currently uses Python 3.6 due to the automated Kokoro run of synthtool.
  71     That run uses an image that doesn't have 3.6 installed. Before updating this
  72     check the state of the `gcp_ubuntu_config` we use for that Kokoro run.
  73     """
  74     session.install(BLACK_VERSION)
  75     session.run("black", *BLACK_PATHS)
  76 
  77 
  78 @nox.session(python=["3.6", "3.7", "3.8"])
  79 def unit(session):
  80     session.install(*TEST_DEPENDENCIES)
  81     session.install(*(ASYNC_DEPENDENCIES))
  82     session.install(".")
  83     session.run(
  84         "pytest",
  85         "--cov=google.auth",
  86         "--cov=google.oauth2",
  87         "--cov=tests",
  88         "tests",
  89         "tests_async",
  90     )
  91 
  92 
  93 @nox.session(python=["2.7", "3.5"])
  94 def unit_prev_versions(session):
  95     session.install(*TEST_DEPENDENCIES)
  96     session.install(".")
  97     session.run(
  98         "pytest", "--cov=google.auth", "--cov=google.oauth2", "--cov=tests", "tests"
  99     )
  100 
  101 
  102 @nox.session(python="3.7")
  103 def cover(session):
  104     session.install(*TEST_DEPENDENCIES)
  105     session.install(*(ASYNC_DEPENDENCIES))
  106     session.install(".")
  107     session.run(
  108         "pytest",
  109         "--cov=google.auth",
  110         "--cov=google.oauth2",
  111         "--cov=tests",
  112         "--cov=tests_async",
  113         "--cov-report=",
  114         "tests",
  115         "tests_async",
  116     )
  117     session.run("coverage", "report", "--show-missing", "--fail-under=100")
  118 
  119 
  120 @nox.session(python="3.7")
  121 def docgen(session):
  122     session.env["SPHINX_APIDOC_OPTIONS"] = "members,inherited-members,show-inheritance"
  123     session.install(*TEST_DEPENDENCIES)
  124     session.install("sphinx")
  125     session.install(".")
  126     session.run("rm", "-r", "docs/reference")
  127     session.run(
  128         "sphinx-apidoc",
  129         "--output-dir",
  130         "docs/reference",
  131         "--separate",
  132         "--module-first",
  133         "google",
  134     )
  135 
  136 
  137 @nox.session(python="3.7")
  138 def docs(session):
  139     session.install("sphinx", "-r", "docs/requirements-docs.txt")
  140     session.install(".")
  141     session.run("make", "-C", "docs", "html")
  142 
  143 
  144 @nox.session(python="pypy")
  145 def pypy(session):
  146     session.install(*TEST_DEPENDENCIES)
  147     session.install(".")
  148     session.run(
  149         "pytest",
  150         "--cov=google.auth",
  151         "--cov=google.oauth2",
  152         "--cov=tests",
  153         "tests",
  154         "tests_async",
  155     )
  156
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/noxfile.py b/noxfile.py
  --- a/noxfile.py
  +++ b/noxfile.py
  @@ -30,7 +30,7 @@
       "grpcio",
   ]
   
  -ASYNC_DEPENDENCIES = ["pytest-asyncio", "aioresponses"]
  +ASYNC_DEPENDENCIES = ["pytest-asyncio", "aioresponses", "asynctest"]
   
   BLACK_VERSION = "black==19.3b0"
   BLACK_PATHS = [
  @@ -144,6 +144,7 @@
   @nox.session(python="pypy")
   def pypy(session):
       session.install(*TEST_DEPENDENCIES)
  +    session.install(*ASYNC_DEPENDENCIES)
       session.install(".")
       session.run(
           "pytest",
  
verification_info: {"golden_diff": "diff --git a/noxfile.py b/noxfile.py\n--- a/noxfile.py\n+++ b/noxfile.py\n@@ -30,7 +30,7 @@\n     \"grpcio\",\n ]\n \n-ASYNC_DEPENDENCIES = [\"pytest-asyncio\", \"aioresponses\"]\n+ASYNC_DEPENDENCIES = [\"pytest-asyncio\", \"aioresponses\", \"asynctest\"]\n \n BLACK_VERSION = \"black==19.3b0\"\n BLACK_PATHS = [\n@@ -144,6 +144,7 @@\n @nox.session(python=\"pypy\")\n def pypy(session):\n     session.install(*TEST_DEPENDENCIES)\n+    session.install(*ASYNC_DEPENDENCIES)\n     session.install(\".\")\n     session.run(\n         \"pytest\",\n", "issue": "Tests broken on Python < 3.8\n```python\r\n_______ ERROR collecting tests_async/transport/test_aiohttp_requests.py ________\r\nImportError while importing test module '/home/tseaver/projects/agendaless/Google/src/google-auth/tests_async/transport/test_aiohttp_requests.py'.\r\nHint: make sure your test modules/packages have valid Python names.\r\nTraceback:\r\n.nox/unit-3-6/lib/python3.6/site-packages/aioresponses/compat.py:14: in <module>\r\n    from unittest import IsolatedAsyncioTestCase, skipIf\r\nE   ImportError: cannot import name 'IsolatedAsyncioTestCase'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n/opt/Python-3.6.10/lib/python3.6/importlib/__init__.py:126: in import_module\r\n    return _bootstrap._gcd_import(name[level:], package, level)\r\ntests_async/transport/test_aiohttp_requests.py:16: in <module>\r\n    from aioresponses import aioresponses, core\r\n.nox/unit-3-6/lib/python3.6/site-packages/aioresponses/__init__.py:2: in <module>\r\n    from .core import CallbackResult, aioresponses\r\n.nox/unit-3-6/lib/python3.6/site-packages/aioresponses/core.py:23: in <module>\r\n    from .compat import (\r\n.nox/unit-3-6/lib/python3.6/site-packages/aioresponses/compat.py:29: in <module>\r\n    from asynctest import fail_on, skipIf\r\nE   ModuleNotFoundError: No module named 'asynctest'\r\n```\r\n\r\nDue to https://github.com/pnuckowski/aioresponses/issues/172\n", "before_files": [{"content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport nox\n\nTEST_DEPENDENCIES = [\n    \"flask\",\n    \"freezegun\",\n    \"mock\",\n    \"oauth2client\",\n    \"pyopenssl\",\n    \"pytest\",\n    \"pytest-cov\",\n    \"pytest-localserver\",\n    \"requests\",\n    \"urllib3\",\n    \"cryptography\",\n    \"responses\",\n    \"grpcio\",\n]\n\nASYNC_DEPENDENCIES = [\"pytest-asyncio\", \"aioresponses\"]\n\nBLACK_VERSION = \"black==19.3b0\"\nBLACK_PATHS = [\n    \"google\",\n    \"tests\",\n    \"tests_async\",\n    \"noxfile.py\",\n    \"setup.py\",\n    \"docs/conf.py\",\n]\n\n\n@nox.session(python=\"3.7\")\ndef lint(session):\n    session.install(\"flake8\", \"flake8-import-order\", \"docutils\", BLACK_VERSION)\n    session.install(\".\")\n    session.run(\"black\", \"--check\", *BLACK_PATHS)\n    session.run(\n        \"flake8\",\n        \"--import-order-style=google\",\n        \"--application-import-names=google,tests,system_tests\",\n        \"google\",\n        \"tests\",\n        \"tests_async\",\n    )\n    session.run(\n        \"python\", \"setup.py\", \"check\", \"--metadata\", \"--restructuredtext\", \"--strict\"\n    )\n\n\n@nox.session(python=\"3.6\")\ndef blacken(session):\n    \"\"\"Run black.\n\n    Format code to uniform standard.\n\n    This currently uses Python 3.6 due to the automated Kokoro run of synthtool.\n    That run uses an image that doesn't have 3.6 installed. Before updating this\n    check the state of the `gcp_ubuntu_config` we use for that Kokoro run.\n    \"\"\"\n    session.install(BLACK_VERSION)\n    session.run(\"black\", *BLACK_PATHS)\n\n\n@nox.session(python=[\"3.6\", \"3.7\", \"3.8\"])\ndef unit(session):\n    session.install(*TEST_DEPENDENCIES)\n    session.install(*(ASYNC_DEPENDENCIES))\n    session.install(\".\")\n    session.run(\n        \"pytest\",\n        \"--cov=google.auth\",\n        \"--cov=google.oauth2\",\n        \"--cov=tests\",\n        \"tests\",\n        \"tests_async\",\n    )\n\n\n@nox.session(python=[\"2.7\", \"3.5\"])\ndef unit_prev_versions(session):\n    session.install(*TEST_DEPENDENCIES)\n    session.install(\".\")\n    session.run(\n        \"pytest\", \"--cov=google.auth\", \"--cov=google.oauth2\", \"--cov=tests\", \"tests\"\n    )\n\n\n@nox.session(python=\"3.7\")\ndef cover(session):\n    session.install(*TEST_DEPENDENCIES)\n    session.install(*(ASYNC_DEPENDENCIES))\n    session.install(\".\")\n    session.run(\n        \"pytest\",\n        \"--cov=google.auth\",\n        \"--cov=google.oauth2\",\n        \"--cov=tests\",\n        \"--cov=tests_async\",\n        \"--cov-report=\",\n        \"tests\",\n        \"tests_async\",\n    )\n    session.run(\"coverage\", \"report\", \"--show-missing\", \"--fail-under=100\")\n\n\n@nox.session(python=\"3.7\")\ndef docgen(session):\n    session.env[\"SPHINX_APIDOC_OPTIONS\"] = \"members,inherited-members,show-inheritance\"\n    session.install(*TEST_DEPENDENCIES)\n    session.install(\"sphinx\")\n    session.install(\".\")\n    session.run(\"rm\", \"-r\", \"docs/reference\")\n    session.run(\n        \"sphinx-apidoc\",\n        \"--output-dir\",\n        \"docs/reference\",\n        \"--separate\",\n        \"--module-first\",\n        \"google\",\n    )\n\n\n@nox.session(python=\"3.7\")\ndef docs(session):\n    session.install(\"sphinx\", \"-r\", \"docs/requirements-docs.txt\")\n    session.install(\".\")\n    session.run(\"make\", \"-C\", \"docs\", \"html\")\n\n\n@nox.session(python=\"pypy\")\ndef pypy(session):\n    session.install(*TEST_DEPENDENCIES)\n    session.install(\".\")\n    session.run(\n        \"pytest\",\n        \"--cov=google.auth\",\n        \"--cov=google.oauth2\",\n        \"--cov=tests\",\n        \"tests\",\n        \"tests_async\",\n    )\n", "path": "noxfile.py"}], "after_files": [{"content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport nox\n\nTEST_DEPENDENCIES = [\n    \"flask\",\n    \"freezegun\",\n    \"mock\",\n    \"oauth2client\",\n    \"pyopenssl\",\n    \"pytest\",\n    \"pytest-cov\",\n    \"pytest-localserver\",\n    \"requests\",\n    \"urllib3\",\n    \"cryptography\",\n    \"responses\",\n    \"grpcio\",\n]\n\nASYNC_DEPENDENCIES = [\"pytest-asyncio\", \"aioresponses\", \"asynctest\"]\n\nBLACK_VERSION = \"black==19.3b0\"\nBLACK_PATHS = [\n    \"google\",\n    \"tests\",\n    \"tests_async\",\n    \"noxfile.py\",\n    \"setup.py\",\n    \"docs/conf.py\",\n]\n\n\n@nox.session(python=\"3.7\")\ndef lint(session):\n    session.install(\"flake8\", \"flake8-import-order\", \"docutils\", BLACK_VERSION)\n    session.install(\".\")\n    session.run(\"black\", \"--check\", *BLACK_PATHS)\n    session.run(\n        \"flake8\",\n        \"--import-order-style=google\",\n        \"--application-import-names=google,tests,system_tests\",\n        \"google\",\n        \"tests\",\n        \"tests_async\",\n    )\n    session.run(\n        \"python\", \"setup.py\", \"check\", \"--metadata\", \"--restructuredtext\", \"--strict\"\n    )\n\n\n@nox.session(python=\"3.6\")\ndef blacken(session):\n    \"\"\"Run black.\n\n    Format code to uniform standard.\n\n    This currently uses Python 3.6 due to the automated Kokoro run of synthtool.\n    That run uses an image that doesn't have 3.6 installed. Before updating this\n    check the state of the `gcp_ubuntu_config` we use for that Kokoro run.\n    \"\"\"\n    session.install(BLACK_VERSION)\n    session.run(\"black\", *BLACK_PATHS)\n\n\n@nox.session(python=[\"3.6\", \"3.7\", \"3.8\"])\ndef unit(session):\n    session.install(*TEST_DEPENDENCIES)\n    session.install(*(ASYNC_DEPENDENCIES))\n    session.install(\".\")\n    session.run(\n        \"pytest\",\n        \"--cov=google.auth\",\n        \"--cov=google.oauth2\",\n        \"--cov=tests\",\n        \"tests\",\n        \"tests_async\",\n    )\n\n\n@nox.session(python=[\"2.7\", \"3.5\"])\ndef unit_prev_versions(session):\n    session.install(*TEST_DEPENDENCIES)\n    session.install(\".\")\n    session.run(\n        \"pytest\", \"--cov=google.auth\", \"--cov=google.oauth2\", \"--cov=tests\", \"tests\"\n    )\n\n\n@nox.session(python=\"3.7\")\ndef cover(session):\n    session.install(*TEST_DEPENDENCIES)\n    session.install(*(ASYNC_DEPENDENCIES))\n    session.install(\".\")\n    session.run(\n        \"pytest\",\n        \"--cov=google.auth\",\n        \"--cov=google.oauth2\",\n        \"--cov=tests\",\n        \"--cov=tests_async\",\n        \"--cov-report=\",\n        \"tests\",\n        \"tests_async\",\n    )\n    session.run(\"coverage\", \"report\", \"--show-missing\", \"--fail-under=100\")\n\n\n@nox.session(python=\"3.7\")\ndef docgen(session):\n    session.env[\"SPHINX_APIDOC_OPTIONS\"] = \"members,inherited-members,show-inheritance\"\n    session.install(*TEST_DEPENDENCIES)\n    session.install(\"sphinx\")\n    session.install(\".\")\n    session.run(\"rm\", \"-r\", \"docs/reference\")\n    session.run(\n        \"sphinx-apidoc\",\n        \"--output-dir\",\n        \"docs/reference\",\n        \"--separate\",\n        \"--module-first\",\n        \"google\",\n    )\n\n\n@nox.session(python=\"3.7\")\ndef docs(session):\n    session.install(\"sphinx\", \"-r\", \"docs/requirements-docs.txt\")\n    session.install(\".\")\n    session.run(\"make\", \"-C\", \"docs\", \"html\")\n\n\n@nox.session(python=\"pypy\")\ndef pypy(session):\n    session.install(*TEST_DEPENDENCIES)\n    session.install(*ASYNC_DEPENDENCIES)\n    session.install(\".\")\n    session.run(\n        \"pytest\",\n        \"--cov=google.auth\",\n        \"--cov=google.oauth2\",\n        \"--cov=tests\",\n        \"tests\",\n        \"tests_async\",\n    )\n", "path": "noxfile.py"}]}