We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove integration tests for Botocore with Python 2.7
Botocore dropped support for Python 2.7 in July so we don't have to do integration testing with Botocore+Python 2.7 on the 1.26.x branch any longer.

Reference: https://github.com/urllib3/urllib3/pull/2422

--- 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 import os
2 import shutil
3 import subprocess
4 
5 import nox
6 
7 SOURCE_FILES = [
8     "docs/",
9     "dummyserver/",
10     "src/",
11     "test/",
12     "noxfile.py",
13     "setup.py",
14 ]
15 
16 
17 def tests_impl(session, extras="socks,secure,brotli"):
18     # Install deps and the package itself.
19     session.install("-r", "dev-requirements.txt")
20     session.install(".[{extras}]".format(extras=extras))
21 
22     # Show the pip version.
23     session.run("pip", "--version")
24     # Print the Python version and bytesize.
25     session.run("python", "--version")
26     session.run("python", "-c", "import struct; print(struct.calcsize('P') * 8)")
27     # Print OpenSSL information.
28     session.run("python", "-m", "OpenSSL.debug")
29 
30     # Inspired from https://github.com/pyca/cryptography
31     # We use parallel mode and then combine here so that coverage.py will take
32     # the paths like .tox/pyXY/lib/pythonX.Y/site-packages/urllib3/__init__.py
33     # and collapse them into src/urllib3/__init__.py.
34 
35     session.run(
36         "coverage",
37         "run",
38         "--parallel-mode",
39         "-m",
40         "pytest",
41         "-r",
42         "a",
43         "--tb=native",
44         "--no-success-flaky-report",
45         *(session.posargs or ("test/",)),
46         env={"PYTHONWARNINGS": "always::DeprecationWarning"},
47     )
48     session.run("coverage", "combine")
49     session.run("coverage", "report", "-m")
50     session.run("coverage", "xml")
51 
52 
53 @nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "pypy"])
54 def test(session):
55     tests_impl(session)
56 
57 
58 @nox.session(python=["2", "3"])
59 def google_brotli(session):
60     # https://pypi.org/project/Brotli/ is the Google version of brotli, so
61     # install it separately and don't install our brotli extra (which installs
62     # brotlipy).
63     session.install("brotli")
64     tests_impl(session, extras="socks,secure")
65 
66 
67 @nox.session(python="2.7")
68 def app_engine(session):
69     session.install("-r", "dev-requirements.txt")
70     session.install(".")
71     session.run(
72         "coverage",
73         "run",
74         "--parallel-mode",
75         "-m",
76         "pytest",
77         "-r",
78         "sx",
79         "test/appengine",
80         *session.posargs,
81     )
82     session.run("coverage", "combine")
83     session.run("coverage", "report", "-m")
84     session.run("coverage", "xml")
85 
86 
87 def git_clone(session, git_url):
88     session.run("git", "clone", "--depth", "1", git_url, external=True)
89 
90 
91 @nox.session(python=["2.7", "3.9"])
92 def downstream_botocore(session):
93     root = os.getcwd()
94     tmp_dir = session.create_tmp()
95 
96     session.cd(tmp_dir)
97     git_clone(session, "https://github.com/boto/botocore")
98     session.chdir("botocore")
99     session.run("git", "rev-parse", "HEAD", external=True)
100     session.run("python", "scripts/ci/install")
101 
102     session.cd(root)
103     session.install(".", silent=False)
104     session.cd(f"{tmp_dir}/botocore")
105 
106     session.run("python", "scripts/ci/run-tests")
107 
108 
109 @nox.session(python=["2.7", "3.9"])
110 def downstream_requests(session):
111     root = os.getcwd()
112     tmp_dir = session.create_tmp()
113 
114     session.cd(tmp_dir)
115     git_clone(session, "https://github.com/psf/requests")
116     session.chdir("requests")
117     session.run("git", "apply", f"{root}/ci/requests.patch", external=True)
118     session.run("git", "rev-parse", "HEAD", external=True)
119     session.install(".[socks]", silent=False)
120     session.install("-r", "requirements-dev.txt", silent=False)
121 
122     session.cd(root)
123     session.install(".", silent=False)
124     session.cd(f"{tmp_dir}/requests")
125 
126     session.run("pytest", "tests")
127 
128 
129 @nox.session()
130 def format(session):
131     """Run code formatters."""
132     session.install("pre-commit")
133     session.run("pre-commit", "--version")
134 
135     process = subprocess.run(
136         ["pre-commit", "run", "--all-files"],
137         env=session.env,
138         text=True,
139         stdout=subprocess.PIPE,
140         stderr=subprocess.STDOUT,
141     )
142     # Ensure that pre-commit itself ran successfully
143     assert process.returncode in (0, 1)
144 
145     lint(session)
146 
147 
148 @nox.session
149 def lint(session):
150     session.install("pre-commit")
151     session.run("pre-commit", "run", "--all-files")
152 
153 
154 @nox.session
155 def docs(session):
156     session.install("-r", "docs/requirements.txt")
157     session.install(".[socks,secure,brotli]")
158 
159     session.chdir("docs")
160     if os.path.exists("_build"):
161         shutil.rmtree("_build")
162     session.run("sphinx-build", "-b", "html", "-W", ".", "_build/html")
163
```
--- 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()

```

diff --git a/noxfile.py b/noxfile.py
--- a/noxfile.py
+++ b/noxfile.py
@@ -88,7 +88,7 @@
     session.run("git", "clone", "--depth", "1", git_url, external=True)
 
 
-@nox.session(python=["2.7", "3.9"])
+@nox.session(python=["3.9"])
 def downstream_botocore(session):
     root = os.getcwd()
     tmp_dir = session.create_tmp()

{"golden_diff": "diff --git a/noxfile.py b/noxfile.py\n--- a/noxfile.py\n+++ b/noxfile.py\n@@ -88,7 +88,7 @@\n     session.run(\"git\", \"clone\", \"--depth\", \"1\", git_url, external=True)\n \n \n-@nox.session(python=[\"2.7\", \"3.9\"])\n+@nox.session(python=[\"3.9\"])\n def downstream_botocore(session):\n     root = os.getcwd()\n     tmp_dir = session.create_tmp()\n", "issue": "Remove integration tests for Botocore with Python 2.7\nBotocore dropped support for Python 2.7 in July so we don't have to do integration testing with Botocore+Python 2.7 on the 1.26.x branch any longer.\r\n\r\nReference: https://github.com/urllib3/urllib3/pull/2422\n", "before_files": [{"content": "import os\nimport shutil\nimport subprocess\n\nimport nox\n\nSOURCE_FILES = [\n    \"docs/\",\n    \"dummyserver/\",\n    \"src/\",\n    \"test/\",\n    \"noxfile.py\",\n    \"setup.py\",\n]\n\n\ndef tests_impl(session, extras=\"socks,secure,brotli\"):\n    # Install deps and the package itself.\n    session.install(\"-r\", \"dev-requirements.txt\")\n    session.install(\".[{extras}]\".format(extras=extras))\n\n    # Show the pip version.\n    session.run(\"pip\", \"--version\")\n    # Print the Python version and bytesize.\n    session.run(\"python\", \"--version\")\n    session.run(\"python\", \"-c\", \"import struct; print(struct.calcsize('P') * 8)\")\n    # Print OpenSSL information.\n    session.run(\"python\", \"-m\", \"OpenSSL.debug\")\n\n    # Inspired from https://github.com/pyca/cryptography\n    # We use parallel mode and then combine here so that coverage.py will take\n    # the paths like .tox/pyXY/lib/pythonX.Y/site-packages/urllib3/__init__.py\n    # and collapse them into src/urllib3/__init__.py.\n\n    session.run(\n        \"coverage\",\n        \"run\",\n        \"--parallel-mode\",\n        \"-m\",\n        \"pytest\",\n        \"-r\",\n        \"a\",\n        \"--tb=native\",\n        \"--no-success-flaky-report\",\n        *(session.posargs or (\"test/\",)),\n        env={\"PYTHONWARNINGS\": \"always::DeprecationWarning\"},\n    )\n    session.run(\"coverage\", \"combine\")\n    session.run(\"coverage\", \"report\", \"-m\")\n    session.run(\"coverage\", \"xml\")\n\n\n@nox.session(python=[\"2.7\", \"3.5\", \"3.6\", \"3.7\", \"3.8\", \"3.9\", \"3.10\", \"pypy\"])\ndef test(session):\n    tests_impl(session)\n\n\n@nox.session(python=[\"2\", \"3\"])\ndef google_brotli(session):\n    # https://pypi.org/project/Brotli/ is the Google version of brotli, so\n    # install it separately and don't install our brotli extra (which installs\n    # brotlipy).\n    session.install(\"brotli\")\n    tests_impl(session, extras=\"socks,secure\")\n\n\n@nox.session(python=\"2.7\")\ndef app_engine(session):\n    session.install(\"-r\", \"dev-requirements.txt\")\n    session.install(\".\")\n    session.run(\n        \"coverage\",\n        \"run\",\n        \"--parallel-mode\",\n        \"-m\",\n        \"pytest\",\n        \"-r\",\n        \"sx\",\n        \"test/appengine\",\n        *session.posargs,\n    )\n    session.run(\"coverage\", \"combine\")\n    session.run(\"coverage\", \"report\", \"-m\")\n    session.run(\"coverage\", \"xml\")\n\n\ndef git_clone(session, git_url):\n    session.run(\"git\", \"clone\", \"--depth\", \"1\", git_url, external=True)\n\n\n@nox.session(python=[\"2.7\", \"3.9\"])\ndef downstream_botocore(session):\n    root = os.getcwd()\n    tmp_dir = session.create_tmp()\n\n    session.cd(tmp_dir)\n    git_clone(session, \"https://github.com/boto/botocore\")\n    session.chdir(\"botocore\")\n    session.run(\"git\", \"rev-parse\", \"HEAD\", external=True)\n    session.run(\"python\", \"scripts/ci/install\")\n\n    session.cd(root)\n    session.install(\".\", silent=False)\n    session.cd(f\"{tmp_dir}/botocore\")\n\n    session.run(\"python\", \"scripts/ci/run-tests\")\n\n\n@nox.session(python=[\"2.7\", \"3.9\"])\ndef downstream_requests(session):\n    root = os.getcwd()\n    tmp_dir = session.create_tmp()\n\n    session.cd(tmp_dir)\n    git_clone(session, \"https://github.com/psf/requests\")\n    session.chdir(\"requests\")\n    session.run(\"git\", \"apply\", f\"{root}/ci/requests.patch\", external=True)\n    session.run(\"git\", \"rev-parse\", \"HEAD\", external=True)\n    session.install(\".[socks]\", silent=False)\n    session.install(\"-r\", \"requirements-dev.txt\", silent=False)\n\n    session.cd(root)\n    session.install(\".\", silent=False)\n    session.cd(f\"{tmp_dir}/requests\")\n\n    session.run(\"pytest\", \"tests\")\n\n\n@nox.session()\ndef format(session):\n    \"\"\"Run code formatters.\"\"\"\n    session.install(\"pre-commit\")\n    session.run(\"pre-commit\", \"--version\")\n\n    process = subprocess.run(\n        [\"pre-commit\", \"run\", \"--all-files\"],\n        env=session.env,\n        text=True,\n        stdout=subprocess.PIPE,\n        stderr=subprocess.STDOUT,\n    )\n    # Ensure that pre-commit itself ran successfully\n    assert process.returncode in (0, 1)\n\n    lint(session)\n\n\n@nox.session\ndef lint(session):\n    session.install(\"pre-commit\")\n    session.run(\"pre-commit\", \"run\", \"--all-files\")\n\n\n@nox.session\ndef docs(session):\n    session.install(\"-r\", \"docs/requirements.txt\")\n    session.install(\".[socks,secure,brotli]\")\n\n    session.chdir(\"docs\")\n    if os.path.exists(\"_build\"):\n        shutil.rmtree(\"_build\")\n    session.run(\"sphinx-build\", \"-b\", \"html\", \"-W\", \".\", \"_build/html\")\n", "path": "noxfile.py"}], "after_files": [{"content": "import os\nimport shutil\nimport subprocess\n\nimport nox\n\nSOURCE_FILES = [\n    \"docs/\",\n    \"dummyserver/\",\n    \"src/\",\n    \"test/\",\n    \"noxfile.py\",\n    \"setup.py\",\n]\n\n\ndef tests_impl(session, extras=\"socks,secure,brotli\"):\n    # Install deps and the package itself.\n    session.install(\"-r\", \"dev-requirements.txt\")\n    session.install(\".[{extras}]\".format(extras=extras))\n\n    # Show the pip version.\n    session.run(\"pip\", \"--version\")\n    # Print the Python version and bytesize.\n    session.run(\"python\", \"--version\")\n    session.run(\"python\", \"-c\", \"import struct; print(struct.calcsize('P') * 8)\")\n    # Print OpenSSL information.\n    session.run(\"python\", \"-m\", \"OpenSSL.debug\")\n\n    # Inspired from https://github.com/pyca/cryptography\n    # We use parallel mode and then combine here so that coverage.py will take\n    # the paths like .tox/pyXY/lib/pythonX.Y/site-packages/urllib3/__init__.py\n    # and collapse them into src/urllib3/__init__.py.\n\n    session.run(\n        \"coverage\",\n        \"run\",\n        \"--parallel-mode\",\n        \"-m\",\n        \"pytest\",\n        \"-r\",\n        \"a\",\n        \"--tb=native\",\n        \"--no-success-flaky-report\",\n        *(session.posargs or (\"test/\",)),\n        env={\"PYTHONWARNINGS\": \"always::DeprecationWarning\"},\n    )\n    session.run(\"coverage\", \"combine\")\n    session.run(\"coverage\", \"report\", \"-m\")\n    session.run(\"coverage\", \"xml\")\n\n\n@nox.session(python=[\"2.7\", \"3.5\", \"3.6\", \"3.7\", \"3.8\", \"3.9\", \"3.10\", \"pypy\"])\ndef test(session):\n    tests_impl(session)\n\n\n@nox.session(python=[\"2\", \"3\"])\ndef google_brotli(session):\n    # https://pypi.org/project/Brotli/ is the Google version of brotli, so\n    # install it separately and don't install our brotli extra (which installs\n    # brotlipy).\n    session.install(\"brotli\")\n    tests_impl(session, extras=\"socks,secure\")\n\n\n@nox.session(python=\"2.7\")\ndef app_engine(session):\n    session.install(\"-r\", \"dev-requirements.txt\")\n    session.install(\".\")\n    session.run(\n        \"coverage\",\n        \"run\",\n        \"--parallel-mode\",\n        \"-m\",\n        \"pytest\",\n        \"-r\",\n        \"sx\",\n        \"test/appengine\",\n        *session.posargs,\n    )\n    session.run(\"coverage\", \"combine\")\n    session.run(\"coverage\", \"report\", \"-m\")\n    session.run(\"coverage\", \"xml\")\n\n\ndef git_clone(session, git_url):\n    session.run(\"git\", \"clone\", \"--depth\", \"1\", git_url, external=True)\n\n\n@nox.session(python=[\"3.9\"])\ndef downstream_botocore(session):\n    root = os.getcwd()\n    tmp_dir = session.create_tmp()\n\n    session.cd(tmp_dir)\n    git_clone(session, \"https://github.com/boto/botocore\")\n    session.chdir(\"botocore\")\n    session.run(\"git\", \"rev-parse\", \"HEAD\", external=True)\n    session.run(\"python\", \"scripts/ci/install\")\n\n    session.cd(root)\n    session.install(\".\", silent=False)\n    session.cd(f\"{tmp_dir}/botocore\")\n\n    session.run(\"python\", \"scripts/ci/run-tests\")\n\n\n@nox.session(python=[\"2.7\", \"3.9\"])\ndef downstream_requests(session):\n    root = os.getcwd()\n    tmp_dir = session.create_tmp()\n\n    session.cd(tmp_dir)\n    git_clone(session, \"https://github.com/psf/requests\")\n    session.chdir(\"requests\")\n    session.run(\"git\", \"apply\", f\"{root}/ci/requests.patch\", external=True)\n    session.run(\"git\", \"rev-parse\", \"HEAD\", external=True)\n    session.install(\".[socks]\", silent=False)\n    session.install(\"-r\", \"requirements-dev.txt\", silent=False)\n\n    session.cd(root)\n    session.install(\".\", silent=False)\n    session.cd(f\"{tmp_dir}/requests\")\n\n    session.run(\"pytest\", \"tests\")\n\n\n@nox.session()\ndef format(session):\n    \"\"\"Run code formatters.\"\"\"\n    session.install(\"pre-commit\")\n    session.run(\"pre-commit\", \"--version\")\n\n    process = subprocess.run(\n        [\"pre-commit\", \"run\", \"--all-files\"],\n        env=session.env,\n        text=True,\n        stdout=subprocess.PIPE,\n        stderr=subprocess.STDOUT,\n    )\n    # Ensure that pre-commit itself ran successfully\n    assert process.returncode in (0, 1)\n\n    lint(session)\n\n\n@nox.session\ndef lint(session):\n    session.install(\"pre-commit\")\n    session.run(\"pre-commit\", \"run\", \"--all-files\")\n\n\n@nox.session\ndef docs(session):\n    session.install(\"-r\", \"docs/requirements.txt\")\n    session.install(\".[socks,secure,brotli]\")\n\n    session.chdir(\"docs\")\n    if os.path.exists(\"_build\"):\n        shutil.rmtree(\"_build\")\n    session.run(\"sphinx-build\", \"-b\", \"html\", \"-W\", \".\", \"_build/html\")\n", "path": "noxfile.py"}]}