We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Wait for new cryptography release
For the next mitmproxy release, we want to recommend Python 3.5 by default. This requires a cryptography release which includes https://github.com/pyca/cryptography/pull/3063.


--- 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 codecs import open
3 import os
4 
5 from netlib import version
6 
7 # Based on https://github.com/pypa/sampleproject/blob/master/setup.py
8 # and https://python-packaging-user-guide.readthedocs.org/
9 
10 here = os.path.abspath(os.path.dirname(__file__))
11 
12 with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
13     long_description = f.read()
14 
15 setup(
16     name="mitmproxy",
17     version=version.VERSION,
18     description="An interactive, SSL-capable, man-in-the-middle HTTP proxy for penetration testers and software developers.",
19     long_description=long_description,
20     url="http://mitmproxy.org",
21     author="Aldo Cortesi",
22     author_email="aldo@corte.si",
23     license="MIT",
24     classifiers=[
25         "License :: OSI Approved :: MIT License",
26         "Development Status :: 5 - Production/Stable",
27         "Environment :: Console",
28         "Environment :: Console :: Curses",
29         "Operating System :: MacOS :: MacOS X",
30         "Operating System :: POSIX",
31         "Operating System :: Microsoft :: Windows",
32         "Programming Language :: Python",
33         "Programming Language :: Python :: 2",
34         "Programming Language :: Python :: 2.7",
35         "Programming Language :: Python :: 3",
36         "Programming Language :: Python :: 3.5",
37         "Programming Language :: Python :: Implementation :: CPython",
38         "Programming Language :: Python :: Implementation :: PyPy",
39         "Topic :: Security",
40         "Topic :: Internet",
41         "Topic :: Internet :: WWW/HTTP",
42         "Topic :: Internet :: Proxy Servers",
43         "Topic :: Software Development :: Testing"
44     ],
45     packages=find_packages(include=[
46         "mitmproxy", "mitmproxy.*",
47         "pathod", "pathod.*",
48         "netlib", "netlib.*"
49     ]),
50     include_package_data=True,
51     entry_points={
52         'console_scripts': [
53             "mitmproxy = mitmproxy.main:mitmproxy",
54             "mitmdump = mitmproxy.main:mitmdump",
55             "mitmweb = mitmproxy.main:mitmweb",
56             "pathod = pathod.pathod_cmdline:go_pathod",
57             "pathoc = pathod.pathoc_cmdline:go_pathoc"
58         ]
59     },
60     # https://packaging.python.org/en/latest/requirements/#install-requires
61     # It is not considered best practice to use install_requires to pin dependencies to specific versions.
62     install_requires=[
63         "backports.ssl_match_hostname>=3.5.0.1, <3.6",
64         "blinker>=1.4, <1.5",
65         "click>=6.2, <7.0",
66         "certifi>=2015.11.20.1",  # no semver here - this should always be on the last release!
67         "configargparse>=0.10, <0.11",
68         "construct>=2.5.2, <2.6",
69         "cryptography>=1.3, <1.5",
70         "cssutils>=1.0.1, <1.1",
71         "Flask>=0.10.1, <0.12",
72         "h2>=2.4.1, <3",
73         "html2text>=2016.1.8, <=2016.5.29",
74         "hyperframe>=4.0.1, <5",
75         "jsbeautifier>=1.6.3, <1.7",
76         "lxml>=3.5.0, <=3.6.0",  # no wheels for 3.6.1 yet.
77         "Pillow>=3.2, <3.4",
78         "passlib>=1.6.5, <1.7",
79         "pyasn1>=0.1.9, <0.2",
80         "pyOpenSSL>=16.0, <17.0",
81         "pyparsing>=2.1.3, <2.2",
82         "pyperclip>=1.5.22, <1.6",
83         "requests>=2.9.1, <2.12",
84         "six>=1.10, <1.11",
85         "tornado>=4.3, <4.5",
86         "urwid>=1.3.1, <1.4",
87         "watchdog>=0.8.3, <0.9",
88         "brotlipy>=0.3.0, <0.5",
89     ],
90     extras_require={
91         ':sys_platform == "win32"': [
92             "pydivert>=0.0.7, <0.1",
93         ],
94         ':sys_platform != "win32"': [
95         ],
96         # Do not use a range operator here: https://bitbucket.org/pypa/setuptools/issues/380
97         # Ubuntu Trusty and other still ship with setuptools < 17.1
98         ':python_version == "2.7"': [
99             "enum34>=1.0.4, <2",
100             "ipaddress>=1.0.15, <1.1",
101             "typing==3.5.2.2",
102         ],
103         'dev': [
104             "tox>=2.3, <3",
105             "mock>=2.0, <2.1",
106             "pytest>=2.8.7, <3",
107             "pytest-cov>=2.2.1, <3",
108             "pytest-timeout>=1.0.0, <2",
109             "pytest-xdist>=1.14, <2",
110             "sphinx>=1.3.5, <1.5",
111             "sphinx-autobuild>=0.5.2, <0.7",
112             "sphinxcontrib-documentedlist>=0.4.0, <0.5",
113             "sphinx_rtd_theme>=0.1.9, <0.2",
114         ],
115         'contentviews': [
116             # TODO: Find Python 3 replacements
117             # "protobuf>=2.6.1, <2.7",
118             # "pyamf>=0.8.0, <0.9",
119         ],
120         'examples': [
121             "beautifulsoup4>=4.4.1, <4.6",
122             "pytz>=2015.07.0, <=2016.6.1",
123         ]
124     }
125 )
126
```
--- 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
@@ -66,7 +66,7 @@
         "certifi>=2015.11.20.1",  # no semver here - this should always be on the last release!
         "configargparse>=0.10, <0.11",
         "construct>=2.5.2, <2.6",
-        "cryptography>=1.3, <1.5",
+        "cryptography>=1.3, <1.6",
         "cssutils>=1.0.1, <1.1",
         "Flask>=0.10.1, <0.12",
         "h2>=2.4.1, <3",

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -66,7 +66,7 @@\n         \"certifi>=2015.11.20.1\",  # no semver here - this should always be on the last release!\n         \"configargparse>=0.10, <0.11\",\n         \"construct>=2.5.2, <2.6\",\n-        \"cryptography>=1.3, <1.5\",\n+        \"cryptography>=1.3, <1.6\",\n         \"cssutils>=1.0.1, <1.1\",\n         \"Flask>=0.10.1, <0.12\",\n         \"h2>=2.4.1, <3\",\n", "issue": "Wait for new cryptography release\nFor the next mitmproxy release, we want to recommend Python 3.5 by default. This requires a cryptography release which includes https://github.com/pyca/cryptography/pull/3063.\n\n", "before_files": [{"content": "from setuptools import setup, find_packages\nfrom codecs import open\nimport os\n\nfrom netlib import version\n\n# Based on https://github.com/pypa/sampleproject/blob/master/setup.py\n# and https://python-packaging-user-guide.readthedocs.org/\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\nwith open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:\n    long_description = f.read()\n\nsetup(\n    name=\"mitmproxy\",\n    version=version.VERSION,\n    description=\"An interactive, SSL-capable, man-in-the-middle HTTP proxy for penetration testers and software developers.\",\n    long_description=long_description,\n    url=\"http://mitmproxy.org\",\n    author=\"Aldo Cortesi\",\n    author_email=\"aldo@corte.si\",\n    license=\"MIT\",\n    classifiers=[\n        \"License :: OSI Approved :: MIT License\",\n        \"Development Status :: 5 - Production/Stable\",\n        \"Environment :: Console\",\n        \"Environment :: Console :: Curses\",\n        \"Operating System :: MacOS :: MacOS X\",\n        \"Operating System :: POSIX\",\n        \"Operating System :: Microsoft :: Windows\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 2\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.5\",\n        \"Programming Language :: Python :: Implementation :: CPython\",\n        \"Programming Language :: Python :: Implementation :: PyPy\",\n        \"Topic :: Security\",\n        \"Topic :: Internet\",\n        \"Topic :: Internet :: WWW/HTTP\",\n        \"Topic :: Internet :: Proxy Servers\",\n        \"Topic :: Software Development :: Testing\"\n    ],\n    packages=find_packages(include=[\n        \"mitmproxy\", \"mitmproxy.*\",\n        \"pathod\", \"pathod.*\",\n        \"netlib\", \"netlib.*\"\n    ]),\n    include_package_data=True,\n    entry_points={\n        'console_scripts': [\n            \"mitmproxy = mitmproxy.main:mitmproxy\",\n            \"mitmdump = mitmproxy.main:mitmdump\",\n            \"mitmweb = mitmproxy.main:mitmweb\",\n            \"pathod = pathod.pathod_cmdline:go_pathod\",\n            \"pathoc = pathod.pathoc_cmdline:go_pathoc\"\n        ]\n    },\n    # https://packaging.python.org/en/latest/requirements/#install-requires\n    # It is not considered best practice to use install_requires to pin dependencies to specific versions.\n    install_requires=[\n        \"backports.ssl_match_hostname>=3.5.0.1, <3.6\",\n        \"blinker>=1.4, <1.5\",\n        \"click>=6.2, <7.0\",\n        \"certifi>=2015.11.20.1\",  # no semver here - this should always be on the last release!\n        \"configargparse>=0.10, <0.11\",\n        \"construct>=2.5.2, <2.6\",\n        \"cryptography>=1.3, <1.5\",\n        \"cssutils>=1.0.1, <1.1\",\n        \"Flask>=0.10.1, <0.12\",\n        \"h2>=2.4.1, <3\",\n        \"html2text>=2016.1.8, <=2016.5.29\",\n        \"hyperframe>=4.0.1, <5\",\n        \"jsbeautifier>=1.6.3, <1.7\",\n        \"lxml>=3.5.0, <=3.6.0\",  # no wheels for 3.6.1 yet.\n        \"Pillow>=3.2, <3.4\",\n        \"passlib>=1.6.5, <1.7\",\n        \"pyasn1>=0.1.9, <0.2\",\n        \"pyOpenSSL>=16.0, <17.0\",\n        \"pyparsing>=2.1.3, <2.2\",\n        \"pyperclip>=1.5.22, <1.6\",\n        \"requests>=2.9.1, <2.12\",\n        \"six>=1.10, <1.11\",\n        \"tornado>=4.3, <4.5\",\n        \"urwid>=1.3.1, <1.4\",\n        \"watchdog>=0.8.3, <0.9\",\n        \"brotlipy>=0.3.0, <0.5\",\n    ],\n    extras_require={\n        ':sys_platform == \"win32\"': [\n            \"pydivert>=0.0.7, <0.1\",\n        ],\n        ':sys_platform != \"win32\"': [\n        ],\n        # Do not use a range operator here: https://bitbucket.org/pypa/setuptools/issues/380\n        # Ubuntu Trusty and other still ship with setuptools < 17.1\n        ':python_version == \"2.7\"': [\n            \"enum34>=1.0.4, <2\",\n            \"ipaddress>=1.0.15, <1.1\",\n            \"typing==3.5.2.2\",\n        ],\n        'dev': [\n            \"tox>=2.3, <3\",\n            \"mock>=2.0, <2.1\",\n            \"pytest>=2.8.7, <3\",\n            \"pytest-cov>=2.2.1, <3\",\n            \"pytest-timeout>=1.0.0, <2\",\n            \"pytest-xdist>=1.14, <2\",\n            \"sphinx>=1.3.5, <1.5\",\n            \"sphinx-autobuild>=0.5.2, <0.7\",\n            \"sphinxcontrib-documentedlist>=0.4.0, <0.5\",\n            \"sphinx_rtd_theme>=0.1.9, <0.2\",\n        ],\n        'contentviews': [\n            # TODO: Find Python 3 replacements\n            # \"protobuf>=2.6.1, <2.7\",\n            # \"pyamf>=0.8.0, <0.9\",\n        ],\n        'examples': [\n            \"beautifulsoup4>=4.4.1, <4.6\",\n            \"pytz>=2015.07.0, <=2016.6.1\",\n        ]\n    }\n)\n", "path": "setup.py"}], "after_files": [{"content": "from setuptools import setup, find_packages\nfrom codecs import open\nimport os\n\nfrom netlib import version\n\n# Based on https://github.com/pypa/sampleproject/blob/master/setup.py\n# and https://python-packaging-user-guide.readthedocs.org/\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\nwith open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:\n    long_description = f.read()\n\nsetup(\n    name=\"mitmproxy\",\n    version=version.VERSION,\n    description=\"An interactive, SSL-capable, man-in-the-middle HTTP proxy for penetration testers and software developers.\",\n    long_description=long_description,\n    url=\"http://mitmproxy.org\",\n    author=\"Aldo Cortesi\",\n    author_email=\"aldo@corte.si\",\n    license=\"MIT\",\n    classifiers=[\n        \"License :: OSI Approved :: MIT License\",\n        \"Development Status :: 5 - Production/Stable\",\n        \"Environment :: Console\",\n        \"Environment :: Console :: Curses\",\n        \"Operating System :: MacOS :: MacOS X\",\n        \"Operating System :: POSIX\",\n        \"Operating System :: Microsoft :: Windows\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 2\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.5\",\n        \"Programming Language :: Python :: Implementation :: CPython\",\n        \"Programming Language :: Python :: Implementation :: PyPy\",\n        \"Topic :: Security\",\n        \"Topic :: Internet\",\n        \"Topic :: Internet :: WWW/HTTP\",\n        \"Topic :: Internet :: Proxy Servers\",\n        \"Topic :: Software Development :: Testing\"\n    ],\n    packages=find_packages(include=[\n        \"mitmproxy\", \"mitmproxy.*\",\n        \"pathod\", \"pathod.*\",\n        \"netlib\", \"netlib.*\"\n    ]),\n    include_package_data=True,\n    entry_points={\n        'console_scripts': [\n            \"mitmproxy = mitmproxy.main:mitmproxy\",\n            \"mitmdump = mitmproxy.main:mitmdump\",\n            \"mitmweb = mitmproxy.main:mitmweb\",\n            \"pathod = pathod.pathod_cmdline:go_pathod\",\n            \"pathoc = pathod.pathoc_cmdline:go_pathoc\"\n        ]\n    },\n    # https://packaging.python.org/en/latest/requirements/#install-requires\n    # It is not considered best practice to use install_requires to pin dependencies to specific versions.\n    install_requires=[\n        \"backports.ssl_match_hostname>=3.5.0.1, <3.6\",\n        \"blinker>=1.4, <1.5\",\n        \"click>=6.2, <7.0\",\n        \"certifi>=2015.11.20.1\",  # no semver here - this should always be on the last release!\n        \"configargparse>=0.10, <0.11\",\n        \"construct>=2.5.2, <2.6\",\n        \"cryptography>=1.3, <1.6\",\n        \"cssutils>=1.0.1, <1.1\",\n        \"Flask>=0.10.1, <0.12\",\n        \"h2>=2.4.1, <3\",\n        \"html2text>=2016.1.8, <=2016.5.29\",\n        \"hyperframe>=4.0.1, <5\",\n        \"jsbeautifier>=1.6.3, <1.7\",\n        \"lxml>=3.5.0, <=3.6.0\",  # no wheels for 3.6.1 yet.\n        \"Pillow>=3.2, <3.4\",\n        \"passlib>=1.6.5, <1.7\",\n        \"pyasn1>=0.1.9, <0.2\",\n        \"pyOpenSSL>=16.0, <17.0\",\n        \"pyparsing>=2.1.3, <2.2\",\n        \"pyperclip>=1.5.22, <1.6\",\n        \"requests>=2.9.1, <2.12\",\n        \"six>=1.10, <1.11\",\n        \"tornado>=4.3, <4.5\",\n        \"urwid>=1.3.1, <1.4\",\n        \"watchdog>=0.8.3, <0.9\",\n        \"brotlipy>=0.3.0, <0.5\",\n    ],\n    extras_require={\n        ':sys_platform == \"win32\"': [\n            \"pydivert>=0.0.7, <0.1\",\n        ],\n        ':sys_platform != \"win32\"': [\n        ],\n        # Do not use a range operator here: https://bitbucket.org/pypa/setuptools/issues/380\n        # Ubuntu Trusty and other still ship with setuptools < 17.1\n        ':python_version == \"2.7\"': [\n            \"enum34>=1.0.4, <2\",\n            \"ipaddress>=1.0.15, <1.1\",\n            \"typing==3.5.2.2\",\n        ],\n        'dev': [\n            \"tox>=2.3, <3\",\n            \"mock>=2.0, <2.1\",\n            \"pytest>=2.8.7, <3\",\n            \"pytest-cov>=2.2.1, <3\",\n            \"pytest-timeout>=1.0.0, <2\",\n            \"pytest-xdist>=1.14, <2\",\n            \"sphinx>=1.3.5, <1.5\",\n            \"sphinx-autobuild>=0.5.2, <0.7\",\n            \"sphinxcontrib-documentedlist>=0.4.0, <0.5\",\n            \"sphinx_rtd_theme>=0.1.9, <0.2\",\n        ],\n        'contentviews': [\n            # TODO: Find Python 3 replacements\n            # \"protobuf>=2.6.1, <2.7\",\n            # \"pyamf>=0.8.0, <0.9\",\n        ],\n        'examples': [\n            \"beautifulsoup4>=4.4.1, <4.6\",\n            \"pytz>=2015.07.0, <=2016.6.1\",\n        ]\n    }\n)\n", "path": "setup.py"}]}