We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Specify python version for pip
Can the python version be specified for pip in the setup.py?  Specifically using the method here:
- https://stackoverflow.com/questions/45778790/specifying-the-minimum-python-version-required-for-a-module-in-pip

i.e. `python_requires` so that it's picked up by pip

Currently, the update of this to drop 3.9 support broke a build of mine on a python 3.8 image.  I can get around this by pegging it to 0.12.1, but if python_requires is added, I believe pip will do this dependency resolution automatically.

--- 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 _jax_version_constraints = ">=0.4.14"
13 _jaxlib_version_constraints = ">=0.4.14"
14 
15 # Find version
16 for line in open(os.path.join(PROJECT_PATH, "numpyro", "version.py")):
17     if line.startswith("__version__ = "):
18         version = line.strip().split()[2][1:-1]
19 
20 # READ README.md for long description on PyPi.
21 try:
22     long_description = open("README.md", encoding="utf-8").read()
23 except Exception as e:
24     sys.stderr.write("Failed to read README.md:\n  {}\n".format(e))
25     sys.stderr.flush()
26     long_description = ""
27 
28 setup(
29     name="numpyro",
30     version=version,
31     description="Pyro PPL on NumPy",
32     packages=find_packages(include=["numpyro", "numpyro.*"]),
33     url="https://github.com/pyro-ppl/numpyro",
34     author="Uber AI Labs",
35     install_requires=[
36         f"jax{_jax_version_constraints}",
37         f"jaxlib{_jaxlib_version_constraints}",
38         "multipledispatch",
39         "numpy",
40         "tqdm",
41     ],
42     extras_require={
43         "doc": [
44             "ipython",  # sphinx needs this to render codes
45             "nbsphinx>=0.8.5",
46             "readthedocs-sphinx-search==0.1.0",
47             "sphinx",
48             "sphinx_rtd_theme",
49             "sphinx-gallery",
50         ],
51         "test": [
52             "importlib-metadata<5.0",
53             "black[jupyter]>=21.8b0",
54             "flake8",
55             "importlib-metadata<5.0",
56             "isort>=5.0",
57             "pytest>=4.1",
58             "pyro-api>=0.1.1",
59             "scipy>=1.9",
60         ],
61         "dev": [
62             "dm-haiku",
63             "flax",
64             "funsor>=0.4.1",
65             "graphviz",
66             "jaxns>=2.0.1",
67             "matplotlib",
68             "optax>=0.0.6",
69             "pylab-sdk",  # jaxns dependency
70             "pyyaml",  # flax dependency
71             "requests",  # pylab dependency
72             "tensorflow_probability>=0.18.0",
73         ],
74         "examples": [
75             "arviz",
76             "jupyter",
77             "matplotlib",
78             "pandas",
79             "seaborn",
80             "scikit-learn",
81             "wordcloud",
82         ],
83         "cpu": f"jax[cpu]{_jax_version_constraints}",
84         # TPU and CUDA installations, currently require to add package repository URL, i.e.,
85         # pip install numpyro[cuda] -f https://storage.googleapis.com/jax-releases/jax_releases.html
86         "tpu": f"jax[tpu]{_jax_version_constraints}",
87         "cuda": f"jax[cuda]{_jax_version_constraints}",
88     },
89     long_description=long_description,
90     long_description_content_type="text/markdown",
91     keywords="probabilistic machine learning bayesian statistics",
92     license="Apache License 2.0",
93     classifiers=[
94         "Intended Audience :: Developers",
95         "Intended Audience :: Education",
96         "Intended Audience :: Science/Research",
97         "License :: OSI Approved :: Apache Software License",
98         "Operating System :: POSIX :: Linux",
99         "Operating System :: MacOS :: MacOS X",
100         "Programming Language :: Python :: 3.9",
101         "Programming Language :: Python :: 3.10",
102         "Programming Language :: Python :: 3.11",
103     ],
104 )
105
```
--- 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
@@ -86,6 +86,7 @@
         "tpu": f"jax[tpu]{_jax_version_constraints}",
         "cuda": f"jax[cuda]{_jax_version_constraints}",
     },
+    python_requires=">=3.9",
     long_description=long_description,
     long_description_content_type="text/markdown",
     keywords="probabilistic machine learning bayesian statistics",

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -86,6 +86,7 @@\n         \"tpu\": f\"jax[tpu]{_jax_version_constraints}\",\n         \"cuda\": f\"jax[cuda]{_jax_version_constraints}\",\n     },\n+    python_requires=\">=3.9\",\n     long_description=long_description,\n     long_description_content_type=\"text/markdown\",\n     keywords=\"probabilistic machine learning bayesian statistics\",\n", "issue": "Specify python version for pip\nCan the python version be specified for pip in the setup.py?  Specifically using the method here:\r\n- https://stackoverflow.com/questions/45778790/specifying-the-minimum-python-version-required-for-a-module-in-pip\r\n\r\ni.e. `python_requires` so that it's picked up by pip\r\n\r\nCurrently, the update of this to drop 3.9 support broke a build of mine on a python 3.8 image.  I can get around this by pegging it to 0.12.1, but if python_requires is added, I believe pip will do this dependency resolution automatically.\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_jax_version_constraints = \">=0.4.14\"\n_jaxlib_version_constraints = \">=0.4.14\"\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\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        f\"jax{_jax_version_constraints}\",\n        f\"jaxlib{_jaxlib_version_constraints}\",\n        \"multipledispatch\",\n        \"numpy\",\n        \"tqdm\",\n    ],\n    extras_require={\n        \"doc\": [\n            \"ipython\",  # sphinx needs this to render codes\n            \"nbsphinx>=0.8.5\",\n            \"readthedocs-sphinx-search==0.1.0\",\n            \"sphinx\",\n            \"sphinx_rtd_theme\",\n            \"sphinx-gallery\",\n        ],\n        \"test\": [\n            \"importlib-metadata<5.0\",\n            \"black[jupyter]>=21.8b0\",\n            \"flake8\",\n            \"importlib-metadata<5.0\",\n            \"isort>=5.0\",\n            \"pytest>=4.1\",\n            \"pyro-api>=0.1.1\",\n            \"scipy>=1.9\",\n        ],\n        \"dev\": [\n            \"dm-haiku\",\n            \"flax\",\n            \"funsor>=0.4.1\",\n            \"graphviz\",\n            \"jaxns>=2.0.1\",\n            \"matplotlib\",\n            \"optax>=0.0.6\",\n            \"pylab-sdk\",  # jaxns dependency\n            \"pyyaml\",  # flax dependency\n            \"requests\",  # pylab dependency\n            \"tensorflow_probability>=0.18.0\",\n        ],\n        \"examples\": [\n            \"arviz\",\n            \"jupyter\",\n            \"matplotlib\",\n            \"pandas\",\n            \"seaborn\",\n            \"scikit-learn\",\n            \"wordcloud\",\n        ],\n        \"cpu\": f\"jax[cpu]{_jax_version_constraints}\",\n        # TPU and CUDA installations, currently require to add package repository URL, i.e.,\n        # pip install numpyro[cuda] -f https://storage.googleapis.com/jax-releases/jax_releases.html\n        \"tpu\": f\"jax[tpu]{_jax_version_constraints}\",\n        \"cuda\": f\"jax[cuda]{_jax_version_constraints}\",\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.9\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Programming Language :: Python :: 3.11\",\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_jax_version_constraints = \">=0.4.14\"\n_jaxlib_version_constraints = \">=0.4.14\"\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\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        f\"jax{_jax_version_constraints}\",\n        f\"jaxlib{_jaxlib_version_constraints}\",\n        \"multipledispatch\",\n        \"numpy\",\n        \"tqdm\",\n    ],\n    extras_require={\n        \"doc\": [\n            \"ipython\",  # sphinx needs this to render codes\n            \"nbsphinx>=0.8.5\",\n            \"readthedocs-sphinx-search==0.1.0\",\n            \"sphinx\",\n            \"sphinx_rtd_theme\",\n            \"sphinx-gallery\",\n        ],\n        \"test\": [\n            \"importlib-metadata<5.0\",\n            \"black[jupyter]>=21.8b0\",\n            \"flake8\",\n            \"importlib-metadata<5.0\",\n            \"isort>=5.0\",\n            \"pytest>=4.1\",\n            \"pyro-api>=0.1.1\",\n            \"scipy>=1.9\",\n        ],\n        \"dev\": [\n            \"dm-haiku\",\n            \"flax\",\n            \"funsor>=0.4.1\",\n            \"graphviz\",\n            \"jaxns>=2.0.1\",\n            \"matplotlib\",\n            \"optax>=0.0.6\",\n            \"pylab-sdk\",  # jaxns dependency\n            \"pyyaml\",  # flax dependency\n            \"requests\",  # pylab dependency\n            \"tensorflow_probability>=0.18.0\",\n        ],\n        \"examples\": [\n            \"arviz\",\n            \"jupyter\",\n            \"matplotlib\",\n            \"pandas\",\n            \"seaborn\",\n            \"scikit-learn\",\n            \"wordcloud\",\n        ],\n        \"cpu\": f\"jax[cpu]{_jax_version_constraints}\",\n        # TPU and CUDA installations, currently require to add package repository URL, i.e.,\n        # pip install numpyro[cuda] -f https://storage.googleapis.com/jax-releases/jax_releases.html\n        \"tpu\": f\"jax[tpu]{_jax_version_constraints}\",\n        \"cuda\": f\"jax[cuda]{_jax_version_constraints}\",\n    },\n    python_requires=\">=3.9\",\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.9\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Programming Language :: Python :: 3.11\",\n    ],\n)\n", "path": "setup.py"}]}