We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add Python 3.7 support
We need to update opsdroid to be fully supported in 3.7.

- [x] Test against Python 3.7.
  - [x] Travis
  - [x] AppVeyor
- [x] Fix any bugs highlighted.
- [x] Add 3.7 to supported versions in `setup.py`.
- [ ] ~Update docker base image to be latest supported version~.

--- 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 #!/usr/bin/env python3
2 import os
3 from setuptools import setup, find_packages
4 from setuptools.command.build_py import build_py
5 from setuptools.command.sdist import sdist
6 from setuptools.command.develop import develop
7 from opsdroid import __version__
8 
9 PACKAGE_NAME = 'opsdroid'
10 HERE = os.path.abspath(os.path.dirname(__file__))
11 README = open(os.path.join(HERE, 'README.md'), encoding="utf8").read()
12 
13 PACKAGES = find_packages(exclude=['tests', 'tests.*', 'modules',
14                                   'modules.*', 'docs', 'docs.*'])
15 
16 
17 # For now we simply define the install_requires based on the contents
18 # of requirements.txt. In the future, install_requires may become much
19 # looser than the (automatically) resolved requirements.txt.
20 with open(os.path.join(HERE, 'requirements.txt'), 'r') as fh:
21     REQUIRES = [line.strip() for line in fh]
22 
23 
24 class Develop(develop):
25     """Custom `develop` command to always build mo files on install -e."""
26 
27     def run(self):
28         self.run_command('compile_catalog')
29         develop.run(self)  # old style class
30 
31 
32 class BuildPy(build_py):
33     """Custom `build_py` command to always build mo files for wheels."""
34 
35     def run(self):
36         self.run_command('compile_catalog')
37         build_py.run(self)  # old style class
38 
39 
40 class Sdist(sdist):
41     """Custom `sdist` command to ensure that mo files are always created."""
42 
43     def run(self):
44         self.run_command('compile_catalog')
45         sdist.run(self)   # old style class
46 
47 
48 setup(
49     name=PACKAGE_NAME,
50     version=__version__,
51     license='Apache License 2.0',
52     url='https://opsdroid.github.io/',
53     download_url='https://github.com/opsdroid/opsdroid/releases',
54     author='Jacob Tomlinson',
55     author_email='jacob@tom.linson.uk',
56     description='An open source ChatOps bot framework.',
57     long_description=README,
58     packages=PACKAGES,
59     include_package_data=True,
60     zip_safe=False,
61     platforms='any',
62     classifiers=[
63         'Development Status :: 4 - Beta',
64         'Environment :: Console',
65         'Framework :: AsyncIO',
66         'Intended Audience :: Developers',
67         'Intended Audience :: System Administrators',
68         'Intended Audience :: Information Technology',
69         'License :: OSI Approved :: Apache Software License',
70         'Programming Language :: Python',
71         'Programming Language :: Python :: 3',
72         'Programming Language :: Python :: 3 :: Only',
73         'Programming Language :: Python :: 3.5',
74         'Programming Language :: Python :: 3.6',
75         'Topic :: Communications :: Chat',
76         'Topic :: Scientific/Engineering :: Artificial Intelligence',
77         'Topic :: Software Development :: Libraries :: Python Modules'
78     ],
79     install_requires=REQUIRES,
80     test_suite='tests',
81     keywords=[
82         'bot',
83         'bot-framework',
84         'opsdroid',
85         'botkit',
86         'python3',
87         'asyncio',
88         'chatops',
89         'devops',
90         'nlu'
91     ],
92     setup_requires=['Babel'],
93     cmdclass={'sdist': Sdist, 'build_py': BuildPy, 'develop': Develop},
94     entry_points={
95         'console_scripts': [
96             'opsdroid = opsdroid.__main__:main'
97         ]
98     },
99 )
100
```
--- 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
@@ -72,6 +72,7 @@
         'Programming Language :: Python :: 3 :: Only',
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
+        'Programming Language :: Python :: 3.7',
         'Topic :: Communications :: Chat',
         'Topic :: Scientific/Engineering :: Artificial Intelligence',
         'Topic :: Software Development :: Libraries :: Python Modules'

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -72,6 +72,7 @@\n         'Programming Language :: Python :: 3 :: Only',\n         'Programming Language :: Python :: 3.5',\n         'Programming Language :: Python :: 3.6',\n+        'Programming Language :: Python :: 3.7',\n         'Topic :: Communications :: Chat',\n         'Topic :: Scientific/Engineering :: Artificial Intelligence',\n         'Topic :: Software Development :: Libraries :: Python Modules'\n", "issue": "Add Python 3.7 support\nWe need to update opsdroid to be fully supported in 3.7.\r\n\r\n- [x] Test against Python 3.7.\r\n  - [x] Travis\r\n  - [x] AppVeyor\r\n- [x] Fix any bugs highlighted.\r\n- [x] Add 3.7 to supported versions in `setup.py`.\r\n- [ ] ~Update docker base image to be latest supported version~.\n", "before_files": [{"content": "#!/usr/bin/env python3\nimport os\nfrom setuptools import setup, find_packages\nfrom setuptools.command.build_py import build_py\nfrom setuptools.command.sdist import sdist\nfrom setuptools.command.develop import develop\nfrom opsdroid import __version__\n\nPACKAGE_NAME = 'opsdroid'\nHERE = os.path.abspath(os.path.dirname(__file__))\nREADME = open(os.path.join(HERE, 'README.md'), encoding=\"utf8\").read()\n\nPACKAGES = find_packages(exclude=['tests', 'tests.*', 'modules',\n                                  'modules.*', 'docs', 'docs.*'])\n\n\n# For now we simply define the install_requires based on the contents\n# of requirements.txt. In the future, install_requires may become much\n# looser than the (automatically) resolved requirements.txt.\nwith open(os.path.join(HERE, 'requirements.txt'), 'r') as fh:\n    REQUIRES = [line.strip() for line in fh]\n\n\nclass Develop(develop):\n    \"\"\"Custom `develop` command to always build mo files on install -e.\"\"\"\n\n    def run(self):\n        self.run_command('compile_catalog')\n        develop.run(self)  # old style class\n\n\nclass BuildPy(build_py):\n    \"\"\"Custom `build_py` command to always build mo files for wheels.\"\"\"\n\n    def run(self):\n        self.run_command('compile_catalog')\n        build_py.run(self)  # old style class\n\n\nclass Sdist(sdist):\n    \"\"\"Custom `sdist` command to ensure that mo files are always created.\"\"\"\n\n    def run(self):\n        self.run_command('compile_catalog')\n        sdist.run(self)   # old style class\n\n\nsetup(\n    name=PACKAGE_NAME,\n    version=__version__,\n    license='Apache License 2.0',\n    url='https://opsdroid.github.io/',\n    download_url='https://github.com/opsdroid/opsdroid/releases',\n    author='Jacob Tomlinson',\n    author_email='jacob@tom.linson.uk',\n    description='An open source ChatOps bot framework.',\n    long_description=README,\n    packages=PACKAGES,\n    include_package_data=True,\n    zip_safe=False,\n    platforms='any',\n    classifiers=[\n        'Development Status :: 4 - Beta',\n        'Environment :: Console',\n        'Framework :: AsyncIO',\n        'Intended Audience :: Developers',\n        'Intended Audience :: System Administrators',\n        'Intended Audience :: Information Technology',\n        'License :: OSI Approved :: Apache Software License',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3 :: Only',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Topic :: Communications :: Chat',\n        'Topic :: Scientific/Engineering :: Artificial Intelligence',\n        'Topic :: Software Development :: Libraries :: Python Modules'\n    ],\n    install_requires=REQUIRES,\n    test_suite='tests',\n    keywords=[\n        'bot',\n        'bot-framework',\n        'opsdroid',\n        'botkit',\n        'python3',\n        'asyncio',\n        'chatops',\n        'devops',\n        'nlu'\n    ],\n    setup_requires=['Babel'],\n    cmdclass={'sdist': Sdist, 'build_py': BuildPy, 'develop': Develop},\n    entry_points={\n        'console_scripts': [\n            'opsdroid = opsdroid.__main__:main'\n        ]\n    },\n)\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python3\nimport os\nfrom setuptools import setup, find_packages\nfrom setuptools.command.build_py import build_py\nfrom setuptools.command.sdist import sdist\nfrom setuptools.command.develop import develop\nfrom opsdroid import __version__\n\nPACKAGE_NAME = 'opsdroid'\nHERE = os.path.abspath(os.path.dirname(__file__))\nREADME = open(os.path.join(HERE, 'README.md'), encoding=\"utf8\").read()\n\nPACKAGES = find_packages(exclude=['tests', 'tests.*', 'modules',\n                                  'modules.*', 'docs', 'docs.*'])\n\n\n# For now we simply define the install_requires based on the contents\n# of requirements.txt. In the future, install_requires may become much\n# looser than the (automatically) resolved requirements.txt.\nwith open(os.path.join(HERE, 'requirements.txt'), 'r') as fh:\n    REQUIRES = [line.strip() for line in fh]\n\n\nclass Develop(develop):\n    \"\"\"Custom `develop` command to always build mo files on install -e.\"\"\"\n\n    def run(self):\n        self.run_command('compile_catalog')\n        develop.run(self)  # old style class\n\n\nclass BuildPy(build_py):\n    \"\"\"Custom `build_py` command to always build mo files for wheels.\"\"\"\n\n    def run(self):\n        self.run_command('compile_catalog')\n        build_py.run(self)  # old style class\n\n\nclass Sdist(sdist):\n    \"\"\"Custom `sdist` command to ensure that mo files are always created.\"\"\"\n\n    def run(self):\n        self.run_command('compile_catalog')\n        sdist.run(self)   # old style class\n\n\nsetup(\n    name=PACKAGE_NAME,\n    version=__version__,\n    license='Apache License 2.0',\n    url='https://opsdroid.github.io/',\n    download_url='https://github.com/opsdroid/opsdroid/releases',\n    author='Jacob Tomlinson',\n    author_email='jacob@tom.linson.uk',\n    description='An open source ChatOps bot framework.',\n    long_description=README,\n    packages=PACKAGES,\n    include_package_data=True,\n    zip_safe=False,\n    platforms='any',\n    classifiers=[\n        'Development Status :: 4 - Beta',\n        'Environment :: Console',\n        'Framework :: AsyncIO',\n        'Intended Audience :: Developers',\n        'Intended Audience :: System Administrators',\n        'Intended Audience :: Information Technology',\n        'License :: OSI Approved :: Apache Software License',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3 :: Only',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n        'Topic :: Communications :: Chat',\n        'Topic :: Scientific/Engineering :: Artificial Intelligence',\n        'Topic :: Software Development :: Libraries :: Python Modules'\n    ],\n    install_requires=REQUIRES,\n    test_suite='tests',\n    keywords=[\n        'bot',\n        'bot-framework',\n        'opsdroid',\n        'botkit',\n        'python3',\n        'asyncio',\n        'chatops',\n        'devops',\n        'nlu'\n    ],\n    setup_requires=['Babel'],\n    cmdclass={'sdist': Sdist, 'build_py': BuildPy, 'develop': Develop},\n    entry_points={\n        'console_scripts': [\n            'opsdroid = opsdroid.__main__:main'\n        ]\n    },\n)\n", "path": "setup.py"}]}