We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Use of the outdated 'jupyter' metapackage
### Issue Description
You depend [here](https://github.com/pyro-ppl/pyro/blob/dev/setup.py#L68) on the outdated jupyter package.
It hasn't been updated since 2015.
This dependency would be probably correct if the Jupyter project would update this PYPI package.
See [this discussion](https://discourse.jupyter.org/t/the-jupyter-metapackage-is-outdated-on-pypi/25034).



--- 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 (c) 2017-2019 Uber Technologies, Inc.
2 # SPDX-License-Identifier: Apache-2.0
3 
4 import os
5 import subprocess
6 import sys
7 
8 from setuptools import find_packages, setup
9 
10 PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
11 VERSION = """
12 # This file is auto-generated with the version information during setup.py installation.
13 
14 __version__ = '{}'
15 """
16 
17 # Find pyro version.
18 for line in open(os.path.join(PROJECT_PATH, "pyro", "__init__.py")):
19     if line.startswith("version_prefix = "):
20         version = line.strip().split()[2][1:-1]
21 
22 # Append current commit sha to version
23 commit_sha = ""
24 try:
25     current_tag = (
26         subprocess.check_output(["git", "tag", "--points-at", "HEAD"], cwd=PROJECT_PATH)
27         .decode("ascii")
28         .strip()
29     )
30     # only add sha if HEAD does not point to the release tag
31     if not current_tag == version:
32         commit_sha = (
33             subprocess.check_output(
34                 ["git", "rev-parse", "--short", "HEAD"], cwd=PROJECT_PATH
35             )
36             .decode("ascii")
37             .strip()
38         )
39 # catch all exception to be safe
40 except Exception:
41     pass  # probably not a git repo
42 
43 # Write version to _version.py
44 if commit_sha:
45     version += "+{}".format(commit_sha)
46 with open(os.path.join(PROJECT_PATH, "pyro", "_version.py"), "w") as f:
47     f.write(VERSION.format(version))
48 
49 
50 # READ README.md for long description on PyPi.
51 # This requires uploading via twine, e.g.:
52 # $ python setup.py sdist bdist_wheel
53 # $ twine upload --repository-url https://test.pypi.org/legacy/ dist/*  # test version
54 # $ twine upload dist/*
55 try:
56     long_description = open("README.md", encoding="utf-8").read()
57 except Exception as e:
58     sys.stderr.write("Failed to read README.md: {}\n".format(e))
59     sys.stderr.flush()
60     long_description = ""
61 
62 # Remove badges since they will always be obsolete.
63 # This assumes the first 12 lines contain badge info.
64 long_description = "\n".join([str(line) for line in long_description.split("\n")[12:]])
65 
66 # examples/tutorials
67 EXTRAS_REQUIRE = [
68     "jupyter>=1.0.0",
69     "graphviz>=0.8",
70     "matplotlib>=1.3",
71     "torchvision>=0.15.0",
72     "visdom>=0.1.4,<0.2.2",  # FIXME visdom.utils is unavailable >=0.2.2
73     "pandas",
74     "pillow>=8.3.1",  # https://github.com/pytorch/pytorch/issues/61125
75     "scikit-learn",
76     "seaborn>=0.11.0",
77     "wget",
78     "scipy>=1.1",
79     # 'biopython>=1.54',
80     # 'scanpy>=1.4',  # Requires HDF5
81     # 'scvi>=0.6',  # Requires loopy and other fragile packages
82 ]
83 
84 setup(
85     name="pyro-ppl",
86     version=version,
87     description="A Python library for probabilistic modeling and inference",
88     long_description=long_description,
89     long_description_content_type="text/markdown",
90     packages=find_packages(include=["pyro", "pyro.*"]),
91     package_data={
92         "pyro": ["py.typed"],
93         "pyro.distributions": ["*.cpp"],
94     },
95     author="Uber AI Labs",
96     url="http://pyro.ai",
97     project_urls={
98         "Documentation": "https://docs.pyro.ai",
99         "Source": "https://github.com/pyro-ppl/pyro",
100     },
101     install_requires=[
102         # if you add any additional libraries, please also
103         # add them to `docs/requirements.txt`
104         # numpy is necessary for some functionality of PyTorch
105         "numpy>=1.7",
106         "opt_einsum>=2.3.2",
107         "pyro-api>=0.1.1",
108         "torch>=2.0",
109         "tqdm>=4.36",
110     ],
111     extras_require={
112         "extras": EXTRAS_REQUIRE,
113         "test": EXTRAS_REQUIRE
114         + [
115             "black>=21.4b0",
116             "nbval",
117             "pytest-cov",
118             "pytest-xdist",
119             "pytest>=5.0",
120             "ruff",
121         ],
122         "profile": ["prettytable", "pytest-benchmark", "snakeviz"],
123         "dev": EXTRAS_REQUIRE
124         + [
125             "black>=21.4b0",
126             "mypy>=0.812",
127             "nbformat",
128             "nbsphinx>=0.3.2",
129             "nbstripout",
130             "nbval",
131             "ninja",
132             "pypandoc",
133             "pytest-xdist",
134             "pytest>=5.0",
135             "ruff",
136             "sphinx",
137             "sphinx_rtd_theme",
138             "yapf",
139         ],
140         "horovod": ["horovod[pytorch]>=0.19"],
141         "lightning": ["lightning"],
142         "funsor": [
143             "funsor[torch]==0.4.4",
144         ],
145     },
146     python_requires=">=3.8",
147     keywords="machine learning statistics probabilistic programming bayesian modeling pytorch",
148     license="Apache 2.0",
149     classifiers=[
150         "Intended Audience :: Developers",
151         "Intended Audience :: Education",
152         "Intended Audience :: Science/Research",
153         "License :: OSI Approved :: Apache Software License",
154         "Operating System :: POSIX :: Linux",
155         "Operating System :: MacOS :: MacOS X",
156         "Programming Language :: Python :: 3.8",
157         "Programming Language :: Python :: 3.9",
158         "Programming Language :: Python :: 3.10",
159         "Programming Language :: Python :: 3.11",
160     ],
161     # yapf
162 )
163
```
--- 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
@@ -65,7 +65,8 @@
 
 # examples/tutorials
 EXTRAS_REQUIRE = [
-    "jupyter>=1.0.0",
+    "notebook",
+    "ipywidgets",
     "graphviz>=0.8",
     "matplotlib>=1.3",
     "torchvision>=0.15.0",

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -65,7 +65,8 @@\n \n # examples/tutorials\n EXTRAS_REQUIRE = [\n-    \"jupyter>=1.0.0\",\n+    \"notebook\",\n+    \"ipywidgets\",\n     \"graphviz>=0.8\",\n     \"matplotlib>=1.3\",\n     \"torchvision>=0.15.0\",\n", "issue": "Use of the outdated 'jupyter' metapackage\n### Issue Description\r\nYou depend [here](https://github.com/pyro-ppl/pyro/blob/dev/setup.py#L68) on the outdated jupyter package.\r\nIt hasn't been updated since 2015.\r\nThis dependency would be probably correct if the Jupyter project would update this PYPI package.\r\nSee [this discussion](https://discourse.jupyter.org/t/the-jupyter-metapackage-is-outdated-on-pypi/25034).\r\n\r\n\n", "before_files": [{"content": "# Copyright (c) 2017-2019 Uber Technologies, Inc.\n# SPDX-License-Identifier: Apache-2.0\n\nimport os\nimport subprocess\nimport sys\n\nfrom setuptools import find_packages, setup\n\nPROJECT_PATH = os.path.dirname(os.path.abspath(__file__))\nVERSION = \"\"\"\n# This file is auto-generated with the version information during setup.py installation.\n\n__version__ = '{}'\n\"\"\"\n\n# Find pyro version.\nfor line in open(os.path.join(PROJECT_PATH, \"pyro\", \"__init__.py\")):\n    if line.startswith(\"version_prefix = \"):\n        version = line.strip().split()[2][1:-1]\n\n# Append current commit sha to version\ncommit_sha = \"\"\ntry:\n    current_tag = (\n        subprocess.check_output([\"git\", \"tag\", \"--points-at\", \"HEAD\"], cwd=PROJECT_PATH)\n        .decode(\"ascii\")\n        .strip()\n    )\n    # only add sha if HEAD does not point to the release tag\n    if not current_tag == version:\n        commit_sha = (\n            subprocess.check_output(\n                [\"git\", \"rev-parse\", \"--short\", \"HEAD\"], cwd=PROJECT_PATH\n            )\n            .decode(\"ascii\")\n            .strip()\n        )\n# catch all exception to be safe\nexcept Exception:\n    pass  # probably not a git repo\n\n# Write version to _version.py\nif commit_sha:\n    version += \"+{}\".format(commit_sha)\nwith open(os.path.join(PROJECT_PATH, \"pyro\", \"_version.py\"), \"w\") as f:\n    f.write(VERSION.format(version))\n\n\n# READ README.md for long description on PyPi.\n# This requires uploading via twine, e.g.:\n# $ python setup.py sdist bdist_wheel\n# $ twine upload --repository-url https://test.pypi.org/legacy/ dist/*  # test version\n# $ twine upload dist/*\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\".format(e))\n    sys.stderr.flush()\n    long_description = \"\"\n\n# Remove badges since they will always be obsolete.\n# This assumes the first 12 lines contain badge info.\nlong_description = \"\\n\".join([str(line) for line in long_description.split(\"\\n\")[12:]])\n\n# examples/tutorials\nEXTRAS_REQUIRE = [\n    \"jupyter>=1.0.0\",\n    \"graphviz>=0.8\",\n    \"matplotlib>=1.3\",\n    \"torchvision>=0.15.0\",\n    \"visdom>=0.1.4,<0.2.2\",  # FIXME visdom.utils is unavailable >=0.2.2\n    \"pandas\",\n    \"pillow>=8.3.1\",  # https://github.com/pytorch/pytorch/issues/61125\n    \"scikit-learn\",\n    \"seaborn>=0.11.0\",\n    \"wget\",\n    \"scipy>=1.1\",\n    # 'biopython>=1.54',\n    # 'scanpy>=1.4',  # Requires HDF5\n    # 'scvi>=0.6',  # Requires loopy and other fragile packages\n]\n\nsetup(\n    name=\"pyro-ppl\",\n    version=version,\n    description=\"A Python library for probabilistic modeling and inference\",\n    long_description=long_description,\n    long_description_content_type=\"text/markdown\",\n    packages=find_packages(include=[\"pyro\", \"pyro.*\"]),\n    package_data={\n        \"pyro\": [\"py.typed\"],\n        \"pyro.distributions\": [\"*.cpp\"],\n    },\n    author=\"Uber AI Labs\",\n    url=\"http://pyro.ai\",\n    project_urls={\n        \"Documentation\": \"https://docs.pyro.ai\",\n        \"Source\": \"https://github.com/pyro-ppl/pyro\",\n    },\n    install_requires=[\n        # if you add any additional libraries, please also\n        # add them to `docs/requirements.txt`\n        # numpy is necessary for some functionality of PyTorch\n        \"numpy>=1.7\",\n        \"opt_einsum>=2.3.2\",\n        \"pyro-api>=0.1.1\",\n        \"torch>=2.0\",\n        \"tqdm>=4.36\",\n    ],\n    extras_require={\n        \"extras\": EXTRAS_REQUIRE,\n        \"test\": EXTRAS_REQUIRE\n        + [\n            \"black>=21.4b0\",\n            \"nbval\",\n            \"pytest-cov\",\n            \"pytest-xdist\",\n            \"pytest>=5.0\",\n            \"ruff\",\n        ],\n        \"profile\": [\"prettytable\", \"pytest-benchmark\", \"snakeviz\"],\n        \"dev\": EXTRAS_REQUIRE\n        + [\n            \"black>=21.4b0\",\n            \"mypy>=0.812\",\n            \"nbformat\",\n            \"nbsphinx>=0.3.2\",\n            \"nbstripout\",\n            \"nbval\",\n            \"ninja\",\n            \"pypandoc\",\n            \"pytest-xdist\",\n            \"pytest>=5.0\",\n            \"ruff\",\n            \"sphinx\",\n            \"sphinx_rtd_theme\",\n            \"yapf\",\n        ],\n        \"horovod\": [\"horovod[pytorch]>=0.19\"],\n        \"lightning\": [\"lightning\"],\n        \"funsor\": [\n            \"funsor[torch]==0.4.4\",\n        ],\n    },\n    python_requires=\">=3.8\",\n    keywords=\"machine learning statistics probabilistic programming bayesian modeling pytorch\",\n    license=\"Apache 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.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Programming Language :: Python :: 3.11\",\n    ],\n    # yapf\n)\n", "path": "setup.py"}], "after_files": [{"content": "# Copyright (c) 2017-2019 Uber Technologies, Inc.\n# SPDX-License-Identifier: Apache-2.0\n\nimport os\nimport subprocess\nimport sys\n\nfrom setuptools import find_packages, setup\n\nPROJECT_PATH = os.path.dirname(os.path.abspath(__file__))\nVERSION = \"\"\"\n# This file is auto-generated with the version information during setup.py installation.\n\n__version__ = '{}'\n\"\"\"\n\n# Find pyro version.\nfor line in open(os.path.join(PROJECT_PATH, \"pyro\", \"__init__.py\")):\n    if line.startswith(\"version_prefix = \"):\n        version = line.strip().split()[2][1:-1]\n\n# Append current commit sha to version\ncommit_sha = \"\"\ntry:\n    current_tag = (\n        subprocess.check_output([\"git\", \"tag\", \"--points-at\", \"HEAD\"], cwd=PROJECT_PATH)\n        .decode(\"ascii\")\n        .strip()\n    )\n    # only add sha if HEAD does not point to the release tag\n    if not current_tag == version:\n        commit_sha = (\n            subprocess.check_output(\n                [\"git\", \"rev-parse\", \"--short\", \"HEAD\"], cwd=PROJECT_PATH\n            )\n            .decode(\"ascii\")\n            .strip()\n        )\n# catch all exception to be safe\nexcept Exception:\n    pass  # probably not a git repo\n\n# Write version to _version.py\nif commit_sha:\n    version += \"+{}\".format(commit_sha)\nwith open(os.path.join(PROJECT_PATH, \"pyro\", \"_version.py\"), \"w\") as f:\n    f.write(VERSION.format(version))\n\n\n# READ README.md for long description on PyPi.\n# This requires uploading via twine, e.g.:\n# $ python setup.py sdist bdist_wheel\n# $ twine upload --repository-url https://test.pypi.org/legacy/ dist/*  # test version\n# $ twine upload dist/*\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\".format(e))\n    sys.stderr.flush()\n    long_description = \"\"\n\n# Remove badges since they will always be obsolete.\n# This assumes the first 12 lines contain badge info.\nlong_description = \"\\n\".join([str(line) for line in long_description.split(\"\\n\")[12:]])\n\n# examples/tutorials\nEXTRAS_REQUIRE = [\n    \"notebook\",\n    \"ipywidgets\",\n    \"graphviz>=0.8\",\n    \"matplotlib>=1.3\",\n    \"torchvision>=0.15.0\",\n    \"visdom>=0.1.4,<0.2.2\",  # FIXME visdom.utils is unavailable >=0.2.2\n    \"pandas\",\n    \"pillow>=8.3.1\",  # https://github.com/pytorch/pytorch/issues/61125\n    \"scikit-learn\",\n    \"seaborn>=0.11.0\",\n    \"wget\",\n    \"scipy>=1.1\",\n    # 'biopython>=1.54',\n    # 'scanpy>=1.4',  # Requires HDF5\n    # 'scvi>=0.6',  # Requires loopy and other fragile packages\n]\n\nsetup(\n    name=\"pyro-ppl\",\n    version=version,\n    description=\"A Python library for probabilistic modeling and inference\",\n    long_description=long_description,\n    long_description_content_type=\"text/markdown\",\n    packages=find_packages(include=[\"pyro\", \"pyro.*\"]),\n    package_data={\n        \"pyro\": [\"py.typed\"],\n        \"pyro.distributions\": [\"*.cpp\"],\n    },\n    author=\"Uber AI Labs\",\n    url=\"http://pyro.ai\",\n    project_urls={\n        \"Documentation\": \"https://docs.pyro.ai\",\n        \"Source\": \"https://github.com/pyro-ppl/pyro\",\n    },\n    install_requires=[\n        # if you add any additional libraries, please also\n        # add them to `docs/requirements.txt`\n        # numpy is necessary for some functionality of PyTorch\n        \"numpy>=1.7\",\n        \"opt_einsum>=2.3.2\",\n        \"pyro-api>=0.1.1\",\n        \"torch>=2.0\",\n        \"tqdm>=4.36\",\n    ],\n    extras_require={\n        \"extras\": EXTRAS_REQUIRE,\n        \"test\": EXTRAS_REQUIRE\n        + [\n            \"black>=21.4b0\",\n            \"nbval\",\n            \"pytest-cov\",\n            \"pytest-xdist\",\n            \"pytest>=5.0\",\n            \"ruff\",\n        ],\n        \"profile\": [\"prettytable\", \"pytest-benchmark\", \"snakeviz\"],\n        \"dev\": EXTRAS_REQUIRE\n        + [\n            \"black>=21.4b0\",\n            \"mypy>=0.812\",\n            \"nbformat\",\n            \"nbsphinx>=0.3.2\",\n            \"nbstripout\",\n            \"nbval\",\n            \"ninja\",\n            \"pypandoc\",\n            \"pytest-xdist\",\n            \"pytest>=5.0\",\n            \"ruff\",\n            \"sphinx\",\n            \"sphinx_rtd_theme\",\n            \"yapf\",\n        ],\n        \"horovod\": [\"horovod[pytorch]>=0.19\"],\n        \"lightning\": [\"lightning\"],\n        \"funsor\": [\n            \"funsor[torch]==0.4.4\",\n        ],\n    },\n    python_requires=\">=3.8\",\n    keywords=\"machine learning statistics probabilistic programming bayesian modeling pytorch\",\n    license=\"Apache 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.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Programming Language :: Python :: 3.11\",\n    ],\n    # yapf\n)\n", "path": "setup.py"}]}