We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Locust stopped working after Flast 2.0 got released
in setup.py I can see:
` "flask>=1.1.2", `
I guess it should be hardcoded to ==1.1.2 for now.

it crashes with:
```
File "/root/.local/share/virtualenvs/xxxxxxx/lib/python3.6/site-packages/locust/web.py", line 102, in __init__
app.jinja_options["extensions"].append("jinja2.ext.do")
KeyError: 'extensions'
```

--- 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 # -*- coding: utf-8 -*-
2 import ast
3 import os
4 import re
5 import sys
6 
7 from setuptools import find_packages, setup
8 
9 ROOT_PATH = os.path.abspath(os.path.dirname(__file__))
10 
11 # parse version from locust/__init__.py
12 _version_re = re.compile(r"__version__\s+=\s+(.*)")
13 _init_file = os.path.join(ROOT_PATH, "locust", "__init__.py")
14 with open(_init_file, "rb") as f:
15     version = str(ast.literal_eval(_version_re.search(f.read().decode("utf-8")).group(1)))
16 
17 setup(
18     name="locust",
19     version=version,
20     install_requires=[
21         "gevent>=20.9.0",
22         "flask>=1.1.2",
23         "Werkzeug>=1.0.1",
24         "requests>=2.9.1",
25         "msgpack>=0.6.2",
26         "pyzmq>=16.0.2",
27         "geventhttpclient>=1.4.4",
28         "ConfigArgParse>=1.0",
29         "psutil>=5.6.7",
30         "Flask-BasicAuth>=0.2.0",
31     ],
32     test_suite="locust.test",
33     tests_require=[
34         "cryptography",
35         "mock",
36         "pyquery",
37     ],
38     extras_require={
39         ":sys_platform == 'win32'": ["pywin32"],
40     },
41 )
42
```
--- 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
@@ -19,7 +19,7 @@
     version=version,
     install_requires=[
         "gevent>=20.9.0",
-        "flask>=1.1.2",
+        "flask==1.1.2",
         "Werkzeug>=1.0.1",
         "requests>=2.9.1",
         "msgpack>=0.6.2",

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -19,7 +19,7 @@\n     version=version,\n     install_requires=[\n         \"gevent>=20.9.0\",\n-        \"flask>=1.1.2\",\n+        \"flask==1.1.2\",\n         \"Werkzeug>=1.0.1\",\n         \"requests>=2.9.1\",\n         \"msgpack>=0.6.2\",\n", "issue": "Locust stopped working after Flast 2.0 got released\nin setup.py I can see:\r\n` \"flask>=1.1.2\", `\r\nI guess it should be hardcoded to ==1.1.2 for now.\r\n\r\nit crashes with:\r\n```\r\nFile \"/root/.local/share/virtualenvs/xxxxxxx/lib/python3.6/site-packages/locust/web.py\", line 102, in __init__\r\napp.jinja_options[\"extensions\"].append(\"jinja2.ext.do\")\r\nKeyError: 'extensions'\r\n```\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport ast\nimport os\nimport re\nimport sys\n\nfrom setuptools import find_packages, setup\n\nROOT_PATH = os.path.abspath(os.path.dirname(__file__))\n\n# parse version from locust/__init__.py\n_version_re = re.compile(r\"__version__\\s+=\\s+(.*)\")\n_init_file = os.path.join(ROOT_PATH, \"locust\", \"__init__.py\")\nwith open(_init_file, \"rb\") as f:\n    version = str(ast.literal_eval(_version_re.search(f.read().decode(\"utf-8\")).group(1)))\n\nsetup(\n    name=\"locust\",\n    version=version,\n    install_requires=[\n        \"gevent>=20.9.0\",\n        \"flask>=1.1.2\",\n        \"Werkzeug>=1.0.1\",\n        \"requests>=2.9.1\",\n        \"msgpack>=0.6.2\",\n        \"pyzmq>=16.0.2\",\n        \"geventhttpclient>=1.4.4\",\n        \"ConfigArgParse>=1.0\",\n        \"psutil>=5.6.7\",\n        \"Flask-BasicAuth>=0.2.0\",\n    ],\n    test_suite=\"locust.test\",\n    tests_require=[\n        \"cryptography\",\n        \"mock\",\n        \"pyquery\",\n    ],\n    extras_require={\n        \":sys_platform == 'win32'\": [\"pywin32\"],\n    },\n)\n", "path": "setup.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\nimport ast\nimport os\nimport re\nimport sys\n\nfrom setuptools import find_packages, setup\n\nROOT_PATH = os.path.abspath(os.path.dirname(__file__))\n\n# parse version from locust/__init__.py\n_version_re = re.compile(r\"__version__\\s+=\\s+(.*)\")\n_init_file = os.path.join(ROOT_PATH, \"locust\", \"__init__.py\")\nwith open(_init_file, \"rb\") as f:\n    version = str(ast.literal_eval(_version_re.search(f.read().decode(\"utf-8\")).group(1)))\n\nsetup(\n    name=\"locust\",\n    version=version,\n    install_requires=[\n        \"gevent>=20.9.0\",\n        \"flask==1.1.2\",\n        \"Werkzeug>=1.0.1\",\n        \"requests>=2.9.1\",\n        \"msgpack>=0.6.2\",\n        \"pyzmq>=16.0.2\",\n        \"geventhttpclient>=1.4.4\",\n        \"ConfigArgParse>=1.0\",\n        \"psutil>=5.6.7\",\n        \"Flask-BasicAuth>=0.2.0\",\n    ],\n    test_suite=\"locust.test\",\n    tests_require=[\n        \"cryptography\",\n        \"mock\",\n        \"pyquery\",\n    ],\n    extras_require={\n        \":sys_platform == 'win32'\": [\"pywin32\"],\n    },\n)\n", "path": "setup.py"}]}