prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Change appveyor account
  https://github.com/aio-libs/aiohttp/pull/2990#discussion_r187559585:
  
  > This requires owner privileges AFAIR, so I can't. It's a bit tricky, but the bottom line is that you create a team there mapped to the team in GitHub and give it some access there. Also you need to somehow create an org link there.
  
  > Here you go: https://www.appveyor.com/docs/team-setup/#setting-up-appveyor-account-for-github-organization
  Create a separate account called aio-libs and then add your personal account as its administrator. You can also create team mapped to some team in GitHub, allowing its members to cancel/rerun builds.
  
  --- 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 import codecs
  2 import pathlib
  3 import re
  4 import sys
  5 from distutils.command.build_ext import build_ext
  6 from distutils.errors import (CCompilerError, DistutilsExecError,
  7                               DistutilsPlatformError)
  8 
  9 from setuptools import Extension, setup
  10 
  11 
  12 if sys.version_info < (3, 5, 3):
  13     raise RuntimeError("aiohttp 3.x requires Python 3.5.3+")
  14 
  15 
  16 try:
  17     from Cython.Build import cythonize
  18     USE_CYTHON = True
  19 except ImportError:
  20     USE_CYTHON = False
  21 
  22 ext = '.pyx' if USE_CYTHON else '.c'
  23 
  24 
  25 extensions = [Extension('aiohttp._websocket', ['aiohttp/_websocket' + ext]),
  26               Extension('aiohttp._http_parser',
  27                         ['aiohttp/_http_parser' + ext,
  28                          'vendor/http-parser/http_parser.c'],
  29                         define_macros=[('HTTP_PARSER_STRICT', 0)],
  30                         ),
  31               Extension('aiohttp._frozenlist',
  32                         ['aiohttp/_frozenlist' + ext]),
  33               Extension('aiohttp._helpers',
  34                         ['aiohttp/_helpers' + ext]),
  35               Extension('aiohttp._http_writer',
  36                         ['aiohttp/_http_writer' + ext])]
  37 
  38 
  39 if USE_CYTHON:
  40     extensions = cythonize(extensions)
  41 
  42 
  43 class BuildFailed(Exception):
  44     pass
  45 
  46 
  47 class ve_build_ext(build_ext):
  48     # This class allows C extension building to fail.
  49 
  50     def run(self):
  51         try:
  52             build_ext.run(self)
  53         except (DistutilsPlatformError, FileNotFoundError):
  54             raise BuildFailed()
  55 
  56     def build_extension(self, ext):
  57         try:
  58             build_ext.build_extension(self, ext)
  59         except (CCompilerError, DistutilsExecError,
  60                 DistutilsPlatformError, ValueError):
  61             raise BuildFailed()
  62 
  63 
  64 here = pathlib.Path(__file__).parent
  65 
  66 txt = (here / 'aiohttp' / '__init__.py').read_text('utf-8')
  67 try:
  68     version = re.findall(r"^__version__ = '([^']+)'\r?$",
  69                          txt, re.M)[0]
  70 except IndexError:
  71     raise RuntimeError('Unable to determine version.')
  72 
  73 
  74 install_requires = ['attrs>=17.3.0', 'chardet>=2.0,<4.0',
  75                     'multidict>=4.0,<5.0',
  76                     'async_timeout>=3.0,<4.0',
  77                     'yarl>=1.0,<2.0']
  78 
  79 if sys.version_info < (3, 7):
  80     install_requires.append('idna-ssl>=1.0')
  81 
  82 
  83 def read(f):
  84     return (here / f).read_text('utf-8').strip()
  85 
  86 
  87 NEEDS_PYTEST = {'pytest', 'test'}.intersection(sys.argv)
  88 pytest_runner = ['pytest-runner'] if NEEDS_PYTEST else []
  89 
  90 tests_require = ['pytest', 'gunicorn',
  91                  'pytest-timeout', 'async-generator']
  92 
  93 
  94 args = dict(
  95     name='aiohttp',
  96     version=version,
  97     description='Async http client/server framework (asyncio)',
  98     long_description='\n\n'.join((read('README.rst'), read('CHANGES.rst'))),
  99     classifiers=[
  100         'License :: OSI Approved :: Apache Software License',
  101         'Intended Audience :: Developers',
  102         'Programming Language :: Python',
  103         'Programming Language :: Python :: 3',
  104         'Programming Language :: Python :: 3.5',
  105         'Programming Language :: Python :: 3.6',
  106         'Programming Language :: Python :: 3.7',
  107         'Development Status :: 5 - Production/Stable',
  108         'Operating System :: POSIX',
  109         'Operating System :: MacOS :: MacOS X',
  110         'Operating System :: Microsoft :: Windows',
  111         'Topic :: Internet :: WWW/HTTP',
  112         'Framework :: AsyncIO',
  113     ],
  114     author='Nikolay Kim',
  115     author_email='fafhrd91@gmail.com',
  116     maintainer=', '.join(('Nikolay Kim <fafhrd91@gmail.com>',
  117                           'Andrew Svetlov <andrew.svetlov@gmail.com>')),
  118     maintainer_email='aio-libs@googlegroups.com',
  119     url='https://github.com/aio-libs/aiohttp',
  120     project_urls={
  121         'Chat: Gitter': 'https://gitter.im/aio-libs/Lobby',
  122         'CI: AppVeyor': 'https://ci.appveyor.com/project/asvetlov/aiohttp',  # FIXME: move under aio-libs/* slug
  123         'CI: Circle': 'https://circleci.com/gh/aio-libs/aiohttp',
  124         'CI: Shippable': 'https://app.shippable.com/github/aio-libs/aiohttp',
  125         'CI: Travis': 'https://travis-ci.com/aio-libs/aiohttp',
  126         'Coverage: codecov': 'https://codecov.io/github/aio-libs/aiohttp',
  127         'Docs: RTD': 'https://docs.aiohttp.org',
  128         'GitHub: issues': 'https://github.com/aio-libs/aiohttp/issues',
  129         'GitHub: repo': 'https://github.com/aio-libs/aiohttp',
  130     },
  131     license='Apache 2',
  132     packages=['aiohttp'],
  133     python_requires='>=3.5.3',
  134     install_requires=install_requires,
  135     tests_require=tests_require,
  136     setup_requires=pytest_runner,
  137     include_package_data=True,
  138     ext_modules=extensions,
  139     cmdclass=dict(build_ext=ve_build_ext),
  140 )
  141 
  142 try:
  143     setup(**args)
  144 except BuildFailed:
  145     print("************************************************************")
  146     print("Cannot compile C accelerator module, use pure python version")
  147     print("************************************************************")
  148     del args['ext_modules']
  149     del args['cmdclass']
  150     setup(**args)
  151
  ```
  --- 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
  @@ -119,7 +119,7 @@
       url='https://github.com/aio-libs/aiohttp',
       project_urls={
           'Chat: Gitter': 'https://gitter.im/aio-libs/Lobby',
  -        'CI: AppVeyor': 'https://ci.appveyor.com/project/asvetlov/aiohttp',  # FIXME: move under aio-libs/* slug
  +        'CI: AppVeyor': 'https://ci.appveyor.com/project/aio-libs/aiohttp',
           'CI: Circle': 'https://circleci.com/gh/aio-libs/aiohttp',
           'CI: Shippable': 'https://app.shippable.com/github/aio-libs/aiohttp',
           'CI: Travis': 'https://travis-ci.com/aio-libs/aiohttp',
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -119,7 +119,7 @@\n     url='https://github.com/aio-libs/aiohttp',\n     project_urls={\n         'Chat: Gitter': 'https://gitter.im/aio-libs/Lobby',\n-        'CI: AppVeyor': 'https://ci.appveyor.com/project/asvetlov/aiohttp',  # FIXME: move under aio-libs/* slug\n+        'CI: AppVeyor': 'https://ci.appveyor.com/project/aio-libs/aiohttp',\n         'CI: Circle': 'https://circleci.com/gh/aio-libs/aiohttp',\n         'CI: Shippable': 'https://app.shippable.com/github/aio-libs/aiohttp',\n         'CI: Travis': 'https://travis-ci.com/aio-libs/aiohttp',\n", "issue": "Change appveyor account\nhttps://github.com/aio-libs/aiohttp/pull/2990#discussion_r187559585:\r\n\r\n> This requires owner privileges AFAIR, so I can't. It's a bit tricky, but the bottom line is that you create a team there mapped to the team in GitHub and give it some access there. Also you need to somehow create an org link there.\r\n\r\n> Here you go: https://www.appveyor.com/docs/team-setup/#setting-up-appveyor-account-for-github-organization\r\nCreate a separate account called aio-libs and then add your personal account as its administrator. You can also create team mapped to some team in GitHub, allowing its members to cancel/rerun builds.\n", "before_files": [{"content": "import codecs\nimport pathlib\nimport re\nimport sys\nfrom distutils.command.build_ext import build_ext\nfrom distutils.errors import (CCompilerError, DistutilsExecError,\n                              DistutilsPlatformError)\n\nfrom setuptools import Extension, setup\n\n\nif sys.version_info < (3, 5, 3):\n    raise RuntimeError(\"aiohttp 3.x requires Python 3.5.3+\")\n\n\ntry:\n    from Cython.Build import cythonize\n    USE_CYTHON = True\nexcept ImportError:\n    USE_CYTHON = False\n\next = '.pyx' if USE_CYTHON else '.c'\n\n\nextensions = [Extension('aiohttp._websocket', ['aiohttp/_websocket' + ext]),\n              Extension('aiohttp._http_parser',\n                        ['aiohttp/_http_parser' + ext,\n                         'vendor/http-parser/http_parser.c'],\n                        define_macros=[('HTTP_PARSER_STRICT', 0)],\n                        ),\n              Extension('aiohttp._frozenlist',\n                        ['aiohttp/_frozenlist' + ext]),\n              Extension('aiohttp._helpers',\n                        ['aiohttp/_helpers' + ext]),\n              Extension('aiohttp._http_writer',\n                        ['aiohttp/_http_writer' + ext])]\n\n\nif USE_CYTHON:\n    extensions = cythonize(extensions)\n\n\nclass BuildFailed(Exception):\n    pass\n\n\nclass ve_build_ext(build_ext):\n    # This class allows C extension building to fail.\n\n    def run(self):\n        try:\n            build_ext.run(self)\n        except (DistutilsPlatformError, FileNotFoundError):\n            raise BuildFailed()\n\n    def build_extension(self, ext):\n        try:\n            build_ext.build_extension(self, ext)\n        except (CCompilerError, DistutilsExecError,\n                DistutilsPlatformError, ValueError):\n            raise BuildFailed()\n\n\nhere = pathlib.Path(__file__).parent\n\ntxt = (here / 'aiohttp' / '__init__.py').read_text('utf-8')\ntry:\n    version = re.findall(r\"^__version__ = '([^']+)'\\r?$\",\n                         txt, re.M)[0]\nexcept IndexError:\n    raise RuntimeError('Unable to determine version.')\n\n\ninstall_requires = ['attrs>=17.3.0', 'chardet>=2.0,<4.0',\n                    'multidict>=4.0,<5.0',\n                    'async_timeout>=3.0,<4.0',\n                    'yarl>=1.0,<2.0']\n\nif sys.version_info < (3, 7):\n    install_requires.append('idna-ssl>=1.0')\n\n\ndef read(f):\n    return (here / f).read_text('utf-8').strip()\n\n\nNEEDS_PYTEST = {'pytest', 'test'}.intersection(sys.argv)\npytest_runner = ['pytest-runner'] if NEEDS_PYTEST else []\n\ntests_require = ['pytest', 'gunicorn',\n                 'pytest-timeout', 'async-generator']\n\n\nargs = dict(\n    name='aiohttp',\n    version=version,\n    description='Async http client/server framework (asyncio)',\n    long_description='\\n\\n'.join((read('README.rst'), read('CHANGES.rst'))),\n    classifiers=[\n        'License :: OSI Approved :: Apache Software License',\n        'Intended Audience :: Developers',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n        'Development Status :: 5 - Production/Stable',\n        'Operating System :: POSIX',\n        'Operating System :: MacOS :: MacOS X',\n        'Operating System :: Microsoft :: Windows',\n        'Topic :: Internet :: WWW/HTTP',\n        'Framework :: AsyncIO',\n    ],\n    author='Nikolay Kim',\n    author_email='fafhrd91@gmail.com',\n    maintainer=', '.join(('Nikolay Kim <fafhrd91@gmail.com>',\n                          'Andrew Svetlov <andrew.svetlov@gmail.com>')),\n    maintainer_email='aio-libs@googlegroups.com',\n    url='https://github.com/aio-libs/aiohttp',\n    project_urls={\n        'Chat: Gitter': 'https://gitter.im/aio-libs/Lobby',\n        'CI: AppVeyor': 'https://ci.appveyor.com/project/asvetlov/aiohttp',  # FIXME: move under aio-libs/* slug\n        'CI: Circle': 'https://circleci.com/gh/aio-libs/aiohttp',\n        'CI: Shippable': 'https://app.shippable.com/github/aio-libs/aiohttp',\n        'CI: Travis': 'https://travis-ci.com/aio-libs/aiohttp',\n        'Coverage: codecov': 'https://codecov.io/github/aio-libs/aiohttp',\n        'Docs: RTD': 'https://docs.aiohttp.org',\n        'GitHub: issues': 'https://github.com/aio-libs/aiohttp/issues',\n        'GitHub: repo': 'https://github.com/aio-libs/aiohttp',\n    },\n    license='Apache 2',\n    packages=['aiohttp'],\n    python_requires='>=3.5.3',\n    install_requires=install_requires,\n    tests_require=tests_require,\n    setup_requires=pytest_runner,\n    include_package_data=True,\n    ext_modules=extensions,\n    cmdclass=dict(build_ext=ve_build_ext),\n)\n\ntry:\n    setup(**args)\nexcept BuildFailed:\n    print(\"************************************************************\")\n    print(\"Cannot compile C accelerator module, use pure python version\")\n    print(\"************************************************************\")\n    del args['ext_modules']\n    del args['cmdclass']\n    setup(**args)\n", "path": "setup.py"}], "after_files": [{"content": "import codecs\nimport pathlib\nimport re\nimport sys\nfrom distutils.command.build_ext import build_ext\nfrom distutils.errors import (CCompilerError, DistutilsExecError,\n                              DistutilsPlatformError)\n\nfrom setuptools import Extension, setup\n\n\nif sys.version_info < (3, 5, 3):\n    raise RuntimeError(\"aiohttp 3.x requires Python 3.5.3+\")\n\n\ntry:\n    from Cython.Build import cythonize\n    USE_CYTHON = True\nexcept ImportError:\n    USE_CYTHON = False\n\next = '.pyx' if USE_CYTHON else '.c'\n\n\nextensions = [Extension('aiohttp._websocket', ['aiohttp/_websocket' + ext]),\n              Extension('aiohttp._http_parser',\n                        ['aiohttp/_http_parser' + ext,\n                         'vendor/http-parser/http_parser.c'],\n                        define_macros=[('HTTP_PARSER_STRICT', 0)],\n                        ),\n              Extension('aiohttp._frozenlist',\n                        ['aiohttp/_frozenlist' + ext]),\n              Extension('aiohttp._helpers',\n                        ['aiohttp/_helpers' + ext]),\n              Extension('aiohttp._http_writer',\n                        ['aiohttp/_http_writer' + ext])]\n\n\nif USE_CYTHON:\n    extensions = cythonize(extensions)\n\n\nclass BuildFailed(Exception):\n    pass\n\n\nclass ve_build_ext(build_ext):\n    # This class allows C extension building to fail.\n\n    def run(self):\n        try:\n            build_ext.run(self)\n        except (DistutilsPlatformError, FileNotFoundError):\n            raise BuildFailed()\n\n    def build_extension(self, ext):\n        try:\n            build_ext.build_extension(self, ext)\n        except (CCompilerError, DistutilsExecError,\n                DistutilsPlatformError, ValueError):\n            raise BuildFailed()\n\n\nhere = pathlib.Path(__file__).parent\n\ntxt = (here / 'aiohttp' / '__init__.py').read_text('utf-8')\ntry:\n    version = re.findall(r\"^__version__ = '([^']+)'\\r?$\",\n                         txt, re.M)[0]\nexcept IndexError:\n    raise RuntimeError('Unable to determine version.')\n\n\ninstall_requires = ['attrs>=17.3.0', 'chardet>=2.0,<4.0',\n                    'multidict>=4.0,<5.0',\n                    'async_timeout>=3.0,<4.0',\n                    'yarl>=1.0,<2.0']\n\nif sys.version_info < (3, 7):\n    install_requires.append('idna-ssl>=1.0')\n\n\ndef read(f):\n    return (here / f).read_text('utf-8').strip()\n\n\nNEEDS_PYTEST = {'pytest', 'test'}.intersection(sys.argv)\npytest_runner = ['pytest-runner'] if NEEDS_PYTEST else []\n\ntests_require = ['pytest', 'gunicorn',\n                 'pytest-timeout', 'async-generator']\n\n\nargs = dict(\n    name='aiohttp',\n    version=version,\n    description='Async http client/server framework (asyncio)',\n    long_description='\\n\\n'.join((read('README.rst'), read('CHANGES.rst'))),\n    classifiers=[\n        'License :: OSI Approved :: Apache Software License',\n        'Intended Audience :: Developers',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n        'Development Status :: 5 - Production/Stable',\n        'Operating System :: POSIX',\n        'Operating System :: MacOS :: MacOS X',\n        'Operating System :: Microsoft :: Windows',\n        'Topic :: Internet :: WWW/HTTP',\n        'Framework :: AsyncIO',\n    ],\n    author='Nikolay Kim',\n    author_email='fafhrd91@gmail.com',\n    maintainer=', '.join(('Nikolay Kim <fafhrd91@gmail.com>',\n                          'Andrew Svetlov <andrew.svetlov@gmail.com>')),\n    maintainer_email='aio-libs@googlegroups.com',\n    url='https://github.com/aio-libs/aiohttp',\n    project_urls={\n        'Chat: Gitter': 'https://gitter.im/aio-libs/Lobby',\n        'CI: AppVeyor': 'https://ci.appveyor.com/project/aio-libs/aiohttp',\n        'CI: Circle': 'https://circleci.com/gh/aio-libs/aiohttp',\n        'CI: Shippable': 'https://app.shippable.com/github/aio-libs/aiohttp',\n        'CI: Travis': 'https://travis-ci.com/aio-libs/aiohttp',\n        'Coverage: codecov': 'https://codecov.io/github/aio-libs/aiohttp',\n        'Docs: RTD': 'https://docs.aiohttp.org',\n        'GitHub: issues': 'https://github.com/aio-libs/aiohttp/issues',\n        'GitHub: repo': 'https://github.com/aio-libs/aiohttp',\n    },\n    license='Apache 2',\n    packages=['aiohttp'],\n    python_requires='>=3.5.3',\n    install_requires=install_requires,\n    tests_require=tests_require,\n    setup_requires=pytest_runner,\n    include_package_data=True,\n    ext_modules=extensions,\n    cmdclass=dict(build_ext=ve_build_ext),\n)\n\ntry:\n    setup(**args)\nexcept BuildFailed:\n    print(\"************************************************************\")\n    print(\"Cannot compile C accelerator module, use pure python version\")\n    print(\"************************************************************\")\n    del args['ext_modules']\n    del args['cmdclass']\n    setup(**args)\n", "path": "setup.py"}]}