We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
requests.exceptions.ConnectionError: ('Connection aborted.', ResponseNotReady('Request-sent',))
I wanted to offer this up not as an issue, but as a solution to one that I found today.

I had a test that when run on a specific server would always fail with this unhelpful message:
requests.exceptions.ConnectionError: ('Connection aborted.', ResponseNotReady('Request-sent',))

The test had multiple requests to the same client within a single task and a colleague suspected it was something to do with the connection from the first request not being properly closed.

After a lot of playing around with timeouts and attempting to close out the first connection before the next one was sent (both of which did not solve the issue), I found a stackoverflow article with the same issue:
http://stackoverflow.com/questions/30033516/single-session-multiple-post-get-in-python-requests

The quick and dirty solution was to update to requests 2.7.0. At the time of getting this error I was on 2.6.2. I also noticed that the default version for locust is on 2.4. If you are experiencing this issue, simply update to 2.7 and you should be good!


--- 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 # encoding: utf-8
2 
3 from setuptools import setup, find_packages, Command
4 import sys, os
5 
6 version = '0.7.3'
7 
8 
9 class Unit2Discover(Command):
10     user_options = []
11 
12     def initialize_options(self):
13         pass
14 
15     def finalize_options(self):
16         pass
17 
18     def run(self):
19         import sys, subprocess
20         basecmd = ['unit2', 'discover']
21         errno = subprocess.call(basecmd)
22         raise SystemExit(errno)
23 
24 
25 setup(
26     name='locustio',
27     version=version,
28     description="Website load testing framework",
29     long_description="""Locust is a python utility for doing easy, distributed load testing of a web site""",
30     classifiers=[
31         "Topic :: Software Development :: Testing :: Traffic Generation",
32         "Development Status :: 4 - Beta",
33         "License :: OSI Approved :: MIT License",
34         "Operating System :: OS Independent",
35         "Programming Language :: Python",
36         "Programming Language :: Python :: 2",
37         "Programming Language :: Python :: 2.6",
38         "Programming Language :: Python :: 2.7",
39         "Intended Audience :: Developers",
40         "Intended Audience :: System Administrators",
41     ],
42     keywords='',
43     author='Jonatan Heyman, Carl Bystrom, Joakim Hamrén, Hugo Heyman',
44     author_email='',
45     url='http://locust.io',
46     license='MIT',
47     packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
48     include_package_data=True,
49     zip_safe=False,
50     install_requires=["gevent==1.0.1", "flask>=0.10.1", "requests>=2.4.1", "msgpack-python>=0.4.2"],
51     tests_require=['unittest2', 'mock', 'pyzmq'],
52     entry_points={
53         'console_scripts': [
54             'locust = locust.main:main',
55         ]
56     },
57     test_suite='unittest2.collector',
58 )
59
```
--- 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
@@ -47,7 +47,7 @@
     packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
     include_package_data=True,
     zip_safe=False,
-    install_requires=["gevent==1.0.1", "flask>=0.10.1", "requests>=2.4.1", "msgpack-python>=0.4.2"],
+    install_requires=["gevent==1.0.1", "flask>=0.10.1", "requests>=2.9.1", "msgpack-python>=0.4.2"],
     tests_require=['unittest2', 'mock', 'pyzmq'],
     entry_points={
         'console_scripts': [

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -47,7 +47,7 @@\n     packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),\n     include_package_data=True,\n     zip_safe=False,\n-    install_requires=[\"gevent==1.0.1\", \"flask>=0.10.1\", \"requests>=2.4.1\", \"msgpack-python>=0.4.2\"],\n+    install_requires=[\"gevent==1.0.1\", \"flask>=0.10.1\", \"requests>=2.9.1\", \"msgpack-python>=0.4.2\"],\n     tests_require=['unittest2', 'mock', 'pyzmq'],\n     entry_points={\n         'console_scripts': [\n", "issue": "requests.exceptions.ConnectionError: ('Connection aborted.', ResponseNotReady('Request-sent',))\nI wanted to offer this up not as an issue, but as a solution to one that I found today.\n\nI had a test that when run on a specific server would always fail with this unhelpful message:\nrequests.exceptions.ConnectionError: ('Connection aborted.', ResponseNotReady('Request-sent',))\n\nThe test had multiple requests to the same client within a single task and a colleague suspected it was something to do with the connection from the first request not being properly closed.\n\nAfter a lot of playing around with timeouts and attempting to close out the first connection before the next one was sent (both of which did not solve the issue), I found a stackoverflow article with the same issue:\nhttp://stackoverflow.com/questions/30033516/single-session-multiple-post-get-in-python-requests\n\nThe quick and dirty solution was to update to requests 2.7.0. At the time of getting this error I was on 2.6.2. I also noticed that the default version for locust is on 2.4. If you are experiencing this issue, simply update to 2.7 and you should be good!\n\n", "before_files": [{"content": "# encoding: utf-8\n\nfrom setuptools import setup, find_packages, Command\nimport sys, os\n\nversion = '0.7.3'\n\n\nclass Unit2Discover(Command):\n    user_options = []\n\n    def initialize_options(self):\n        pass\n\n    def finalize_options(self):\n        pass\n\n    def run(self):\n        import sys, subprocess\n        basecmd = ['unit2', 'discover']\n        errno = subprocess.call(basecmd)\n        raise SystemExit(errno)\n\n\nsetup(\n    name='locustio',\n    version=version,\n    description=\"Website load testing framework\",\n    long_description=\"\"\"Locust is a python utility for doing easy, distributed load testing of a web site\"\"\",\n    classifiers=[\n        \"Topic :: Software Development :: Testing :: Traffic Generation\",\n        \"Development Status :: 4 - Beta\",\n        \"License :: OSI Approved :: MIT License\",\n        \"Operating System :: OS Independent\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 2\",\n        \"Programming Language :: Python :: 2.6\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Intended Audience :: Developers\",\n        \"Intended Audience :: System Administrators\",\n    ],\n    keywords='',\n    author='Jonatan Heyman, Carl Bystrom, Joakim Hamr\u00e9n, Hugo Heyman',\n    author_email='',\n    url='http://locust.io',\n    license='MIT',\n    packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),\n    include_package_data=True,\n    zip_safe=False,\n    install_requires=[\"gevent==1.0.1\", \"flask>=0.10.1\", \"requests>=2.4.1\", \"msgpack-python>=0.4.2\"],\n    tests_require=['unittest2', 'mock', 'pyzmq'],\n    entry_points={\n        'console_scripts': [\n            'locust = locust.main:main',\n        ]\n    },\n    test_suite='unittest2.collector',\n)\n", "path": "setup.py"}], "after_files": [{"content": "# encoding: utf-8\n\nfrom setuptools import setup, find_packages, Command\nimport sys, os\n\nversion = '0.7.3'\n\n\nclass Unit2Discover(Command):\n    user_options = []\n\n    def initialize_options(self):\n        pass\n\n    def finalize_options(self):\n        pass\n\n    def run(self):\n        import sys, subprocess\n        basecmd = ['unit2', 'discover']\n        errno = subprocess.call(basecmd)\n        raise SystemExit(errno)\n\n\nsetup(\n    name='locustio',\n    version=version,\n    description=\"Website load testing framework\",\n    long_description=\"\"\"Locust is a python utility for doing easy, distributed load testing of a web site\"\"\",\n    classifiers=[\n        \"Topic :: Software Development :: Testing :: Traffic Generation\",\n        \"Development Status :: 4 - Beta\",\n        \"License :: OSI Approved :: MIT License\",\n        \"Operating System :: OS Independent\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 2\",\n        \"Programming Language :: Python :: 2.6\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Intended Audience :: Developers\",\n        \"Intended Audience :: System Administrators\",\n    ],\n    keywords='',\n    author='Jonatan Heyman, Carl Bystrom, Joakim Hamr\u00e9n, Hugo Heyman',\n    author_email='',\n    url='http://locust.io',\n    license='MIT',\n    packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),\n    include_package_data=True,\n    zip_safe=False,\n    install_requires=[\"gevent==1.0.1\", \"flask>=0.10.1\", \"requests>=2.9.1\", \"msgpack-python>=0.4.2\"],\n    tests_require=['unittest2', 'mock', 'pyzmq'],\n    entry_points={\n        'console_scripts': [\n            'locust = locust.main:main',\n        ]\n    },\n    test_suite='unittest2.collector',\n)\n", "path": "setup.py"}]}