prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Add a CI lint task to check st2client's README.md
  We need to make sure that the st2client `README.rst` file is acceptable to PyPI, since any syntax errors in it will cause the `push_st2client` task of the `st2cd.st2_finalize_release` workflow to fail.
  
  We can check the syntax using the same renderer that PyPI itself uses:
  
  ```bash
  # Use the same README renderer that PyPI uses to catch syntax issues in the
  # README.rst file  # st2client uses README.rst
  # https://pypi.org/help/#description-content-type
  # https://pypi.org/project/readme-renderer
  # https://packaging.python.org/tutorials/packaging-projects/#description
  echo "Checking README.rst syntax"
  virtualenv venv-st2client-readme-checker
  . venv-st2client-readme-checker/bin/activate
  pip install --upgrade readme_renderer
  python -m readme_renderer README.rst
  deactivate
  ```
  
  It would be nice if we could catch these errors before release, which means that we should create a step in our CI tooling to check it before any bad changes get merged.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `st2client/setup.py`
  Content:
  ```
  1 #!/usr/bin/env python3
  2 # Copyright 2020 The StackStorm Authors.
  3 # Copyright 2019 Extreme Networks, Inc.
  4 #
  5 # Licensed under the Apache License, Version 2.0 (the "License");
  6 # you may not use this file except in compliance with the License.
  7 # You may obtain a copy of the License at
  8 #
  9 #     http://www.apache.org/licenses/LICENSE-2.0
  10 #
  11 # Unless required by applicable law or agreed to in writing, software
  12 # distributed under the License is distributed on an "AS IS" BASIS,
  13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14 # See the License for the specific language governing permissions and
  15 # limitations under the License.
  16 
  17 import os.path
  18 
  19 from setuptools import setup, find_packages
  20 
  21 from dist_utils import check_pip_version
  22 from dist_utils import fetch_requirements
  23 from dist_utils import apply_vagrant_workaround
  24 
  25 from st2client import __version__
  26 
  27 check_pip_version()
  28 
  29 ST2_COMPONENT = "st2client"
  30 BASE_DIR = os.path.dirname(os.path.abspath(__file__))
  31 REQUIREMENTS_FILE = os.path.join(BASE_DIR, "requirements.txt")
  32 README_FILE = os.path.join(BASE_DIR, "README.rst")
  33 
  34 install_reqs, dep_links = fetch_requirements(REQUIREMENTS_FILE)
  35 apply_vagrant_workaround()
  36 
  37 with open(README_FILE) as f:
  38     readme = f.read()
  39 
  40 setup(
  41     name=ST2_COMPONENT,
  42     version=__version__,
  43     description=(
  44         "Python client library and CLI for the StackStorm (st2) event-driven "
  45         "automation platform."
  46     ),
  47     long_description=readme,
  48     author="StackStorm",
  49     author_email="info@stackstorm.com",
  50     url="https://stackstorm.com/",
  51     classifiers=[
  52         "Development Status :: 5 - Production/Stable",
  53         "Intended Audience :: Information Technology",
  54         "Intended Audience :: Developers",
  55         "Intended Audience :: System Administrators",
  56         "License :: OSI Approved :: Apache Software License",
  57         "Operating System :: POSIX :: Linux",
  58         "Programming Language :: Python",
  59         "Programming Language :: Python :: 3",
  60         "Programming Language :: Python :: 3.6",
  61     ],
  62     install_requires=install_reqs,
  63     dependency_links=dep_links,
  64     test_suite=ST2_COMPONENT,
  65     zip_safe=False,
  66     include_package_data=True,
  67     packages=find_packages(exclude=["setuptools", "tests"]),
  68     entry_points={"console_scripts": ["st2 = st2client.shell:main"]},
  69     project_urls={
  70         "Pack Exchange": "https://exchange.stackstorm.org",
  71         "Repository": "https://github.com/StackStorm/st2",
  72         "Documentation": "https://docs.stackstorm.com",
  73         "Community": "https://stackstorm.com/community-signup",
  74         "Questions": "https://forum.stackstorm.com/",
  75         "Donate": "https://funding.communitybridge.org/projects/stackstorm",
  76         "News/Blog": "https://stackstorm.com/blog",
  77         "Security": "https://docs.stackstorm.com/latest/security.html",
  78         "Bug Reports": "https://github.com/StackStorm/st2/issues",
  79     },
  80 )
  81
  ```
  --- 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/st2client/setup.py b/st2client/setup.py
  --- a/st2client/setup.py
  +++ b/st2client/setup.py
  @@ -45,6 +45,7 @@
           "automation platform."
       ),
       long_description=readme,
  +    long_description_content_type="text/x-rst",
       author="StackStorm",
       author_email="info@stackstorm.com",
       url="https://stackstorm.com/",
  
verification_info: {"golden_diff": "diff --git a/st2client/setup.py b/st2client/setup.py\n--- a/st2client/setup.py\n+++ b/st2client/setup.py\n@@ -45,6 +45,7 @@\n         \"automation platform.\"\n     ),\n     long_description=readme,\n+    long_description_content_type=\"text/x-rst\",\n     author=\"StackStorm\",\n     author_email=\"info@stackstorm.com\",\n     url=\"https://stackstorm.com/\",\n", "issue": "Add a CI lint task to check st2client's README.md\nWe need to make sure that the st2client `README.rst` file is acceptable to PyPI, since any syntax errors in it will cause the `push_st2client` task of the `st2cd.st2_finalize_release` workflow to fail.\r\n\r\nWe can check the syntax using the same renderer that PyPI itself uses:\r\n\r\n```bash\r\n# Use the same README renderer that PyPI uses to catch syntax issues in the\r\n# README.rst file  # st2client uses README.rst\r\n# https://pypi.org/help/#description-content-type\r\n# https://pypi.org/project/readme-renderer\r\n# https://packaging.python.org/tutorials/packaging-projects/#description\r\necho \"Checking README.rst syntax\"\r\nvirtualenv venv-st2client-readme-checker\r\n. venv-st2client-readme-checker/bin/activate\r\npip install --upgrade readme_renderer\r\npython -m readme_renderer README.rst\r\ndeactivate\r\n```\r\n\r\nIt would be nice if we could catch these errors before release, which means that we should create a step in our CI tooling to check it before any bad changes get merged.\n", "before_files": [{"content": "#!/usr/bin/env python3\n# Copyright 2020 The StackStorm Authors.\n# Copyright 2019 Extreme Networks, Inc.\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.path\n\nfrom setuptools import setup, find_packages\n\nfrom dist_utils import check_pip_version\nfrom dist_utils import fetch_requirements\nfrom dist_utils import apply_vagrant_workaround\n\nfrom st2client import __version__\n\ncheck_pip_version()\n\nST2_COMPONENT = \"st2client\"\nBASE_DIR = os.path.dirname(os.path.abspath(__file__))\nREQUIREMENTS_FILE = os.path.join(BASE_DIR, \"requirements.txt\")\nREADME_FILE = os.path.join(BASE_DIR, \"README.rst\")\n\ninstall_reqs, dep_links = fetch_requirements(REQUIREMENTS_FILE)\napply_vagrant_workaround()\n\nwith open(README_FILE) as f:\n    readme = f.read()\n\nsetup(\n    name=ST2_COMPONENT,\n    version=__version__,\n    description=(\n        \"Python client library and CLI for the StackStorm (st2) event-driven \"\n        \"automation platform.\"\n    ),\n    long_description=readme,\n    author=\"StackStorm\",\n    author_email=\"info@stackstorm.com\",\n    url=\"https://stackstorm.com/\",\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"Intended Audience :: Information Technology\",\n        \"Intended Audience :: Developers\",\n        \"Intended Audience :: System Administrators\",\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Operating System :: POSIX :: Linux\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n    ],\n    install_requires=install_reqs,\n    dependency_links=dep_links,\n    test_suite=ST2_COMPONENT,\n    zip_safe=False,\n    include_package_data=True,\n    packages=find_packages(exclude=[\"setuptools\", \"tests\"]),\n    entry_points={\"console_scripts\": [\"st2 = st2client.shell:main\"]},\n    project_urls={\n        \"Pack Exchange\": \"https://exchange.stackstorm.org\",\n        \"Repository\": \"https://github.com/StackStorm/st2\",\n        \"Documentation\": \"https://docs.stackstorm.com\",\n        \"Community\": \"https://stackstorm.com/community-signup\",\n        \"Questions\": \"https://forum.stackstorm.com/\",\n        \"Donate\": \"https://funding.communitybridge.org/projects/stackstorm\",\n        \"News/Blog\": \"https://stackstorm.com/blog\",\n        \"Security\": \"https://docs.stackstorm.com/latest/security.html\",\n        \"Bug Reports\": \"https://github.com/StackStorm/st2/issues\",\n    },\n)\n", "path": "st2client/setup.py"}], "after_files": [{"content": "#!/usr/bin/env python3\n# Copyright 2020 The StackStorm Authors.\n# Copyright 2019 Extreme Networks, Inc.\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.path\n\nfrom setuptools import setup, find_packages\n\nfrom dist_utils import check_pip_version\nfrom dist_utils import fetch_requirements\nfrom dist_utils import apply_vagrant_workaround\n\nfrom st2client import __version__\n\ncheck_pip_version()\n\nST2_COMPONENT = \"st2client\"\nBASE_DIR = os.path.dirname(os.path.abspath(__file__))\nREQUIREMENTS_FILE = os.path.join(BASE_DIR, \"requirements.txt\")\nREADME_FILE = os.path.join(BASE_DIR, \"README.rst\")\n\ninstall_reqs, dep_links = fetch_requirements(REQUIREMENTS_FILE)\napply_vagrant_workaround()\n\nwith open(README_FILE) as f:\n    readme = f.read()\n\nsetup(\n    name=ST2_COMPONENT,\n    version=__version__,\n    description=(\n        \"Python client library and CLI for the StackStorm (st2) event-driven \"\n        \"automation platform.\"\n    ),\n    long_description=readme,\n    long_description_content_type=\"text/x-rst\",\n    author=\"StackStorm\",\n    author_email=\"info@stackstorm.com\",\n    url=\"https://stackstorm.com/\",\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"Intended Audience :: Information Technology\",\n        \"Intended Audience :: Developers\",\n        \"Intended Audience :: System Administrators\",\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Operating System :: POSIX :: Linux\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n    ],\n    install_requires=install_reqs,\n    dependency_links=dep_links,\n    test_suite=ST2_COMPONENT,\n    zip_safe=False,\n    include_package_data=True,\n    packages=find_packages(exclude=[\"setuptools\", \"tests\"]),\n    entry_points={\"console_scripts\": [\"st2 = st2client.shell:main\"]},\n    project_urls={\n        \"Pack Exchange\": \"https://exchange.stackstorm.org\",\n        \"Repository\": \"https://github.com/StackStorm/st2\",\n        \"Documentation\": \"https://docs.stackstorm.com\",\n        \"Community\": \"https://stackstorm.com/community-signup\",\n        \"Questions\": \"https://forum.stackstorm.com/\",\n        \"Donate\": \"https://funding.communitybridge.org/projects/stackstorm\",\n        \"News/Blog\": \"https://stackstorm.com/blog\",\n        \"Security\": \"https://docs.stackstorm.com/latest/security.html\",\n        \"Bug Reports\": \"https://github.com/StackStorm/st2/issues\",\n    },\n)\n", "path": "st2client/setup.py"}]}