We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Pinned jinja2 version is no longer supported and conflicts with the latest MarkupSafe
**Current behavior**

insights-core has pinned the jinja2 version to <=2.11.3 in #3057. This version is [no longer supported](https://github.com/pallets/jinja/issues/1585#issuecomment-1043892628).

**Expected behavior**

insights-core can be used with a maintained jinja2 version in applications that depend both on insights-core and jinja2.

**Impact**

jinja2-2.11.3 fails to import with the latest version of MarkupSafe, 2.1.0:

```
...
.tox/unit-py38/lib/python3.8/site-packages/jinja2/filters.py:13: in <module>
    from markupsafe import soft_unicode
E   ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/builds/ccx/ccx-rules-ocp/.tox/unit-py38/lib64/python3.8/site-packages/markupsafe/__init__.py
```

All projects that depend on insights-core have to pin unsupported versions of MarkupSafe now. I would argue that it is important to keep up-to-date for a package that is used for secure handling of user input.

--- 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 import os
2 from setuptools import setup, find_packages
3 
4 __here__ = os.path.dirname(os.path.abspath(__file__))
5 
6 package_info = dict.fromkeys(["RELEASE", "COMMIT", "VERSION", "NAME"])
7 
8 for name in package_info:
9     with open(os.path.join(__here__, "insights", name)) as f:
10         package_info[name] = f.read().strip()
11 
12 entry_points = {
13     'console_scripts': [
14         'insights-collect = insights.collect:main',
15         'insights-run = insights:main',
16         'insights = insights.command_parser:main',
17         'insights-cat = insights.tools.cat:main',
18         'insights-dupkeycheck = insights.tools.dupkeycheck:main',
19         'insights-inspect = insights.tools.insights_inspect:main',
20         'insights-info = insights.tools.query:main',
21         'insights-ocpshell= insights.ocpshell:main',
22         'mangle = insights.util.mangle:main'
23     ]
24 }
25 
26 runtime = set([
27     'six',
28     'requests',
29     'redis',
30     'cachecontrol',
31     'cachecontrol[redis]',
32     'cachecontrol[filecache]',
33     'defusedxml',
34     'lockfile',
35     'jinja2<=2.11.3',
36     'pyyaml>=3.10,<=3.13; python_version < "2.7"',
37     'pyyaml; python_version >= "2.7"',
38 ])
39 
40 
41 def maybe_require(pkg):
42     try:
43         __import__(pkg)
44     except ImportError:
45         runtime.add(pkg)
46 
47 
48 maybe_require("importlib")
49 maybe_require("argparse")
50 
51 
52 client = set([
53     'requests',
54     'python-gnupg==0.4.6',
55     'oyaml'
56 ])
57 
58 develop = set([
59     'wheel',
60 ])
61 
62 docs = set([
63     'docutils',
64     'Sphinx',
65     'nbsphinx',
66     'sphinx_rtd_theme',
67     'ipython',
68     'colorama',
69     'jinja2<=2.11.3',
70     'Pygments',
71     'jedi<0.18.0',    # Open issue with jedi 0.18.0 and iPython <= 7.19
72                       # https://github.com/davidhalter/jedi/issues/1714
73 ])
74 
75 # python 2.6 requires setuptools~=36.8.0 to support this syntax
76 testing = set([
77     'coverage==4.3.4; python_version < "2.7"',
78     'coverage; python_version >= "2.7"',
79     'pytest==3.0.6; python_version < "2.7"',
80     'pytest~=4.6.0; python_version == "2.7"',
81     'pytest; python_version >= "3"',
82     'pytest-cov==2.4.0; python_version < "2.7"',
83     'pytest-cov; python_version >= "2.7"',
84     'mock==2.0.0',
85 ])
86 
87 cluster = set([
88     'ansible',
89     'pandas',
90     'colorama',
91 ])
92 
93 openshift = set([
94     'openshift'
95 ])
96 
97 linting = set([
98     'flake8==2.6.2; python_version < "2.7"',
99     'flake8; python_version >= "2.7"'
100 ])
101 
102 optional = set([
103     'python-cjson',
104     'python-logstash',
105     'python-statsd',
106     'watchdog',
107 ])
108 
109 if __name__ == "__main__":
110     # allows for runtime modification of rpm name
111     name = os.environ.get("INSIGHTS_CORE_NAME", package_info["NAME"])
112 
113     setup(
114         name=name,
115         version=package_info["VERSION"],
116         description="Insights Core is a data collection and analysis framework",
117         long_description=open("README.rst").read(),
118         url="https://github.com/redhatinsights/insights-core",
119         author="Red Hat, Inc.",
120         author_email="insights@redhat.com",
121         packages=find_packages(),
122         install_requires=list(runtime),
123         package_data={'': ['LICENSE']},
124         license='Apache 2.0',
125         extras_require={
126             'develop': list(runtime | develop | client | docs | linting | testing | cluster),
127             'develop26': list(runtime | develop | client | linting | testing | cluster),
128             'client': list(runtime | client),
129             'client-develop': list(runtime | develop | client | linting | testing),
130             'cluster': list(runtime | cluster),
131             'openshift': list(runtime | openshift),
132             'optional': list(optional),
133             'docs': list(docs),
134             'linting': list(linting | client),
135             'testing': list(testing | client)
136         },
137         classifiers=[
138             'Development Status :: 5 - Production/Stable',
139             'Intended Audience :: Developers',
140             'Natural Language :: English',
141             'License :: OSI Approved :: Apache Software License',
142             'Programming Language :: Python',
143             'Programming Language :: Python :: 2.6',
144             'Programming Language :: Python :: 2.7',
145             'Programming Language :: Python :: 3.3',
146             'Programming Language :: Python :: 3.4',
147             'Programming Language :: Python :: 3.5',
148             'Programming Language :: Python :: 3.6'
149         ],
150         entry_points=entry_points,
151         include_package_data=True
152     )
153
```
--- 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
@@ -32,7 +32,8 @@
     'cachecontrol[filecache]',
     'defusedxml',
     'lockfile',
-    'jinja2<=2.11.3',
+    'jinja2<=2.11.3; python_version <= "2.7"',
+    'jinja2; python_version > "2.7"',
     'pyyaml>=3.10,<=3.13; python_version < "2.7"',
     'pyyaml; python_version >= "2.7"',
 ])
@@ -66,7 +67,6 @@
     'sphinx_rtd_theme',
     'ipython',
     'colorama',
-    'jinja2<=2.11.3',
     'Pygments',
     'jedi<0.18.0',    # Open issue with jedi 0.18.0 and iPython <= 7.19
                       # https://github.com/davidhalter/jedi/issues/1714

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -32,7 +32,8 @@\n     'cachecontrol[filecache]',\n     'defusedxml',\n     'lockfile',\n-    'jinja2<=2.11.3',\n+    'jinja2<=2.11.3; python_version <= \"2.7\"',\n+    'jinja2; python_version > \"2.7\"',\n     'pyyaml>=3.10,<=3.13; python_version < \"2.7\"',\n     'pyyaml; python_version >= \"2.7\"',\n ])\n@@ -66,7 +67,6 @@\n     'sphinx_rtd_theme',\n     'ipython',\n     'colorama',\n-    'jinja2<=2.11.3',\n     'Pygments',\n     'jedi<0.18.0',    # Open issue with jedi 0.18.0 and iPython <= 7.19\n                       # https://github.com/davidhalter/jedi/issues/1714\n", "issue": "Pinned jinja2 version is no longer supported and conflicts with the latest MarkupSafe\n**Current behavior**\r\n\r\ninsights-core has pinned the jinja2 version to <=2.11.3 in #3057. This version is [no longer supported](https://github.com/pallets/jinja/issues/1585#issuecomment-1043892628).\r\n\r\n**Expected behavior**\r\n\r\ninsights-core can be used with a maintained jinja2 version in applications that depend both on insights-core and jinja2.\r\n\r\n**Impact**\r\n\r\njinja2-2.11.3 fails to import with the latest version of MarkupSafe, 2.1.0:\r\n\r\n```\r\n...\r\n.tox/unit-py38/lib/python3.8/site-packages/jinja2/filters.py:13: in <module>\r\n    from markupsafe import soft_unicode\r\nE   ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/builds/ccx/ccx-rules-ocp/.tox/unit-py38/lib64/python3.8/site-packages/markupsafe/__init__.py\r\n```\r\n\r\nAll projects that depend on insights-core have to pin unsupported versions of MarkupSafe now. I would argue that it is important to keep up-to-date for a package that is used for secure handling of user input.\n", "before_files": [{"content": "import os\nfrom setuptools import setup, find_packages\n\n__here__ = os.path.dirname(os.path.abspath(__file__))\n\npackage_info = dict.fromkeys([\"RELEASE\", \"COMMIT\", \"VERSION\", \"NAME\"])\n\nfor name in package_info:\n    with open(os.path.join(__here__, \"insights\", name)) as f:\n        package_info[name] = f.read().strip()\n\nentry_points = {\n    'console_scripts': [\n        'insights-collect = insights.collect:main',\n        'insights-run = insights:main',\n        'insights = insights.command_parser:main',\n        'insights-cat = insights.tools.cat:main',\n        'insights-dupkeycheck = insights.tools.dupkeycheck:main',\n        'insights-inspect = insights.tools.insights_inspect:main',\n        'insights-info = insights.tools.query:main',\n        'insights-ocpshell= insights.ocpshell:main',\n        'mangle = insights.util.mangle:main'\n    ]\n}\n\nruntime = set([\n    'six',\n    'requests',\n    'redis',\n    'cachecontrol',\n    'cachecontrol[redis]',\n    'cachecontrol[filecache]',\n    'defusedxml',\n    'lockfile',\n    'jinja2<=2.11.3',\n    'pyyaml>=3.10,<=3.13; python_version < \"2.7\"',\n    'pyyaml; python_version >= \"2.7\"',\n])\n\n\ndef maybe_require(pkg):\n    try:\n        __import__(pkg)\n    except ImportError:\n        runtime.add(pkg)\n\n\nmaybe_require(\"importlib\")\nmaybe_require(\"argparse\")\n\n\nclient = set([\n    'requests',\n    'python-gnupg==0.4.6',\n    'oyaml'\n])\n\ndevelop = set([\n    'wheel',\n])\n\ndocs = set([\n    'docutils',\n    'Sphinx',\n    'nbsphinx',\n    'sphinx_rtd_theme',\n    'ipython',\n    'colorama',\n    'jinja2<=2.11.3',\n    'Pygments',\n    'jedi<0.18.0',    # Open issue with jedi 0.18.0 and iPython <= 7.19\n                      # https://github.com/davidhalter/jedi/issues/1714\n])\n\n# python 2.6 requires setuptools~=36.8.0 to support this syntax\ntesting = set([\n    'coverage==4.3.4; python_version < \"2.7\"',\n    'coverage; python_version >= \"2.7\"',\n    'pytest==3.0.6; python_version < \"2.7\"',\n    'pytest~=4.6.0; python_version == \"2.7\"',\n    'pytest; python_version >= \"3\"',\n    'pytest-cov==2.4.0; python_version < \"2.7\"',\n    'pytest-cov; python_version >= \"2.7\"',\n    'mock==2.0.0',\n])\n\ncluster = set([\n    'ansible',\n    'pandas',\n    'colorama',\n])\n\nopenshift = set([\n    'openshift'\n])\n\nlinting = set([\n    'flake8==2.6.2; python_version < \"2.7\"',\n    'flake8; python_version >= \"2.7\"'\n])\n\noptional = set([\n    'python-cjson',\n    'python-logstash',\n    'python-statsd',\n    'watchdog',\n])\n\nif __name__ == \"__main__\":\n    # allows for runtime modification of rpm name\n    name = os.environ.get(\"INSIGHTS_CORE_NAME\", package_info[\"NAME\"])\n\n    setup(\n        name=name,\n        version=package_info[\"VERSION\"],\n        description=\"Insights Core is a data collection and analysis framework\",\n        long_description=open(\"README.rst\").read(),\n        url=\"https://github.com/redhatinsights/insights-core\",\n        author=\"Red Hat, Inc.\",\n        author_email=\"insights@redhat.com\",\n        packages=find_packages(),\n        install_requires=list(runtime),\n        package_data={'': ['LICENSE']},\n        license='Apache 2.0',\n        extras_require={\n            'develop': list(runtime | develop | client | docs | linting | testing | cluster),\n            'develop26': list(runtime | develop | client | linting | testing | cluster),\n            'client': list(runtime | client),\n            'client-develop': list(runtime | develop | client | linting | testing),\n            'cluster': list(runtime | cluster),\n            'openshift': list(runtime | openshift),\n            'optional': list(optional),\n            'docs': list(docs),\n            'linting': list(linting | client),\n            'testing': list(testing | client)\n        },\n        classifiers=[\n            'Development Status :: 5 - Production/Stable',\n            'Intended Audience :: Developers',\n            'Natural Language :: English',\n            'License :: OSI Approved :: Apache Software License',\n            'Programming Language :: Python',\n            'Programming Language :: Python :: 2.6',\n            'Programming Language :: Python :: 2.7',\n            'Programming Language :: Python :: 3.3',\n            'Programming Language :: Python :: 3.4',\n            'Programming Language :: Python :: 3.5',\n            'Programming Language :: Python :: 3.6'\n        ],\n        entry_points=entry_points,\n        include_package_data=True\n    )\n", "path": "setup.py"}], "after_files": [{"content": "import os\nfrom setuptools import setup, find_packages\n\n__here__ = os.path.dirname(os.path.abspath(__file__))\n\npackage_info = dict.fromkeys([\"RELEASE\", \"COMMIT\", \"VERSION\", \"NAME\"])\n\nfor name in package_info:\n    with open(os.path.join(__here__, \"insights\", name)) as f:\n        package_info[name] = f.read().strip()\n\nentry_points = {\n    'console_scripts': [\n        'insights-collect = insights.collect:main',\n        'insights-run = insights:main',\n        'insights = insights.command_parser:main',\n        'insights-cat = insights.tools.cat:main',\n        'insights-dupkeycheck = insights.tools.dupkeycheck:main',\n        'insights-inspect = insights.tools.insights_inspect:main',\n        'insights-info = insights.tools.query:main',\n        'insights-ocpshell= insights.ocpshell:main',\n        'mangle = insights.util.mangle:main'\n    ]\n}\n\nruntime = set([\n    'six',\n    'requests',\n    'redis',\n    'cachecontrol',\n    'cachecontrol[redis]',\n    'cachecontrol[filecache]',\n    'defusedxml',\n    'lockfile',\n    'jinja2<=2.11.3; python_version <= \"2.7\"',\n    'jinja2; python_version > \"2.7\"',\n    'pyyaml>=3.10,<=3.13; python_version < \"2.7\"',\n    'pyyaml; python_version >= \"2.7\"',\n])\n\n\ndef maybe_require(pkg):\n    try:\n        __import__(pkg)\n    except ImportError:\n        runtime.add(pkg)\n\n\nmaybe_require(\"importlib\")\nmaybe_require(\"argparse\")\n\n\nclient = set([\n    'requests',\n    'python-gnupg==0.4.6',\n    'oyaml'\n])\n\ndevelop = set([\n    'wheel',\n])\n\ndocs = set([\n    'docutils',\n    'Sphinx',\n    'nbsphinx',\n    'sphinx_rtd_theme',\n    'ipython',\n    'colorama',\n    'Pygments',\n    'jedi<0.18.0',    # Open issue with jedi 0.18.0 and iPython <= 7.19\n                      # https://github.com/davidhalter/jedi/issues/1714\n])\n\n# python 2.6 requires setuptools~=36.8.0 to support this syntax\ntesting = set([\n    'coverage==4.3.4; python_version < \"2.7\"',\n    'coverage; python_version >= \"2.7\"',\n    'pytest==3.0.6; python_version < \"2.7\"',\n    'pytest~=4.6.0; python_version == \"2.7\"',\n    'pytest; python_version >= \"3\"',\n    'pytest-cov==2.4.0; python_version < \"2.7\"',\n    'pytest-cov; python_version >= \"2.7\"',\n    'mock==2.0.0',\n])\n\ncluster = set([\n    'ansible',\n    'pandas',\n    'colorama',\n])\n\nopenshift = set([\n    'openshift'\n])\n\nlinting = set([\n    'flake8==2.6.2; python_version < \"2.7\"',\n    'flake8; python_version >= \"2.7\"'\n])\n\noptional = set([\n    'python-cjson',\n    'python-logstash',\n    'python-statsd',\n    'watchdog',\n])\n\nif __name__ == \"__main__\":\n    # allows for runtime modification of rpm name\n    name = os.environ.get(\"INSIGHTS_CORE_NAME\", package_info[\"NAME\"])\n\n    setup(\n        name=name,\n        version=package_info[\"VERSION\"],\n        description=\"Insights Core is a data collection and analysis framework\",\n        long_description=open(\"README.rst\").read(),\n        url=\"https://github.com/redhatinsights/insights-core\",\n        author=\"Red Hat, Inc.\",\n        author_email=\"insights@redhat.com\",\n        packages=find_packages(),\n        install_requires=list(runtime),\n        package_data={'': ['LICENSE']},\n        license='Apache 2.0',\n        extras_require={\n            'develop': list(runtime | develop | client | docs | linting | testing | cluster),\n            'develop26': list(runtime | develop | client | linting | testing | cluster),\n            'client': list(runtime | client),\n            'client-develop': list(runtime | develop | client | linting | testing),\n            'cluster': list(runtime | cluster),\n            'openshift': list(runtime | openshift),\n            'optional': list(optional),\n            'docs': list(docs),\n            'linting': list(linting | client),\n            'testing': list(testing | client)\n        },\n        classifiers=[\n            'Development Status :: 5 - Production/Stable',\n            'Intended Audience :: Developers',\n            'Natural Language :: English',\n            'License :: OSI Approved :: Apache Software License',\n            'Programming Language :: Python',\n            'Programming Language :: Python :: 2.6',\n            'Programming Language :: Python :: 2.7',\n            'Programming Language :: Python :: 3.3',\n            'Programming Language :: Python :: 3.4',\n            'Programming Language :: Python :: 3.5',\n            'Programming Language :: Python :: 3.6'\n        ],\n        entry_points=entry_points,\n        include_package_data=True\n    )\n", "path": "setup.py"}]}