We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] `ImportError: cannot import name 'soft_unicode' from 'markupsafe'`
When `Jinja2<3` is installed a user will encounter this error.

```py
>>> import fiftyone as fo
Uncaught exception
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.8/site-packages/fiftyone/service/main.py", line 43, in <module>
    from fiftyone.core.service import Service
  File "/home/user/.local/lib/python3.8/site-packages/fiftyone/__init__.py", line 25, in <module>
    from fiftyone.__public__ import *
  File "/home/user/.local/lib/python3.8/site-packages/fiftyone/__public__.py", line 172, in <module>
    from .core.session import (
  File "/home/user/.local/lib/python3.8/site-packages/fiftyone/core/session.py", line 16, in <module>
    from jinja2 import Template
  File "/home/user/.local/lib/python3.8/site-packages/jinja2/__init__.py", line 12, in <module>
    from .environment import Environment
  File "/home/user/.local/lib/python3.8/site-packages/jinja2/environment.py", line 25, in <module>
    from .defaults import BLOCK_END_STRING
  File "/home/user/.local/lib/python3.8/site-packages/jinja2/defaults.py", line 3, in <module>
    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
  File "/home/user/.local/lib/python3.8/site-packages/jinja2/filters.py", line 13, in <module>
    from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/home/user/.local/lib/python3.8/site-packages/markupsafe/__init__.py)
```

--- 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 python
2 """
3 Installs FiftyOne.
4 
5 | Copyright 2017-2022, Voxel51, Inc.
6 | `voxel51.com <https://voxel51.com/>`_
7 |
8 """
9 import os
10 from pkg_resources import DistributionNotFound, get_distribution
11 import re
12 from setuptools import setup, find_packages
13 
14 
15 VERSION = "0.15.0"  # updated by https://github.com/voxel51/fiftyone/pull/1615
16 
17 
18 def get_version():
19     if "RELEASE_VERSION" in os.environ:
20         version = os.environ["RELEASE_VERSION"]
21         if not version.startswith(VERSION):
22             raise ValueError(
23                 "Release version does not match version: %s and %s"
24                 % (version, VERSION)
25             )
26         return version
27 
28     return VERSION
29 
30 
31 INSTALL_REQUIRES = [
32     # third-party packages
33     "aiofiles",
34     "argcomplete",
35     "boto3",
36     "Deprecated",
37     "eventlet",
38     "future",
39     "Jinja2",
40     "kaleido",
41     "matplotlib",
42     "mongoengine==0.20.0",
43     "motor>=2.3,<3",
44     "ndjson",
45     "numpy",
46     "packaging",
47     "pandas",
48     "Pillow>=6.2",
49     "plotly>=4.14,<5",
50     "pprintpp",
51     "psutil",
52     "pymongo>=3.11,<4",
53     "pytz",
54     "PyYAML",
55     "retrying",
56     "scikit-learn",
57     "scikit-image",
58     "setuptools",
59     "tabulate",
60     "tornado>=5.1.1,<7",
61     "xmltodict",
62     "universal-analytics-python3>=1.0.1,<2",
63     # internal packages
64     "fiftyone-brain>=0.8,<0.9",
65     "fiftyone-db>=0.3,<0.4",
66     "voxel51-eta>=0.6.3,<0.7",
67 ]
68 
69 
70 CHOOSE_INSTALL_REQUIRES = [
71     (
72         (
73             "opencv-python",
74             "opencv-contrib-python",
75             "opencv-contrib-python-headless",
76         ),
77         "opencv-python-headless",
78     )
79 ]
80 
81 
82 def choose_requirement(mains, secondary):
83     chosen = secondary
84     for main in mains:
85         try:
86             name = re.split(r"[!<>=]", main)[0]
87             get_distribution(name)
88             chosen = main
89             break
90         except DistributionNotFound:
91             pass
92 
93     return str(chosen)
94 
95 
96 def get_install_requirements(install_requires, choose_install_requires):
97     for mains, secondary in choose_install_requires:
98         install_requires.append(choose_requirement(mains, secondary))
99 
100     return install_requires
101 
102 
103 EXTRAS_REQUIREMENTS = {"desktop": ["fiftyone-desktop>=0.19.2,<0.20"]}
104 
105 
106 with open("README.md", "r") as fh:
107     long_description = fh.read()
108 
109 
110 setup(
111     name="fiftyone",
112     version=get_version(),
113     description=(
114         "FiftyOne: the open-source tool for building high-quality datasets "
115         "and computer vision models"
116     ),
117     author="Voxel51, Inc.",
118     author_email="info@voxel51.com",
119     url="https://github.com/voxel51/fiftyone",
120     extras_require=EXTRAS_REQUIREMENTS,
121     license="Apache",
122     long_description=long_description,
123     long_description_content_type="text/markdown",
124     packages=find_packages(
125         exclude=["app", "eta", "package", "requirements", "tests", "tools"]
126     )
127     + ["fiftyone.recipes", "fiftyone.tutorials"],
128     package_dir={
129         "fiftyone.recipes": "docs/source/recipes",
130         "fiftyone.tutorials": "docs/source/tutorials",
131     },
132     install_requires=get_install_requirements(
133         INSTALL_REQUIRES, CHOOSE_INSTALL_REQUIRES
134     ),
135     include_package_data=True,
136     classifiers=[
137         "Development Status :: 4 - Beta",
138         "Intended Audience :: Developers",
139         "Intended Audience :: Science/Research",
140         "License :: OSI Approved :: Apache Software License",
141         "Topic :: Scientific/Engineering :: Artificial Intelligence",
142         "Topic :: Scientific/Engineering :: Image Processing",
143         "Topic :: Scientific/Engineering :: Image Recognition",
144         "Topic :: Scientific/Engineering :: Information Analysis",
145         "Topic :: Scientific/Engineering :: Visualization",
146         "Operating System :: MacOS :: MacOS X",
147         "Operating System :: POSIX :: Linux",
148         "Operating System :: Microsoft :: Windows",
149         "Programming Language :: Python :: 3",
150         "Programming Language :: Python :: 3.6",
151         "Programming Language :: Python :: 3.7",
152         "Programming Language :: Python :: 3.8",
153         "Programming Language :: Python :: 3.9",
154     ],
155     entry_points={"console_scripts": ["fiftyone=fiftyone.core.cli:main"]},
156     python_requires=">=3.6",
157 )
158
```
--- 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
@@ -36,7 +36,7 @@
     "Deprecated",
     "eventlet",
     "future",
-    "Jinja2",
+    "Jinja2>=3",
     "kaleido",
     "matplotlib",
     "mongoengine==0.20.0",

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -36,7 +36,7 @@\n     \"Deprecated\",\n     \"eventlet\",\n     \"future\",\n-    \"Jinja2\",\n+    \"Jinja2>=3\",\n     \"kaleido\",\n     \"matplotlib\",\n     \"mongoengine==0.20.0\",\n", "issue": "[BUG] `ImportError: cannot import name 'soft_unicode' from 'markupsafe'`\nWhen `Jinja2<3` is installed a user will encounter this error.\r\n\r\n```py\r\n>>> import fiftyone as fo\r\nUncaught exception\r\nTraceback (most recent call last):\r\n  File \"/home/user/.local/lib/python3.8/site-packages/fiftyone/service/main.py\", line 43, in <module>\r\n    from fiftyone.core.service import Service\r\n  File \"/home/user/.local/lib/python3.8/site-packages/fiftyone/__init__.py\", line 25, in <module>\r\n    from fiftyone.__public__ import *\r\n  File \"/home/user/.local/lib/python3.8/site-packages/fiftyone/__public__.py\", line 172, in <module>\r\n    from .core.session import (\r\n  File \"/home/user/.local/lib/python3.8/site-packages/fiftyone/core/session.py\", line 16, in <module>\r\n    from jinja2 import Template\r\n  File \"/home/user/.local/lib/python3.8/site-packages/jinja2/__init__.py\", line 12, in <module>\r\n    from .environment import Environment\r\n  File \"/home/user/.local/lib/python3.8/site-packages/jinja2/environment.py\", line 25, in <module>\r\n    from .defaults import BLOCK_END_STRING\r\n  File \"/home/user/.local/lib/python3.8/site-packages/jinja2/defaults.py\", line 3, in <module>\r\n    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401\r\n  File \"/home/user/.local/lib/python3.8/site-packages/jinja2/filters.py\", line 13, in <module>\r\n    from markupsafe import soft_unicode\r\nImportError: cannot import name 'soft_unicode' from 'markupsafe' (/home/user/.local/lib/python3.8/site-packages/markupsafe/__init__.py)\r\n```\n", "before_files": [{"content": "#!/usr/bin/env python\n\"\"\"\nInstalls FiftyOne.\n\n| Copyright 2017-2022, Voxel51, Inc.\n| `voxel51.com <https://voxel51.com/>`_\n|\n\"\"\"\nimport os\nfrom pkg_resources import DistributionNotFound, get_distribution\nimport re\nfrom setuptools import setup, find_packages\n\n\nVERSION = \"0.15.0\"  # updated by https://github.com/voxel51/fiftyone/pull/1615\n\n\ndef get_version():\n    if \"RELEASE_VERSION\" in os.environ:\n        version = os.environ[\"RELEASE_VERSION\"]\n        if not version.startswith(VERSION):\n            raise ValueError(\n                \"Release version does not match version: %s and %s\"\n                % (version, VERSION)\n            )\n        return version\n\n    return VERSION\n\n\nINSTALL_REQUIRES = [\n    # third-party packages\n    \"aiofiles\",\n    \"argcomplete\",\n    \"boto3\",\n    \"Deprecated\",\n    \"eventlet\",\n    \"future\",\n    \"Jinja2\",\n    \"kaleido\",\n    \"matplotlib\",\n    \"mongoengine==0.20.0\",\n    \"motor>=2.3,<3\",\n    \"ndjson\",\n    \"numpy\",\n    \"packaging\",\n    \"pandas\",\n    \"Pillow>=6.2\",\n    \"plotly>=4.14,<5\",\n    \"pprintpp\",\n    \"psutil\",\n    \"pymongo>=3.11,<4\",\n    \"pytz\",\n    \"PyYAML\",\n    \"retrying\",\n    \"scikit-learn\",\n    \"scikit-image\",\n    \"setuptools\",\n    \"tabulate\",\n    \"tornado>=5.1.1,<7\",\n    \"xmltodict\",\n    \"universal-analytics-python3>=1.0.1,<2\",\n    # internal packages\n    \"fiftyone-brain>=0.8,<0.9\",\n    \"fiftyone-db>=0.3,<0.4\",\n    \"voxel51-eta>=0.6.3,<0.7\",\n]\n\n\nCHOOSE_INSTALL_REQUIRES = [\n    (\n        (\n            \"opencv-python\",\n            \"opencv-contrib-python\",\n            \"opencv-contrib-python-headless\",\n        ),\n        \"opencv-python-headless\",\n    )\n]\n\n\ndef choose_requirement(mains, secondary):\n    chosen = secondary\n    for main in mains:\n        try:\n            name = re.split(r\"[!<>=]\", main)[0]\n            get_distribution(name)\n            chosen = main\n            break\n        except DistributionNotFound:\n            pass\n\n    return str(chosen)\n\n\ndef get_install_requirements(install_requires, choose_install_requires):\n    for mains, secondary in choose_install_requires:\n        install_requires.append(choose_requirement(mains, secondary))\n\n    return install_requires\n\n\nEXTRAS_REQUIREMENTS = {\"desktop\": [\"fiftyone-desktop>=0.19.2,<0.20\"]}\n\n\nwith open(\"README.md\", \"r\") as fh:\n    long_description = fh.read()\n\n\nsetup(\n    name=\"fiftyone\",\n    version=get_version(),\n    description=(\n        \"FiftyOne: the open-source tool for building high-quality datasets \"\n        \"and computer vision models\"\n    ),\n    author=\"Voxel51, Inc.\",\n    author_email=\"info@voxel51.com\",\n    url=\"https://github.com/voxel51/fiftyone\",\n    extras_require=EXTRAS_REQUIREMENTS,\n    license=\"Apache\",\n    long_description=long_description,\n    long_description_content_type=\"text/markdown\",\n    packages=find_packages(\n        exclude=[\"app\", \"eta\", \"package\", \"requirements\", \"tests\", \"tools\"]\n    )\n    + [\"fiftyone.recipes\", \"fiftyone.tutorials\"],\n    package_dir={\n        \"fiftyone.recipes\": \"docs/source/recipes\",\n        \"fiftyone.tutorials\": \"docs/source/tutorials\",\n    },\n    install_requires=get_install_requirements(\n        INSTALL_REQUIRES, CHOOSE_INSTALL_REQUIRES\n    ),\n    include_package_data=True,\n    classifiers=[\n        \"Development Status :: 4 - Beta\",\n        \"Intended Audience :: Developers\",\n        \"Intended Audience :: Science/Research\",\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Topic :: Scientific/Engineering :: Artificial Intelligence\",\n        \"Topic :: Scientific/Engineering :: Image Processing\",\n        \"Topic :: Scientific/Engineering :: Image Recognition\",\n        \"Topic :: Scientific/Engineering :: Information Analysis\",\n        \"Topic :: Scientific/Engineering :: Visualization\",\n        \"Operating System :: MacOS :: MacOS X\",\n        \"Operating System :: POSIX :: Linux\",\n        \"Operating System :: Microsoft :: Windows\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n    ],\n    entry_points={\"console_scripts\": [\"fiftyone=fiftyone.core.cli:main\"]},\n    python_requires=\">=3.6\",\n)\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python\n\"\"\"\nInstalls FiftyOne.\n\n| Copyright 2017-2022, Voxel51, Inc.\n| `voxel51.com <https://voxel51.com/>`_\n|\n\"\"\"\nimport os\nfrom pkg_resources import DistributionNotFound, get_distribution\nimport re\nfrom setuptools import setup, find_packages\n\n\nVERSION = \"0.15.0\"  # updated by https://github.com/voxel51/fiftyone/pull/1615\n\n\ndef get_version():\n    if \"RELEASE_VERSION\" in os.environ:\n        version = os.environ[\"RELEASE_VERSION\"]\n        if not version.startswith(VERSION):\n            raise ValueError(\n                \"Release version does not match version: %s and %s\"\n                % (version, VERSION)\n            )\n        return version\n\n    return VERSION\n\n\nINSTALL_REQUIRES = [\n    # third-party packages\n    \"aiofiles\",\n    \"argcomplete\",\n    \"boto3\",\n    \"Deprecated\",\n    \"eventlet\",\n    \"future\",\n    \"Jinja2>=3\",\n    \"kaleido\",\n    \"matplotlib\",\n    \"mongoengine==0.20.0\",\n    \"motor>=2.3,<3\",\n    \"ndjson\",\n    \"numpy\",\n    \"packaging\",\n    \"pandas\",\n    \"Pillow>=6.2\",\n    \"plotly>=4.14,<5\",\n    \"pprintpp\",\n    \"psutil\",\n    \"pymongo>=3.11,<4\",\n    \"pytz\",\n    \"PyYAML\",\n    \"retrying\",\n    \"scikit-learn\",\n    \"scikit-image\",\n    \"setuptools\",\n    \"tabulate\",\n    \"tornado>=5.1.1,<7\",\n    \"xmltodict\",\n    \"universal-analytics-python3>=1.0.1,<2\",\n    # internal packages\n    \"fiftyone-brain>=0.8,<0.9\",\n    \"fiftyone-db>=0.3,<0.4\",\n    \"voxel51-eta>=0.6.3,<0.7\",\n]\n\n\nCHOOSE_INSTALL_REQUIRES = [\n    (\n        (\n            \"opencv-python\",\n            \"opencv-contrib-python\",\n            \"opencv-contrib-python-headless\",\n        ),\n        \"opencv-python-headless\",\n    )\n]\n\n\ndef choose_requirement(mains, secondary):\n    chosen = secondary\n    for main in mains:\n        try:\n            name = re.split(r\"[!<>=]\", main)[0]\n            get_distribution(name)\n            chosen = main\n            break\n        except DistributionNotFound:\n            pass\n\n    return str(chosen)\n\n\ndef get_install_requirements(install_requires, choose_install_requires):\n    for mains, secondary in choose_install_requires:\n        install_requires.append(choose_requirement(mains, secondary))\n\n    return install_requires\n\n\nEXTRAS_REQUIREMENTS = {\"desktop\": [\"fiftyone-desktop>=0.19.2,<0.20\"]}\n\n\nwith open(\"README.md\", \"r\") as fh:\n    long_description = fh.read()\n\n\nsetup(\n    name=\"fiftyone\",\n    version=get_version(),\n    description=(\n        \"FiftyOne: the open-source tool for building high-quality datasets \"\n        \"and computer vision models\"\n    ),\n    author=\"Voxel51, Inc.\",\n    author_email=\"info@voxel51.com\",\n    url=\"https://github.com/voxel51/fiftyone\",\n    extras_require=EXTRAS_REQUIREMENTS,\n    license=\"Apache\",\n    long_description=long_description,\n    long_description_content_type=\"text/markdown\",\n    packages=find_packages(\n        exclude=[\"app\", \"eta\", \"package\", \"requirements\", \"tests\", \"tools\"]\n    )\n    + [\"fiftyone.recipes\", \"fiftyone.tutorials\"],\n    package_dir={\n        \"fiftyone.recipes\": \"docs/source/recipes\",\n        \"fiftyone.tutorials\": \"docs/source/tutorials\",\n    },\n    install_requires=get_install_requirements(\n        INSTALL_REQUIRES, CHOOSE_INSTALL_REQUIRES\n    ),\n    include_package_data=True,\n    classifiers=[\n        \"Development Status :: 4 - Beta\",\n        \"Intended Audience :: Developers\",\n        \"Intended Audience :: Science/Research\",\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Topic :: Scientific/Engineering :: Artificial Intelligence\",\n        \"Topic :: Scientific/Engineering :: Image Processing\",\n        \"Topic :: Scientific/Engineering :: Image Recognition\",\n        \"Topic :: Scientific/Engineering :: Information Analysis\",\n        \"Topic :: Scientific/Engineering :: Visualization\",\n        \"Operating System :: MacOS :: MacOS X\",\n        \"Operating System :: POSIX :: Linux\",\n        \"Operating System :: Microsoft :: Windows\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n    ],\n    entry_points={\"console_scripts\": [\"fiftyone=fiftyone.core.cli:main\"]},\n    python_requires=\">=3.6\",\n)\n", "path": "setup.py"}]}