prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  A new release of rsa dependency breaks Python 2.7 tests
  Recent `rsa` releases are not compatible with Python 2.7 anymore, the last compatible version is 4.0. We need to bound its version in order to preserve Python 2.7 compatibility.
  
  > Major changes in 4.1
  Version 4.0 was the last version to support Python 2 and 3.4. Version 4.1 is compatible with Python 3.5+ only.
  
  --- 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 version = "1.25.0"
  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     'enum34; python_version < "3.4"',
  33     "google-auth >= 1.9.0, < 2.0dev",
  34     "google-api-core >= 1.15.0, < 2.0dev",
  35     "google-cloud-core >= 1.1.0, < 2.0dev",
  36     "google-resumable-media >= 0.5.0, < 0.6dev",
  37     "protobuf >= 3.6.0",
  38     "six >=1.13.0,< 2.0.0dev",
  39 ]
  40 extras = {
  41     "bqstorage": [
  42         "google-cloud-bigquery-storage >= 1.0.0, <2.0.0dev",
  43         # Due to an issue in pip's dependency resolver, the `grpc` extra is not
  44         # installed, even though `google-cloud-bigquery-storage` specifies it
  45         # as `google-api-core[grpc]`. We thus need to explicitly specify it here.
  46         # See: https://github.com/googleapis/python-bigquery/issues/83
  47         "grpcio >= 1.8.2, < 2.0dev",
  48         "pyarrow>=0.16.0, < 2.0dev",
  49     ],
  50     "pandas": ["pandas>=0.17.1"],
  51     # Exclude PyArrow dependency from Windows Python 2.7.
  52     'pyarrow: platform_system != "Windows" or python_version >= "3.4"': [
  53         # Bad Linux release for 0.14.0.
  54         # https://issues.apache.org/jira/browse/ARROW-5868
  55         "pyarrow>=0.4.1, != 0.14.0"
  56     ],
  57     "tqdm": ["tqdm >= 4.0.0, <5.0.0dev"],
  58     "fastparquet": [
  59         "fastparquet",
  60         "python-snappy",
  61         # llvmlite >= 0.32.0 cannot be installed on Python 3.5 and below
  62         # (building the wheel fails), thus needs to be restricted.
  63         # See: https://github.com/googleapis/python-bigquery/issues/78
  64         "llvmlite <= 0.31.0",
  65     ],
  66 }
  67 
  68 all_extras = []
  69 
  70 for extra in extras:
  71     if extra == "fastparquet":
  72         # Skip fastparquet from "all" because it is redundant with pyarrow and
  73         # creates a dependency on pre-release versions of numpy. See:
  74         # https://github.com/googleapis/google-cloud-python/issues/8549
  75         continue
  76     all_extras.extend(extras[extra])
  77 
  78 extras["all"] = all_extras
  79 
  80 # Setup boilerplate below this line.
  81 
  82 package_root = os.path.abspath(os.path.dirname(__file__))
  83 
  84 readme_filename = os.path.join(package_root, "README.rst")
  85 with io.open(readme_filename, encoding="utf-8") as readme_file:
  86     readme = readme_file.read()
  87 
  88 # Only include packages under the 'google' namespace. Do not include tests,
  89 # benchmarks, etc.
  90 packages = [
  91     package for package in setuptools.find_packages() if package.startswith("google")
  92 ]
  93 
  94 # Determine which namespaces are needed.
  95 namespaces = ["google"]
  96 if "google.cloud" in packages:
  97     namespaces.append("google.cloud")
  98 
  99 
  100 setuptools.setup(
  101     name=name,
  102     version=version,
  103     description=description,
  104     long_description=readme,
  105     author="Google LLC",
  106     author_email="googleapis-packages@google.com",
  107     license="Apache 2.0",
  108     url="https://github.com/googleapis/python-bigquery",
  109     classifiers=[
  110         release_status,
  111         "Intended Audience :: Developers",
  112         "License :: OSI Approved :: Apache Software License",
  113         "Programming Language :: Python",
  114         "Programming Language :: Python :: 2",
  115         "Programming Language :: Python :: 2.7",
  116         "Programming Language :: Python :: 3",
  117         "Programming Language :: Python :: 3.5",
  118         "Programming Language :: Python :: 3.6",
  119         "Programming Language :: Python :: 3.7",
  120         "Programming Language :: Python :: 3.8",
  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=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*",
  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()
  
  ```
  
golden_diff: diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -36,6 +36,10 @@
       "google-resumable-media >= 0.5.0, < 0.6dev",
       "protobuf >= 3.6.0",
       "six >=1.13.0,< 2.0.0dev",
  +    # rsa >= 4.1 is not compatible with Python 2
  +    # https://github.com/sybrenstuvel/python-rsa/issues/152
  +    'rsa <4.1; python_version < "3"',
  +    'rsa >=3.1.4, <5; python_version >= "3"',
   ]
   extras = {
       "bqstorage": [
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -36,6 +36,10 @@\n     \"google-resumable-media >= 0.5.0, < 0.6dev\",\n     \"protobuf >= 3.6.0\",\n     \"six >=1.13.0,< 2.0.0dev\",\n+    # rsa >= 4.1 is not compatible with Python 2\n+    # https://github.com/sybrenstuvel/python-rsa/issues/152\n+    'rsa <4.1; python_version < \"3\"',\n+    'rsa >=3.1.4, <5; python_version >= \"3\"',\n ]\n extras = {\n     \"bqstorage\": [\n", "issue": "A new release of rsa dependency breaks Python 2.7 tests\nRecent `rsa` releases are not compatible with Python 2.7 anymore, the last compatible version is 4.0. We need to bound its version in order to preserve Python 2.7 compatibility.\r\n\r\n> Major changes in 4.1\r\nVersion 4.0 was the last version to support Python 2 and 3.4. Version 4.1 is compatible with Python 3.5+ only.\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\"\nversion = \"1.25.0\"\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    'enum34; python_version < \"3.4\"',\n    \"google-auth >= 1.9.0, < 2.0dev\",\n    \"google-api-core >= 1.15.0, < 2.0dev\",\n    \"google-cloud-core >= 1.1.0, < 2.0dev\",\n    \"google-resumable-media >= 0.5.0, < 0.6dev\",\n    \"protobuf >= 3.6.0\",\n    \"six >=1.13.0,< 2.0.0dev\",\n]\nextras = {\n    \"bqstorage\": [\n        \"google-cloud-bigquery-storage >= 1.0.0, <2.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\n        \"grpcio >= 1.8.2, < 2.0dev\",\n        \"pyarrow>=0.16.0, < 2.0dev\",\n    ],\n    \"pandas\": [\"pandas>=0.17.1\"],\n    # Exclude PyArrow dependency from Windows Python 2.7.\n    'pyarrow: platform_system != \"Windows\" or python_version >= \"3.4\"': [\n        # Bad Linux release for 0.14.0.\n        # https://issues.apache.org/jira/browse/ARROW-5868\n        \"pyarrow>=0.4.1, != 0.14.0\"\n    ],\n    \"tqdm\": [\"tqdm >= 4.0.0, <5.0.0dev\"],\n    \"fastparquet\": [\n        \"fastparquet\",\n        \"python-snappy\",\n        # llvmlite >= 0.32.0 cannot be installed on Python 3.5 and below\n        # (building the wheel fails), thus needs to be restricted.\n        # See: https://github.com/googleapis/python-bigquery/issues/78\n        \"llvmlite <= 0.31.0\",\n    ],\n}\n\nall_extras = []\n\nfor extra in extras:\n    if extra == \"fastparquet\":\n        # Skip fastparquet from \"all\" because it is redundant with pyarrow and\n        # creates a dependency on pre-release versions of numpy. See:\n        # https://github.com/googleapis/google-cloud-python/issues/8549\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\n# Only include packages under the 'google' namespace. Do not include tests,\n# benchmarks, etc.\npackages = [\n    package for package in setuptools.find_packages() 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 :: 2\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.5\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\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=\">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*\",\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\"\nversion = \"1.25.0\"\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    'enum34; python_version < \"3.4\"',\n    \"google-auth >= 1.9.0, < 2.0dev\",\n    \"google-api-core >= 1.15.0, < 2.0dev\",\n    \"google-cloud-core >= 1.1.0, < 2.0dev\",\n    \"google-resumable-media >= 0.5.0, < 0.6dev\",\n    \"protobuf >= 3.6.0\",\n    \"six >=1.13.0,< 2.0.0dev\",\n    # rsa >= 4.1 is not compatible with Python 2\n    # https://github.com/sybrenstuvel/python-rsa/issues/152\n    'rsa <4.1; python_version < \"3\"',\n    'rsa >=3.1.4, <5; python_version >= \"3\"',\n]\nextras = {\n    \"bqstorage\": [\n        \"google-cloud-bigquery-storage >= 1.0.0, <2.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\n        \"grpcio >= 1.8.2, < 2.0dev\",\n        \"pyarrow>=0.16.0, < 2.0dev\",\n    ],\n    \"pandas\": [\"pandas>=0.17.1\"],\n    # Exclude PyArrow dependency from Windows Python 2.7.\n    'pyarrow: platform_system != \"Windows\" or python_version >= \"3.4\"': [\n        # Bad Linux release for 0.14.0.\n        # https://issues.apache.org/jira/browse/ARROW-5868\n        \"pyarrow>=0.4.1, != 0.14.0\"\n    ],\n    \"tqdm\": [\"tqdm >= 4.0.0, <5.0.0dev\"],\n    \"fastparquet\": [\n        \"fastparquet\",\n        \"python-snappy\",\n        # llvmlite >= 0.32.0 cannot be installed on Python 3.5 and below\n        # (building the wheel fails), thus needs to be restricted.\n        # See: https://github.com/googleapis/python-bigquery/issues/78\n        \"llvmlite <= 0.31.0\",\n    ],\n}\n\nall_extras = []\n\nfor extra in extras:\n    if extra == \"fastparquet\":\n        # Skip fastparquet from \"all\" because it is redundant with pyarrow and\n        # creates a dependency on pre-release versions of numpy. See:\n        # https://github.com/googleapis/google-cloud-python/issues/8549\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\n# Only include packages under the 'google' namespace. Do not include tests,\n# benchmarks, etc.\npackages = [\n    package for package in setuptools.find_packages() 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 :: 2\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.5\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\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=\">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*\",\n    include_package_data=True,\n    zip_safe=False,\n)\n", "path": "setup.py"}]}