We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Expand range for 'google-{api-core,cloud-core,resumable-media}' to allow 2.x versions


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 # Copyright 2018 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 io
16 import os
17 
18 import setuptools
19 
20 
21 # Package metadata.
22 
23 name = "google-cloud-bigquery"
24 description = "Google BigQuery API client library"
25 
26 # Should be one of:
27 # 'Development Status :: 3 - Alpha'
28 # 'Development Status :: 4 - Beta'
29 # 'Development Status :: 5 - Production/Stable'
30 release_status = "Development Status :: 5 - Production/Stable"
31 dependencies = [
32     "grpcio >= 1.38.1, < 2.0dev",  # https://github.com/googleapis/python-bigquery/issues/695
33     "google-api-core[grpc] >= 1.29.0, < 2.0.0dev",
34     "proto-plus >= 1.10.0",
35     "google-cloud-core >= 1.4.1, < 2.0dev",
36     "google-resumable-media >= 0.6.0, < 2.0dev",
37     "packaging >= 14.3",
38     "protobuf >= 3.12.0",
39     "requests >= 2.18.0, < 3.0.0dev",
40 ]
41 extras = {
42     "bqstorage": [
43         "google-cloud-bigquery-storage >= 2.0.0, <3.0.0dev",
44         # Due to an issue in pip's dependency resolver, the `grpc` extra is not
45         # installed, even though `google-cloud-bigquery-storage` specifies it
46         # as `google-api-core[grpc]`. We thus need to explicitly specify it here.
47         # See: https://github.com/googleapis/python-bigquery/issues/83 The
48         # grpc.Channel.close() method isn't added until 1.32.0.
49         # https://github.com/grpc/grpc/pull/15254
50         "grpcio >= 1.38.1, < 2.0dev",
51         "pyarrow >= 1.0.0, < 5.0dev",
52     ],
53     "pandas": ["pandas>=0.23.0", "pyarrow >= 1.0.0, < 5.0dev"],
54     "bignumeric_type": ["pyarrow >= 3.0.0, < 5.0dev"],
55     "tqdm": ["tqdm >= 4.7.4, <5.0.0dev"],
56     "opentelemetry": [
57         "opentelemetry-api >= 0.11b0",
58         "opentelemetry-sdk >= 0.11b0",
59         "opentelemetry-instrumentation >= 0.11b0",
60     ],
61 }
62 
63 all_extras = []
64 
65 for extra in extras:
66     # Exclude this extra from all to avoid overly strict dependencies on core
67     # libraries such as pyarrow.
68     # https://github.com/googleapis/python-bigquery/issues/563
69     if extra in {"bignumeric_type"}:
70         continue
71     all_extras.extend(extras[extra])
72 
73 extras["all"] = all_extras
74 
75 # Setup boilerplate below this line.
76 
77 package_root = os.path.abspath(os.path.dirname(__file__))
78 
79 readme_filename = os.path.join(package_root, "README.rst")
80 with io.open(readme_filename, encoding="utf-8") as readme_file:
81     readme = readme_file.read()
82 
83 version = {}
84 with open(os.path.join(package_root, "google/cloud/bigquery/version.py")) as fp:
85     exec(fp.read(), version)
86 version = version["__version__"]
87 
88 # Only include packages under the 'google' namespace. Do not include tests,
89 # benchmarks, etc.
90 packages = [
91     package
92     for package in setuptools.PEP420PackageFinder.find()
93     if package.startswith("google")
94 ]
95 
96 # Determine which namespaces are needed.
97 namespaces = ["google"]
98 if "google.cloud" in packages:
99     namespaces.append("google.cloud")
100 
101 
102 setuptools.setup(
103     name=name,
104     version=version,
105     description=description,
106     long_description=readme,
107     author="Google LLC",
108     author_email="googleapis-packages@google.com",
109     license="Apache 2.0",
110     url="https://github.com/googleapis/python-bigquery",
111     classifiers=[
112         release_status,
113         "Intended Audience :: Developers",
114         "License :: OSI Approved :: Apache Software License",
115         "Programming Language :: Python",
116         "Programming Language :: Python :: 3",
117         "Programming Language :: Python :: 3.6",
118         "Programming Language :: Python :: 3.7",
119         "Programming Language :: Python :: 3.8",
120         "Programming Language :: Python :: 3.9",
121         "Operating System :: OS Independent",
122         "Topic :: Internet",
123     ],
124     platforms="Posix; MacOS X; Windows",
125     packages=packages,
126     namespace_packages=namespaces,
127     install_requires=dependencies,
128     extras_require=extras,
129     python_requires=">=3.6, <3.10",
130     include_package_data=True,
131     zip_safe=False,
132 )
133
```
--- 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/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -30,10 +30,10 @@
 release_status = "Development Status :: 5 - Production/Stable"
 dependencies = [
     "grpcio >= 1.38.1, < 2.0dev",  # https://github.com/googleapis/python-bigquery/issues/695
-    "google-api-core[grpc] >= 1.29.0, < 2.0.0dev",
+    "google-api-core[grpc] >= 1.29.0, < 3.0.0dev",
     "proto-plus >= 1.10.0",
-    "google-cloud-core >= 1.4.1, < 2.0dev",
-    "google-resumable-media >= 0.6.0, < 2.0dev",
+    "google-cloud-core >= 1.4.1, < 3.0dev",
+    "google-resumable-media >= 0.6.0, < 3.0dev",
     "packaging >= 14.3",
     "protobuf >= 3.12.0",
     "requests >= 2.18.0, < 3.0.0dev",

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -30,10 +30,10 @@\n release_status = \"Development Status :: 5 - Production/Stable\"\n dependencies = [\n     \"grpcio >= 1.38.1, < 2.0dev\",  # https://github.com/googleapis/python-bigquery/issues/695\n-    \"google-api-core[grpc] >= 1.29.0, < 2.0.0dev\",\n+    \"google-api-core[grpc] >= 1.29.0, < 3.0.0dev\",\n     \"proto-plus >= 1.10.0\",\n-    \"google-cloud-core >= 1.4.1, < 2.0dev\",\n-    \"google-resumable-media >= 0.6.0, < 2.0dev\",\n+    \"google-cloud-core >= 1.4.1, < 3.0dev\",\n+    \"google-resumable-media >= 0.6.0, < 3.0dev\",\n     \"packaging >= 14.3\",\n     \"protobuf >= 3.12.0\",\n     \"requests >= 2.18.0, < 3.0.0dev\",\n", "issue": "Expand range for 'google-{api-core,cloud-core,resumable-media}' to allow 2.x versions\n\n", "before_files": [{"content": "# Copyright 2018 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 io\nimport os\n\nimport setuptools\n\n\n# Package metadata.\n\nname = \"google-cloud-bigquery\"\ndescription = \"Google BigQuery API client library\"\n\n# Should be one of:\n# 'Development Status :: 3 - Alpha'\n# 'Development Status :: 4 - Beta'\n# 'Development Status :: 5 - Production/Stable'\nrelease_status = \"Development Status :: 5 - Production/Stable\"\ndependencies = [\n    \"grpcio >= 1.38.1, < 2.0dev\",  # https://github.com/googleapis/python-bigquery/issues/695\n    \"google-api-core[grpc] >= 1.29.0, < 2.0.0dev\",\n    \"proto-plus >= 1.10.0\",\n    \"google-cloud-core >= 1.4.1, < 2.0dev\",\n    \"google-resumable-media >= 0.6.0, < 2.0dev\",\n    \"packaging >= 14.3\",\n    \"protobuf >= 3.12.0\",\n    \"requests >= 2.18.0, < 3.0.0dev\",\n]\nextras = {\n    \"bqstorage\": [\n        \"google-cloud-bigquery-storage >= 2.0.0, <3.0.0dev\",\n        # Due to an issue in pip's dependency resolver, the `grpc` extra is not\n        # installed, even though `google-cloud-bigquery-storage` specifies it\n        # as `google-api-core[grpc]`. We thus need to explicitly specify it here.\n        # See: https://github.com/googleapis/python-bigquery/issues/83 The\n        # grpc.Channel.close() method isn't added until 1.32.0.\n        # https://github.com/grpc/grpc/pull/15254\n        \"grpcio >= 1.38.1, < 2.0dev\",\n        \"pyarrow >= 1.0.0, < 5.0dev\",\n    ],\n    \"pandas\": [\"pandas>=0.23.0\", \"pyarrow >= 1.0.0, < 5.0dev\"],\n    \"bignumeric_type\": [\"pyarrow >= 3.0.0, < 5.0dev\"],\n    \"tqdm\": [\"tqdm >= 4.7.4, <5.0.0dev\"],\n    \"opentelemetry\": [\n        \"opentelemetry-api >= 0.11b0\",\n        \"opentelemetry-sdk >= 0.11b0\",\n        \"opentelemetry-instrumentation >= 0.11b0\",\n    ],\n}\n\nall_extras = []\n\nfor extra in extras:\n    # Exclude this extra from all to avoid overly strict dependencies on core\n    # libraries such as pyarrow.\n    # https://github.com/googleapis/python-bigquery/issues/563\n    if extra in {\"bignumeric_type\"}:\n        continue\n    all_extras.extend(extras[extra])\n\nextras[\"all\"] = all_extras\n\n# Setup boilerplate below this line.\n\npackage_root = os.path.abspath(os.path.dirname(__file__))\n\nreadme_filename = os.path.join(package_root, \"README.rst\")\nwith io.open(readme_filename, encoding=\"utf-8\") as readme_file:\n    readme = readme_file.read()\n\nversion = {}\nwith open(os.path.join(package_root, \"google/cloud/bigquery/version.py\")) as fp:\n    exec(fp.read(), version)\nversion = version[\"__version__\"]\n\n# Only include packages under the 'google' namespace. Do not include tests,\n# benchmarks, etc.\npackages = [\n    package\n    for package in setuptools.PEP420PackageFinder.find()\n    if package.startswith(\"google\")\n]\n\n# Determine which namespaces are needed.\nnamespaces = [\"google\"]\nif \"google.cloud\" in packages:\n    namespaces.append(\"google.cloud\")\n\n\nsetuptools.setup(\n    name=name,\n    version=version,\n    description=description,\n    long_description=readme,\n    author=\"Google LLC\",\n    author_email=\"googleapis-packages@google.com\",\n    license=\"Apache 2.0\",\n    url=\"https://github.com/googleapis/python-bigquery\",\n    classifiers=[\n        release_status,\n        \"Intended Audience :: Developers\",\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Operating System :: OS Independent\",\n        \"Topic :: Internet\",\n    ],\n    platforms=\"Posix; MacOS X; Windows\",\n    packages=packages,\n    namespace_packages=namespaces,\n    install_requires=dependencies,\n    extras_require=extras,\n    python_requires=\">=3.6, <3.10\",\n    include_package_data=True,\n    zip_safe=False,\n)\n", "path": "setup.py"}], "after_files": [{"content": "# Copyright 2018 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 io\nimport os\n\nimport setuptools\n\n\n# Package metadata.\n\nname = \"google-cloud-bigquery\"\ndescription = \"Google BigQuery API client library\"\n\n# Should be one of:\n# 'Development Status :: 3 - Alpha'\n# 'Development Status :: 4 - Beta'\n# 'Development Status :: 5 - Production/Stable'\nrelease_status = \"Development Status :: 5 - Production/Stable\"\ndependencies = [\n    \"grpcio >= 1.38.1, < 2.0dev\",  # https://github.com/googleapis/python-bigquery/issues/695\n    \"google-api-core[grpc] >= 1.29.0, < 3.0.0dev\",\n    \"proto-plus >= 1.10.0\",\n    \"google-cloud-core >= 1.4.1, < 3.0dev\",\n    \"google-resumable-media >= 0.6.0, < 3.0dev\",\n    \"packaging >= 14.3\",\n    \"protobuf >= 3.12.0\",\n    \"requests >= 2.18.0, < 3.0.0dev\",\n]\nextras = {\n    \"bqstorage\": [\n        \"google-cloud-bigquery-storage >= 2.0.0, <3.0.0dev\",\n        # Due to an issue in pip's dependency resolver, the `grpc` extra is not\n        # installed, even though `google-cloud-bigquery-storage` specifies it\n        # as `google-api-core[grpc]`. We thus need to explicitly specify it here.\n        # See: https://github.com/googleapis/python-bigquery/issues/83 The\n        # grpc.Channel.close() method isn't added until 1.32.0.\n        # https://github.com/grpc/grpc/pull/15254\n        \"grpcio >= 1.38.1, < 2.0dev\",\n        \"pyarrow >= 1.0.0, < 5.0dev\",\n    ],\n    \"pandas\": [\"pandas>=0.23.0\", \"pyarrow >= 1.0.0, < 5.0dev\"],\n    \"bignumeric_type\": [\"pyarrow >= 3.0.0, < 5.0dev\"],\n    \"tqdm\": [\"tqdm >= 4.7.4, <5.0.0dev\"],\n    \"opentelemetry\": [\n        \"opentelemetry-api >= 0.11b0\",\n        \"opentelemetry-sdk >= 0.11b0\",\n        \"opentelemetry-instrumentation >= 0.11b0\",\n    ],\n}\n\nall_extras = []\n\nfor extra in extras:\n    # Exclude this extra from all to avoid overly strict dependencies on core\n    # libraries such as pyarrow.\n    # https://github.com/googleapis/python-bigquery/issues/563\n    if extra in {\"bignumeric_type\"}:\n        continue\n    all_extras.extend(extras[extra])\n\nextras[\"all\"] = all_extras\n\n# Setup boilerplate below this line.\n\npackage_root = os.path.abspath(os.path.dirname(__file__))\n\nreadme_filename = os.path.join(package_root, \"README.rst\")\nwith io.open(readme_filename, encoding=\"utf-8\") as readme_file:\n    readme = readme_file.read()\n\nversion = {}\nwith open(os.path.join(package_root, \"google/cloud/bigquery/version.py\")) as fp:\n    exec(fp.read(), version)\nversion = version[\"__version__\"]\n\n# Only include packages under the 'google' namespace. Do not include tests,\n# benchmarks, etc.\npackages = [\n    package\n    for package in setuptools.PEP420PackageFinder.find()\n    if package.startswith(\"google\")\n]\n\n# Determine which namespaces are needed.\nnamespaces = [\"google\"]\nif \"google.cloud\" in packages:\n    namespaces.append(\"google.cloud\")\n\n\nsetuptools.setup(\n    name=name,\n    version=version,\n    description=description,\n    long_description=readme,\n    author=\"Google LLC\",\n    author_email=\"googleapis-packages@google.com\",\n    license=\"Apache 2.0\",\n    url=\"https://github.com/googleapis/python-bigquery\",\n    classifiers=[\n        release_status,\n        \"Intended Audience :: Developers\",\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Operating System :: OS Independent\",\n        \"Topic :: Internet\",\n    ],\n    platforms=\"Posix; MacOS X; Windows\",\n    packages=packages,\n    namespace_packages=namespaces,\n    install_requires=dependencies,\n    extras_require=extras,\n    python_requires=\">=3.6, <3.10\",\n    include_package_data=True,\n    zip_safe=False,\n)\n", "path": "setup.py"}]}