prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Stop using external 'mock' dependency
  As of Python 3.4, 'mock' is included in the standard library under the unittest module, and since the lowest supported version of Python is greater than that, we can remove the external dependency.
  
  --- 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 2020 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 os
  16 import shutil
  17 
  18 import nox
  19 
  20 BLACK_VERSION = "black==22.3.0"
  21 ISORT_VERSION = "isort==5.10.1"
  22 BLACK_PATHS = [
  23     "apiclient",
  24     "googleapiclient",
  25     "scripts",
  26     "tests",
  27     "describe.py",
  28     "expandsymlinks.py",
  29     "noxfile.py",
  30     "owlbot.py",
  31     "setup.py",
  32 ]
  33 
  34 test_dependencies = [
  35     "django>=2.0.0",
  36     "google-auth",
  37     "google-auth-httplib2",
  38     "mox",
  39     "parameterized",
  40     "pyopenssl",
  41     "pytest",
  42     "pytest-cov",
  43     "webtest",
  44     "coverage",
  45     "mock",
  46 ]
  47 
  48 
  49 @nox.session(python=["3.7"])
  50 def lint(session):
  51     session.install("flake8")
  52     session.run(
  53         "flake8",
  54         "googleapiclient",
  55         "tests",
  56         "--count",
  57         "--select=E9,F63,F7,F82",
  58         "--show-source",
  59         "--statistics",
  60     )
  61 
  62 
  63 @nox.session(python="3.8")
  64 def format(session):
  65     """
  66     Run isort to sort imports. Then run black
  67     to format code to uniform standard.
  68     """
  69     session.install(BLACK_VERSION, ISORT_VERSION)
  70     # Use the --fss option to sort imports using strict alphabetical order.
  71     # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections
  72     session.run(
  73         "isort",
  74         "--fss",
  75         *BLACK_PATHS,
  76     )
  77     session.run(
  78         "black",
  79         *BLACK_PATHS,
  80     )
  81 
  82 
  83 @nox.session(python=["3.7", "3.8", "3.9", "3.10"])
  84 @nox.parametrize(
  85     "oauth2client",
  86     [
  87         "oauth2client<2dev",
  88         "oauth2client>=2,<=3dev",
  89         "oauth2client>=3,<=4dev",
  90         "oauth2client>=4,<=5dev",
  91     ],
  92 )
  93 def unit(session, oauth2client):
  94     # Clean up dist and build folders
  95     shutil.rmtree("dist", ignore_errors=True)
  96     shutil.rmtree("build", ignore_errors=True)
  97 
  98     session.install(*test_dependencies)
  99     session.install(oauth2client)
  100 
  101     # Create and install wheels
  102     session.run("python3", "setup.py", "bdist_wheel")
  103     session.install(os.path.join("dist", os.listdir("dist").pop()))
  104 
  105     # Run tests from a different directory to test the package artifacts
  106     root_dir = os.path.dirname(os.path.realpath(__file__))
  107     temp_dir = session.create_tmp()
  108     session.chdir(temp_dir)
  109     shutil.copytree(os.path.join(root_dir, "tests"), "tests")
  110 
  111     # Run py.test against the unit tests.
  112     session.run(
  113         "py.test",
  114         "--quiet",
  115         "--cov=googleapiclient",
  116         "--cov=tests",
  117         "--cov-append",
  118         "--cov-config=.coveragerc",
  119         "--cov-report=",
  120         "--cov-fail-under=85",
  121         "tests",
  122         *session.posargs,
  123     )
  124 
  125 
  126 @nox.session(python=["3.9"])
  127 def scripts(session):
  128     session.install(*test_dependencies)
  129     session.install("-e", ".")
  130     session.install("-r", "scripts/requirements.txt")
  131 
  132     # Run py.test against the unit tests.
  133     session.run(
  134         "py.test",
  135         "--quiet",
  136         "--cov=scripts",
  137         "--cov-config=.coveragerc",
  138         "--cov-report=",
  139         "--cov-fail-under=91",
  140         "scripts",
  141         *session.posargs,
  142     )
  143
  ```
  --- 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
  @@ -42,7 +42,6 @@
       "pytest-cov",
       "webtest",
       "coverage",
  -    "mock",
   ]
  
verification_info: {"golden_diff": "diff --git a/noxfile.py b/noxfile.py\n--- a/noxfile.py\n+++ b/noxfile.py\n@@ -42,7 +42,6 @@\n     \"pytest-cov\",\n     \"webtest\",\n     \"coverage\",\n-    \"mock\",\n ]\n", "issue": "Stop using external 'mock' dependency\nAs of Python 3.4, 'mock' is included in the standard library under the unittest module, and since the lowest supported version of Python is greater than that, we can remove the external dependency.\n", "before_files": [{"content": "# Copyright 2020 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 os\nimport shutil\n\nimport nox\n\nBLACK_VERSION = \"black==22.3.0\"\nISORT_VERSION = \"isort==5.10.1\"\nBLACK_PATHS = [\n    \"apiclient\",\n    \"googleapiclient\",\n    \"scripts\",\n    \"tests\",\n    \"describe.py\",\n    \"expandsymlinks.py\",\n    \"noxfile.py\",\n    \"owlbot.py\",\n    \"setup.py\",\n]\n\ntest_dependencies = [\n    \"django>=2.0.0\",\n    \"google-auth\",\n    \"google-auth-httplib2\",\n    \"mox\",\n    \"parameterized\",\n    \"pyopenssl\",\n    \"pytest\",\n    \"pytest-cov\",\n    \"webtest\",\n    \"coverage\",\n    \"mock\",\n]\n\n\n@nox.session(python=[\"3.7\"])\ndef lint(session):\n    session.install(\"flake8\")\n    session.run(\n        \"flake8\",\n        \"googleapiclient\",\n        \"tests\",\n        \"--count\",\n        \"--select=E9,F63,F7,F82\",\n        \"--show-source\",\n        \"--statistics\",\n    )\n\n\n@nox.session(python=\"3.8\")\ndef format(session):\n    \"\"\"\n    Run isort to sort imports. Then run black\n    to format code to uniform standard.\n    \"\"\"\n    session.install(BLACK_VERSION, ISORT_VERSION)\n    # Use the --fss option to sort imports using strict alphabetical order.\n    # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections\n    session.run(\n        \"isort\",\n        \"--fss\",\n        *BLACK_PATHS,\n    )\n    session.run(\n        \"black\",\n        *BLACK_PATHS,\n    )\n\n\n@nox.session(python=[\"3.7\", \"3.8\", \"3.9\", \"3.10\"])\n@nox.parametrize(\n    \"oauth2client\",\n    [\n        \"oauth2client<2dev\",\n        \"oauth2client>=2,<=3dev\",\n        \"oauth2client>=3,<=4dev\",\n        \"oauth2client>=4,<=5dev\",\n    ],\n)\ndef unit(session, oauth2client):\n    # Clean up dist and build folders\n    shutil.rmtree(\"dist\", ignore_errors=True)\n    shutil.rmtree(\"build\", ignore_errors=True)\n\n    session.install(*test_dependencies)\n    session.install(oauth2client)\n\n    # Create and install wheels\n    session.run(\"python3\", \"setup.py\", \"bdist_wheel\")\n    session.install(os.path.join(\"dist\", os.listdir(\"dist\").pop()))\n\n    # Run tests from a different directory to test the package artifacts\n    root_dir = os.path.dirname(os.path.realpath(__file__))\n    temp_dir = session.create_tmp()\n    session.chdir(temp_dir)\n    shutil.copytree(os.path.join(root_dir, \"tests\"), \"tests\")\n\n    # Run py.test against the unit tests.\n    session.run(\n        \"py.test\",\n        \"--quiet\",\n        \"--cov=googleapiclient\",\n        \"--cov=tests\",\n        \"--cov-append\",\n        \"--cov-config=.coveragerc\",\n        \"--cov-report=\",\n        \"--cov-fail-under=85\",\n        \"tests\",\n        *session.posargs,\n    )\n\n\n@nox.session(python=[\"3.9\"])\ndef scripts(session):\n    session.install(*test_dependencies)\n    session.install(\"-e\", \".\")\n    session.install(\"-r\", \"scripts/requirements.txt\")\n\n    # Run py.test against the unit tests.\n    session.run(\n        \"py.test\",\n        \"--quiet\",\n        \"--cov=scripts\",\n        \"--cov-config=.coveragerc\",\n        \"--cov-report=\",\n        \"--cov-fail-under=91\",\n        \"scripts\",\n        *session.posargs,\n    )\n", "path": "noxfile.py"}], "after_files": [{"content": "# Copyright 2020 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 os\nimport shutil\n\nimport nox\n\nBLACK_VERSION = \"black==22.3.0\"\nISORT_VERSION = \"isort==5.10.1\"\nBLACK_PATHS = [\n    \"apiclient\",\n    \"googleapiclient\",\n    \"scripts\",\n    \"tests\",\n    \"describe.py\",\n    \"expandsymlinks.py\",\n    \"noxfile.py\",\n    \"owlbot.py\",\n    \"setup.py\",\n]\n\ntest_dependencies = [\n    \"django>=2.0.0\",\n    \"google-auth\",\n    \"google-auth-httplib2\",\n    \"mox\",\n    \"parameterized\",\n    \"pyopenssl\",\n    \"pytest\",\n    \"pytest-cov\",\n    \"webtest\",\n    \"coverage\",\n]\n\n\n@nox.session(python=[\"3.7\"])\ndef lint(session):\n    session.install(\"flake8\")\n    session.run(\n        \"flake8\",\n        \"googleapiclient\",\n        \"tests\",\n        \"--count\",\n        \"--select=E9,F63,F7,F82\",\n        \"--show-source\",\n        \"--statistics\",\n    )\n\n\n@nox.session(python=\"3.8\")\ndef format(session):\n    \"\"\"\n    Run isort to sort imports. Then run black\n    to format code to uniform standard.\n    \"\"\"\n    session.install(BLACK_VERSION, ISORT_VERSION)\n    # Use the --fss option to sort imports using strict alphabetical order.\n    # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections\n    session.run(\n        \"isort\",\n        \"--fss\",\n        *BLACK_PATHS,\n    )\n    session.run(\n        \"black\",\n        *BLACK_PATHS,\n    )\n\n\n@nox.session(python=[\"3.7\", \"3.8\", \"3.9\", \"3.10\"])\n@nox.parametrize(\n    \"oauth2client\",\n    [\n        \"oauth2client<2dev\",\n        \"oauth2client>=2,<=3dev\",\n        \"oauth2client>=3,<=4dev\",\n        \"oauth2client>=4,<=5dev\",\n    ],\n)\ndef unit(session, oauth2client):\n    # Clean up dist and build folders\n    shutil.rmtree(\"dist\", ignore_errors=True)\n    shutil.rmtree(\"build\", ignore_errors=True)\n\n    session.install(*test_dependencies)\n    session.install(oauth2client)\n\n    # Create and install wheels\n    session.run(\"python3\", \"setup.py\", \"bdist_wheel\")\n    session.install(os.path.join(\"dist\", os.listdir(\"dist\").pop()))\n\n    # Run tests from a different directory to test the package artifacts\n    root_dir = os.path.dirname(os.path.realpath(__file__))\n    temp_dir = session.create_tmp()\n    session.chdir(temp_dir)\n    shutil.copytree(os.path.join(root_dir, \"tests\"), \"tests\")\n\n    # Run py.test against the unit tests.\n    session.run(\n        \"py.test\",\n        \"--quiet\",\n        \"--cov=googleapiclient\",\n        \"--cov=tests\",\n        \"--cov-append\",\n        \"--cov-config=.coveragerc\",\n        \"--cov-report=\",\n        \"--cov-fail-under=85\",\n        \"tests\",\n        *session.posargs,\n    )\n\n\n@nox.session(python=[\"3.9\"])\ndef scripts(session):\n    session.install(*test_dependencies)\n    session.install(\"-e\", \".\")\n    session.install(\"-r\", \"scripts/requirements.txt\")\n\n    # Run py.test against the unit tests.\n    session.run(\n        \"py.test\",\n        \"--quiet\",\n        \"--cov=scripts\",\n        \"--cov-config=.coveragerc\",\n        \"--cov-report=\",\n        \"--cov-fail-under=91\",\n        \"scripts\",\n        *session.posargs,\n    )\n", "path": "noxfile.py"}]}