We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
missing dependency`jsonschema` in requirements.txt
The latest pip installable version of QCoDeS does not list jsonschema as a dependency but requires it. 

This problem came to light when running tests on a project that depeneds on QCoDeS. Part of my build script installs qcodes (pip install qcodes). Importing qcodes then raises an exception because jsonschema is missing. 

--- 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 from setuptools import setup, find_packages
2 from distutils.version import StrictVersion
3 from importlib import import_module
4 import re
5 
6 def get_version(verbose=1):
7     """ Extract version information from source code """
8 
9     try:
10         with open('qcodes/version.py', 'r') as f:
11             ln = f.readline()
12             # print(ln)
13             m = re.search('.* ''(.*)''', ln)
14             version = (m.group(1)).strip('\'')
15     except Exception as E:
16         print(E)
17         version = 'none'
18     if verbose:
19         print('get_version: %s' % version)
20     return version
21 
22 
23 def readme():
24     with open('README.rst') as f:
25         return f.read()
26 
27 extras = {
28     'MatPlot': ('matplotlib', '2.0.2'),
29     'QtPlot': ('pyqtgraph', '0.10.0'),
30     'coverage tests': ('coverage', '4.0'),
31     'Slack': ('slacker', '0.9.42')
32 }
33 extras_require = {k: '>='.join(v) for k, v in extras.items()}
34 
35 setup(name='qcodes',
36       version=get_version(),
37       use_2to3=False,
38 
39       maintainer='Jens H Nielsen',
40       maintainer_email='j.h.nielsen@nbi.ku.dk',
41       description='Python-based data acquisition framework developed by the '
42                   'Copenhagen / Delft / Sydney / Microsoft quantum computing '
43                   'consortium',
44       long_description=readme(),
45       url='https://github.com/QCoDeS/Qcodes',
46       classifiers=[
47           'Development Status :: 3 - Alpha',
48           'Intended Audience :: Science/Research',
49           'Programming Language :: Python :: 3 :: Only',
50           'Programming Language :: Python :: 3.5',
51           'Programming Language :: Python :: 3.6',
52           'Topic :: Scientific/Engineering'
53       ],
54       license='MIT',
55       # if we want to install without tests:
56       # packages=find_packages(exclude=["*.tests", "tests"]),
57       packages=find_packages(),
58       package_data={'qcodes': ['monitor/dist/*', 'monitor/dist/js/*',
59                                'monitor/dist/css/*', 'config/*.json']},
60       install_requires=[
61           'numpy>=1.10',
62           'pyvisa>=1.8',
63           'h5py>=2.6',
64           'websockets>=3.2,<3.4'
65       ],
66 
67       test_suite='qcodes.tests',
68       extras_require=extras_require,
69 
70       # I think the only part of qcodes that would care about zip_safe
71       # is utils.helpers.reload_code; users of a zip-installed package
72       # shouldn't be needing to do this anyway, but we should test first.
73       zip_safe=False)
74 
75 version_template = '''
76 *****
77 ***** package {0} must be at least version {1}.
78 ***** Please upgrade it (pip install -U {0} or conda install {0})
79 ***** in order to use {2}
80 *****
81 '''
82 
83 missing_template = '''
84 *****
85 ***** package {0} not found
86 ***** Please install it (pip install {0} or conda install {0})
87 ***** in order to use {1}
88 *****
89 '''
90 
91 valueerror_template = '''
92 *****
93 ***** package {0} version not understood
94 ***** Please make sure the installed version ({1})
95 ***** is compatible with the minimum required version ({2})
96 ***** in order to use {3}
97 *****
98 '''
99 
100 # now test the versions of extras
101 for extra, (module_name, min_version) in extras.items():
102     try:
103         module = import_module(module_name)
104         if StrictVersion(module.__version__) < StrictVersion(min_version):
105             print(version_template.format(module_name, min_version, extra))
106     except ImportError:
107         print(missing_template.format(module_name, extra))
108     except ValueError:
109         print(valueerror_template.format(
110             module_name, module.__version__, min_version, extra))
111
```
--- 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
@@ -61,7 +61,8 @@
           'numpy>=1.10',
           'pyvisa>=1.8',
           'h5py>=2.6',
-          'websockets>=3.2,<3.4'
+          'websockets>=3.2,<3.4',
+          'jsonschema'
       ],
 
       test_suite='qcodes.tests',

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -61,7 +61,8 @@\n           'numpy>=1.10',\n           'pyvisa>=1.8',\n           'h5py>=2.6',\n-          'websockets>=3.2,<3.4'\n+          'websockets>=3.2,<3.4',\n+          'jsonschema'\n       ],\n \n       test_suite='qcodes.tests',\n", "issue": "missing dependency`jsonschema` in requirements.txt\nThe latest pip installable version of QCoDeS does not list jsonschema as a dependency but requires it. \r\n\r\nThis problem came to light when running tests on a project that depeneds on QCoDeS. Part of my build script installs qcodes (pip install qcodes). Importing qcodes then raises an exception because jsonschema is missing. \n", "before_files": [{"content": "from setuptools import setup, find_packages\nfrom distutils.version import StrictVersion\nfrom importlib import import_module\nimport re\n\ndef get_version(verbose=1):\n    \"\"\" Extract version information from source code \"\"\"\n\n    try:\n        with open('qcodes/version.py', 'r') as f:\n            ln = f.readline()\n            # print(ln)\n            m = re.search('.* ''(.*)''', ln)\n            version = (m.group(1)).strip('\\'')\n    except Exception as E:\n        print(E)\n        version = 'none'\n    if verbose:\n        print('get_version: %s' % version)\n    return version\n\n\ndef readme():\n    with open('README.rst') as f:\n        return f.read()\n\nextras = {\n    'MatPlot': ('matplotlib', '2.0.2'),\n    'QtPlot': ('pyqtgraph', '0.10.0'),\n    'coverage tests': ('coverage', '4.0'),\n    'Slack': ('slacker', '0.9.42')\n}\nextras_require = {k: '>='.join(v) for k, v in extras.items()}\n\nsetup(name='qcodes',\n      version=get_version(),\n      use_2to3=False,\n\n      maintainer='Jens H Nielsen',\n      maintainer_email='j.h.nielsen@nbi.ku.dk',\n      description='Python-based data acquisition framework developed by the '\n                  'Copenhagen / Delft / Sydney / Microsoft quantum computing '\n                  'consortium',\n      long_description=readme(),\n      url='https://github.com/QCoDeS/Qcodes',\n      classifiers=[\n          'Development Status :: 3 - Alpha',\n          'Intended Audience :: Science/Research',\n          'Programming Language :: Python :: 3 :: Only',\n          'Programming Language :: Python :: 3.5',\n          'Programming Language :: Python :: 3.6',\n          'Topic :: Scientific/Engineering'\n      ],\n      license='MIT',\n      # if we want to install without tests:\n      # packages=find_packages(exclude=[\"*.tests\", \"tests\"]),\n      packages=find_packages(),\n      package_data={'qcodes': ['monitor/dist/*', 'monitor/dist/js/*',\n                               'monitor/dist/css/*', 'config/*.json']},\n      install_requires=[\n          'numpy>=1.10',\n          'pyvisa>=1.8',\n          'h5py>=2.6',\n          'websockets>=3.2,<3.4'\n      ],\n\n      test_suite='qcodes.tests',\n      extras_require=extras_require,\n\n      # I think the only part of qcodes that would care about zip_safe\n      # is utils.helpers.reload_code; users of a zip-installed package\n      # shouldn't be needing to do this anyway, but we should test first.\n      zip_safe=False)\n\nversion_template = '''\n*****\n***** package {0} must be at least version {1}.\n***** Please upgrade it (pip install -U {0} or conda install {0})\n***** in order to use {2}\n*****\n'''\n\nmissing_template = '''\n*****\n***** package {0} not found\n***** Please install it (pip install {0} or conda install {0})\n***** in order to use {1}\n*****\n'''\n\nvalueerror_template = '''\n*****\n***** package {0} version not understood\n***** Please make sure the installed version ({1})\n***** is compatible with the minimum required version ({2})\n***** in order to use {3}\n*****\n'''\n\n# now test the versions of extras\nfor extra, (module_name, min_version) in extras.items():\n    try:\n        module = import_module(module_name)\n        if StrictVersion(module.__version__) < StrictVersion(min_version):\n            print(version_template.format(module_name, min_version, extra))\n    except ImportError:\n        print(missing_template.format(module_name, extra))\n    except ValueError:\n        print(valueerror_template.format(\n            module_name, module.__version__, min_version, extra))\n", "path": "setup.py"}], "after_files": [{"content": "from setuptools import setup, find_packages\nfrom distutils.version import StrictVersion\nfrom importlib import import_module\nimport re\n\ndef get_version(verbose=1):\n    \"\"\" Extract version information from source code \"\"\"\n\n    try:\n        with open('qcodes/version.py', 'r') as f:\n            ln = f.readline()\n            # print(ln)\n            m = re.search('.* ''(.*)''', ln)\n            version = (m.group(1)).strip('\\'')\n    except Exception as E:\n        print(E)\n        version = 'none'\n    if verbose:\n        print('get_version: %s' % version)\n    return version\n\n\ndef readme():\n    with open('README.rst') as f:\n        return f.read()\n\nextras = {\n    'MatPlot': ('matplotlib', '2.0.2'),\n    'QtPlot': ('pyqtgraph', '0.10.0'),\n    'coverage tests': ('coverage', '4.0'),\n    'Slack': ('slacker', '0.9.42')\n}\nextras_require = {k: '>='.join(v) for k, v in extras.items()}\n\nsetup(name='qcodes',\n      version=get_version(),\n      use_2to3=False,\n\n      maintainer='Jens H Nielsen',\n      maintainer_email='j.h.nielsen@nbi.ku.dk',\n      description='Python-based data acquisition framework developed by the '\n                  'Copenhagen / Delft / Sydney / Microsoft quantum computing '\n                  'consortium',\n      long_description=readme(),\n      url='https://github.com/QCoDeS/Qcodes',\n      classifiers=[\n          'Development Status :: 3 - Alpha',\n          'Intended Audience :: Science/Research',\n          'Programming Language :: Python :: 3 :: Only',\n          'Programming Language :: Python :: 3.5',\n          'Programming Language :: Python :: 3.6',\n          'Topic :: Scientific/Engineering'\n      ],\n      license='MIT',\n      # if we want to install without tests:\n      # packages=find_packages(exclude=[\"*.tests\", \"tests\"]),\n      packages=find_packages(),\n      package_data={'qcodes': ['monitor/dist/*', 'monitor/dist/js/*',\n                               'monitor/dist/css/*', 'config/*.json']},\n      install_requires=[\n          'numpy>=1.10',\n          'pyvisa>=1.8',\n          'h5py>=2.6',\n          'websockets>=3.2,<3.4',\n          'jsonschema'\n      ],\n\n      test_suite='qcodes.tests',\n      extras_require=extras_require,\n\n      # I think the only part of qcodes that would care about zip_safe\n      # is utils.helpers.reload_code; users of a zip-installed package\n      # shouldn't be needing to do this anyway, but we should test first.\n      zip_safe=False)\n\nversion_template = '''\n*****\n***** package {0} must be at least version {1}.\n***** Please upgrade it (pip install -U {0} or conda install {0})\n***** in order to use {2}\n*****\n'''\n\nmissing_template = '''\n*****\n***** package {0} not found\n***** Please install it (pip install {0} or conda install {0})\n***** in order to use {1}\n*****\n'''\n\nvalueerror_template = '''\n*****\n***** package {0} version not understood\n***** Please make sure the installed version ({1})\n***** is compatible with the minimum required version ({2})\n***** in order to use {3}\n*****\n'''\n\n# now test the versions of extras\nfor extra, (module_name, min_version) in extras.items():\n    try:\n        module = import_module(module_name)\n        if StrictVersion(module.__version__) < StrictVersion(min_version):\n            print(version_template.format(module_name, min_version, extra))\n    except ImportError:\n        print(missing_template.format(module_name, extra))\n    except ValueError:\n        print(valueerror_template.format(\n            module_name, module.__version__, min_version, extra))\n", "path": "setup.py"}]}