We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
New versions of sphinx and jinja2 break docs linting
This is observed by @tcbegley in #1034

--- 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 # Copyright Contributors to the Pyro project.
2 # SPDX-License-Identifier: Apache-2.0
3 
4 from __future__ import absolute_import, division, print_function
5 
6 import os
7 import sys
8 
9 from setuptools import find_packages, setup
10 
11 PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
12 
13 # Find version
14 for line in open(os.path.join(PROJECT_PATH, "numpyro", "version.py")):
15     if line.startswith("__version__ = "):
16         version = line.strip().split()[2][1:-1]
17 
18 # READ README.md for long description on PyPi.
19 try:
20     long_description = open("README.md", encoding="utf-8").read()
21 except Exception as e:
22     sys.stderr.write("Failed to read README.md:\n  {}\n".format(e))
23     sys.stderr.flush()
24     long_description = ""
25 
26 
27 setup(
28     name="numpyro",
29     version=version,
30     description="Pyro PPL on NumPy",
31     packages=find_packages(include=["numpyro", "numpyro.*"]),
32     url="https://github.com/pyro-ppl/numpyro",
33     author="Uber AI Labs",
34     install_requires=[
35         "jax>=0.2.11",
36         "jaxlib>=0.1.62",
37         "tqdm",
38     ],
39     extras_require={
40         "doc": [
41             "ipython",  # sphinx needs this to render codes
42             "jinja2<3.0.0",
43             "nbsphinx",
44             "sphinx<4.0.0",
45             "sphinx_rtd_theme",
46             "sphinx-gallery",
47         ],
48         "test": [
49             "black",
50             "flake8",
51             "isort>=5.0",
52             "pytest>=4.1",
53             "pyro-api>=0.1.1",
54             "scipy>=1.1",
55         ],
56         "dev": [
57             "dm-haiku",
58             "flax",
59             # TODO: bump funsor version before the release
60             "funsor @ git+https://github.com/pyro-ppl/funsor.git@d5574988665dd822ec64e41f2b54b9dc929959dc",
61             "graphviz",
62             "optax==0.0.6",
63             # TODO: change this to tensorflow_probability>0.12.1 when the next version
64             # of tfp is released. The current release is not compatible with jax>=0.2.12.
65             "tfp-nightly",
66         ],
67         "examples": ["arviz", "jupyter", "matplotlib", "pandas", "seaborn"],
68     },
69     long_description=long_description,
70     long_description_content_type="text/markdown",
71     keywords="probabilistic machine learning bayesian statistics",
72     license="Apache License 2.0",
73     classifiers=[
74         "Intended Audience :: Developers",
75         "Intended Audience :: Education",
76         "Intended Audience :: Science/Research",
77         "License :: OSI Approved :: Apache Software License",
78         "Operating System :: POSIX :: Linux",
79         "Operating System :: MacOS :: MacOS X",
80         "Programming Language :: Python :: 3.6",
81         "Programming Language :: Python :: 3.7",
82         "Programming Language :: Python :: 3.8",
83         "Programming Language :: Python :: 3.9",
84     ],
85 )
86
```
--- 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
@@ -39,9 +39,8 @@
     extras_require={
         "doc": [
             "ipython",  # sphinx needs this to render codes
-            "jinja2<3.0.0",
-            "nbsphinx",
-            "sphinx<4.0.0",
+            "nbsphinx>=0.8.5",
+            "sphinx",
             "sphinx_rtd_theme",
             "sphinx-gallery",
         ],

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -39,9 +39,8 @@\n     extras_require={\n         \"doc\": [\n             \"ipython\",  # sphinx needs this to render codes\n-            \"jinja2<3.0.0\",\n-            \"nbsphinx\",\n-            \"sphinx<4.0.0\",\n+            \"nbsphinx>=0.8.5\",\n+            \"sphinx\",\n             \"sphinx_rtd_theme\",\n             \"sphinx-gallery\",\n         ],\n", "issue": "New versions of sphinx and jinja2 break docs linting\nThis is observed by @tcbegley in #1034\n", "before_files": [{"content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom __future__ import absolute_import, division, print_function\n\nimport os\nimport sys\n\nfrom setuptools import find_packages, setup\n\nPROJECT_PATH = os.path.dirname(os.path.abspath(__file__))\n\n# Find version\nfor line in open(os.path.join(PROJECT_PATH, \"numpyro\", \"version.py\")):\n    if line.startswith(\"__version__ = \"):\n        version = line.strip().split()[2][1:-1]\n\n# READ README.md for long description on PyPi.\ntry:\n    long_description = open(\"README.md\", encoding=\"utf-8\").read()\nexcept Exception as e:\n    sys.stderr.write(\"Failed to read README.md:\\n  {}\\n\".format(e))\n    sys.stderr.flush()\n    long_description = \"\"\n\n\nsetup(\n    name=\"numpyro\",\n    version=version,\n    description=\"Pyro PPL on NumPy\",\n    packages=find_packages(include=[\"numpyro\", \"numpyro.*\"]),\n    url=\"https://github.com/pyro-ppl/numpyro\",\n    author=\"Uber AI Labs\",\n    install_requires=[\n        \"jax>=0.2.11\",\n        \"jaxlib>=0.1.62\",\n        \"tqdm\",\n    ],\n    extras_require={\n        \"doc\": [\n            \"ipython\",  # sphinx needs this to render codes\n            \"jinja2<3.0.0\",\n            \"nbsphinx\",\n            \"sphinx<4.0.0\",\n            \"sphinx_rtd_theme\",\n            \"sphinx-gallery\",\n        ],\n        \"test\": [\n            \"black\",\n            \"flake8\",\n            \"isort>=5.0\",\n            \"pytest>=4.1\",\n            \"pyro-api>=0.1.1\",\n            \"scipy>=1.1\",\n        ],\n        \"dev\": [\n            \"dm-haiku\",\n            \"flax\",\n            # TODO: bump funsor version before the release\n            \"funsor @ git+https://github.com/pyro-ppl/funsor.git@d5574988665dd822ec64e41f2b54b9dc929959dc\",\n            \"graphviz\",\n            \"optax==0.0.6\",\n            # TODO: change this to tensorflow_probability>0.12.1 when the next version\n            # of tfp is released. The current release is not compatible with jax>=0.2.12.\n            \"tfp-nightly\",\n        ],\n        \"examples\": [\"arviz\", \"jupyter\", \"matplotlib\", \"pandas\", \"seaborn\"],\n    },\n    long_description=long_description,\n    long_description_content_type=\"text/markdown\",\n    keywords=\"probabilistic machine learning bayesian statistics\",\n    license=\"Apache License 2.0\",\n    classifiers=[\n        \"Intended Audience :: Developers\",\n        \"Intended Audience :: Education\",\n        \"Intended Audience :: Science/Research\",\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Operating System :: POSIX :: Linux\",\n        \"Operating System :: MacOS :: MacOS X\",\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)\n", "path": "setup.py"}], "after_files": [{"content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom __future__ import absolute_import, division, print_function\n\nimport os\nimport sys\n\nfrom setuptools import find_packages, setup\n\nPROJECT_PATH = os.path.dirname(os.path.abspath(__file__))\n\n# Find version\nfor line in open(os.path.join(PROJECT_PATH, \"numpyro\", \"version.py\")):\n    if line.startswith(\"__version__ = \"):\n        version = line.strip().split()[2][1:-1]\n\n# READ README.md for long description on PyPi.\ntry:\n    long_description = open(\"README.md\", encoding=\"utf-8\").read()\nexcept Exception as e:\n    sys.stderr.write(\"Failed to read README.md:\\n  {}\\n\".format(e))\n    sys.stderr.flush()\n    long_description = \"\"\n\n\nsetup(\n    name=\"numpyro\",\n    version=version,\n    description=\"Pyro PPL on NumPy\",\n    packages=find_packages(include=[\"numpyro\", \"numpyro.*\"]),\n    url=\"https://github.com/pyro-ppl/numpyro\",\n    author=\"Uber AI Labs\",\n    install_requires=[\n        \"jax>=0.2.11\",\n        \"jaxlib>=0.1.62\",\n        \"tqdm\",\n    ],\n    extras_require={\n        \"doc\": [\n            \"ipython\",  # sphinx needs this to render codes\n            \"nbsphinx>=0.8.5\",\n            \"sphinx\",\n            \"sphinx_rtd_theme\",\n            \"sphinx-gallery\",\n        ],\n        \"test\": [\n            \"black\",\n            \"flake8\",\n            \"isort>=5.0\",\n            \"pytest>=4.1\",\n            \"pyro-api>=0.1.1\",\n            \"scipy>=1.1\",\n        ],\n        \"dev\": [\n            \"dm-haiku\",\n            \"flax\",\n            # TODO: bump funsor version before the release\n            \"funsor @ git+https://github.com/pyro-ppl/funsor.git@d5574988665dd822ec64e41f2b54b9dc929959dc\",\n            \"graphviz\",\n            \"optax==0.0.6\",\n            # TODO: change this to tensorflow_probability>0.12.1 when the next version\n            # of tfp is released. The current release is not compatible with jax>=0.2.12.\n            \"tfp-nightly\",\n        ],\n        \"examples\": [\"arviz\", \"jupyter\", \"matplotlib\", \"pandas\", \"seaborn\"],\n    },\n    long_description=long_description,\n    long_description_content_type=\"text/markdown\",\n    keywords=\"probabilistic machine learning bayesian statistics\",\n    license=\"Apache License 2.0\",\n    classifiers=[\n        \"Intended Audience :: Developers\",\n        \"Intended Audience :: Education\",\n        \"Intended Audience :: Science/Research\",\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Operating System :: POSIX :: Linux\",\n        \"Operating System :: MacOS :: MacOS X\",\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)\n", "path": "setup.py"}]}