We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
No `python_requires` defined
### Checklist

- [X] The bug is reproducible against the latest release or `master`.
- [X] There are no similar issues or pull requests to fix it yet.

### Describe the bug

It seems that no `python_requires` is defined for the `uvicorn` package, which in turn results in the latest version being installed in a Python 3.6 (CI) environment (that subsequently fails).

If `python_requires` were defined to restrict the package to supported versions of the interpreter, I would have got an older version (that supported `py36`) instead.

### Steps to reproduce the bug

In a `py36` environment
```
pip install uvicorn
# Run uvicorn
# ...
```

### Expected behavior

An older version is installed that works.

### Actual behavior

`uvicorn` errors out, says `py36` is unsupported.

### Debugging material

_No response_

### Environment

CPython 3.6

### Additional context

_No response_

--- 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 # -*- coding: utf-8 -*-
3 
4 import os
5 import re
6 
7 from setuptools import setup
8 
9 
10 def get_version(package):
11     """
12     Return package version as listed in `__version__` in `init.py`.
13     """
14     path = os.path.join(package, "__init__.py")
15     init_py = open(path, "r", encoding="utf8").read()
16     return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
17 
18 
19 def get_long_description():
20     """
21     Return the README.
22     """
23     return open("README.md", "r", encoding="utf8").read()
24 
25 
26 def get_packages(package):
27     """
28     Return root package and all sub-packages.
29     """
30     return [
31         dirpath
32         for dirpath, dirnames, filenames in os.walk(package)
33         if os.path.exists(os.path.join(dirpath, "__init__.py"))
34     ]
35 
36 
37 env_marker_cpython = (
38     "sys_platform != 'win32'"
39     " and (sys_platform != 'cygwin'"
40     " and platform_python_implementation != 'PyPy')"
41 )
42 
43 env_marker_win = "sys_platform == 'win32'"
44 env_marker_below_38 = "python_version < '3.8'"
45 
46 minimal_requirements = [
47     "asgiref>=3.4.0",
48     "click>=7.0",
49     "h11>=0.8",
50     "typing-extensions;" + env_marker_below_38,
51 ]
52 
53 
54 extra_requirements = [
55     "websockets>=10.0",
56     "httptools>=0.2.0,<0.4.0",
57     "uvloop>=0.14.0,!=0.15.0,!=0.15.1; " + env_marker_cpython,
58     "colorama>=0.4;" + env_marker_win,
59     "watchgod>=0.6",
60     "python-dotenv>=0.13",
61     "PyYAML>=5.1",
62 ]
63 
64 
65 setup(
66     name="uvicorn",
67     version=get_version("uvicorn"),
68     url="https://www.uvicorn.org/",
69     license="BSD",
70     description="The lightning-fast ASGI server.",
71     long_description=get_long_description(),
72     long_description_content_type="text/markdown",
73     author="Tom Christie",
74     author_email="tom@tomchristie.com",
75     packages=get_packages("uvicorn"),
76     install_requires=minimal_requirements,
77     extras_require={"standard": extra_requirements},
78     include_package_data=True,
79     classifiers=[
80         "Development Status :: 4 - Beta",
81         "Environment :: Web Environment",
82         "Intended Audience :: Developers",
83         "License :: OSI Approved :: BSD License",
84         "Operating System :: OS Independent",
85         "Topic :: Internet :: WWW/HTTP",
86         "Programming Language :: Python :: 3",
87         "Programming Language :: Python :: 3.7",
88         "Programming Language :: Python :: 3.8",
89         "Programming Language :: Python :: 3.9",
90         "Programming Language :: Python :: 3.10",
91         "Programming Language :: Python :: Implementation :: CPython",
92         "Programming Language :: Python :: Implementation :: PyPy",
93     ],
94     entry_points="""
95     [console_scripts]
96     uvicorn=uvicorn.main:main
97     """,
98     project_urls={
99         "Funding": "https://github.com/sponsors/encode",
100         "Source": "https://github.com/encode/uvicorn",
101         "Changelog": "https://github.com/encode/uvicorn/blob/master/CHANGELOG.md",
102     },
103 )
104
```
--- 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
@@ -73,6 +73,7 @@
     author="Tom Christie",
     author_email="tom@tomchristie.com",
     packages=get_packages("uvicorn"),
+    python_requires=">=3.7",
     install_requires=minimal_requirements,
     extras_require={"standard": extra_requirements},
     include_package_data=True,

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -73,6 +73,7 @@\n     author=\"Tom Christie\",\n     author_email=\"tom@tomchristie.com\",\n     packages=get_packages(\"uvicorn\"),\n+    python_requires=\">=3.7\",\n     install_requires=minimal_requirements,\n     extras_require={\"standard\": extra_requirements},\n     include_package_data=True,\n", "issue": "No `python_requires` defined\n### Checklist\r\n\r\n- [X] The bug is reproducible against the latest release or `master`.\r\n- [X] There are no similar issues or pull requests to fix it yet.\r\n\r\n### Describe the bug\r\n\r\nIt seems that no `python_requires` is defined for the `uvicorn` package, which in turn results in the latest version being installed in a Python 3.6 (CI) environment (that subsequently fails).\r\n\r\nIf `python_requires` were defined to restrict the package to supported versions of the interpreter, I would have got an older version (that supported `py36`) instead.\r\n\r\n### Steps to reproduce the bug\r\n\r\nIn a `py36` environment\r\n```\r\npip install uvicorn\r\n# Run uvicorn\r\n# ...\r\n```\r\n\r\n### Expected behavior\r\n\r\nAn older version is installed that works.\r\n\r\n### Actual behavior\r\n\r\n`uvicorn` errors out, says `py36` is unsupported.\r\n\r\n### Debugging material\r\n\r\n_No response_\r\n\r\n### Environment\r\n\r\nCPython 3.6\r\n\r\n### Additional context\r\n\r\n_No response_\n", "before_files": [{"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport re\n\nfrom setuptools import setup\n\n\ndef get_version(package):\n    \"\"\"\n    Return package version as listed in `__version__` in `init.py`.\n    \"\"\"\n    path = os.path.join(package, \"__init__.py\")\n    init_py = open(path, \"r\", encoding=\"utf8\").read()\n    return re.search(\"__version__ = ['\\\"]([^'\\\"]+)['\\\"]\", init_py).group(1)\n\n\ndef get_long_description():\n    \"\"\"\n    Return the README.\n    \"\"\"\n    return open(\"README.md\", \"r\", encoding=\"utf8\").read()\n\n\ndef get_packages(package):\n    \"\"\"\n    Return root package and all sub-packages.\n    \"\"\"\n    return [\n        dirpath\n        for dirpath, dirnames, filenames in os.walk(package)\n        if os.path.exists(os.path.join(dirpath, \"__init__.py\"))\n    ]\n\n\nenv_marker_cpython = (\n    \"sys_platform != 'win32'\"\n    \" and (sys_platform != 'cygwin'\"\n    \" and platform_python_implementation != 'PyPy')\"\n)\n\nenv_marker_win = \"sys_platform == 'win32'\"\nenv_marker_below_38 = \"python_version < '3.8'\"\n\nminimal_requirements = [\n    \"asgiref>=3.4.0\",\n    \"click>=7.0\",\n    \"h11>=0.8\",\n    \"typing-extensions;\" + env_marker_below_38,\n]\n\n\nextra_requirements = [\n    \"websockets>=10.0\",\n    \"httptools>=0.2.0,<0.4.0\",\n    \"uvloop>=0.14.0,!=0.15.0,!=0.15.1; \" + env_marker_cpython,\n    \"colorama>=0.4;\" + env_marker_win,\n    \"watchgod>=0.6\",\n    \"python-dotenv>=0.13\",\n    \"PyYAML>=5.1\",\n]\n\n\nsetup(\n    name=\"uvicorn\",\n    version=get_version(\"uvicorn\"),\n    url=\"https://www.uvicorn.org/\",\n    license=\"BSD\",\n    description=\"The lightning-fast ASGI server.\",\n    long_description=get_long_description(),\n    long_description_content_type=\"text/markdown\",\n    author=\"Tom Christie\",\n    author_email=\"tom@tomchristie.com\",\n    packages=get_packages(\"uvicorn\"),\n    install_requires=minimal_requirements,\n    extras_require={\"standard\": extra_requirements},\n    include_package_data=True,\n    classifiers=[\n        \"Development Status :: 4 - Beta\",\n        \"Environment :: Web Environment\",\n        \"Intended Audience :: Developers\",\n        \"License :: OSI Approved :: BSD License\",\n        \"Operating System :: OS Independent\",\n        \"Topic :: Internet :: WWW/HTTP\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Programming Language :: Python :: Implementation :: CPython\",\n        \"Programming Language :: Python :: Implementation :: PyPy\",\n    ],\n    entry_points=\"\"\"\n    [console_scripts]\n    uvicorn=uvicorn.main:main\n    \"\"\",\n    project_urls={\n        \"Funding\": \"https://github.com/sponsors/encode\",\n        \"Source\": \"https://github.com/encode/uvicorn\",\n        \"Changelog\": \"https://github.com/encode/uvicorn/blob/master/CHANGELOG.md\",\n    },\n)\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport re\n\nfrom setuptools import setup\n\n\ndef get_version(package):\n    \"\"\"\n    Return package version as listed in `__version__` in `init.py`.\n    \"\"\"\n    path = os.path.join(package, \"__init__.py\")\n    init_py = open(path, \"r\", encoding=\"utf8\").read()\n    return re.search(\"__version__ = ['\\\"]([^'\\\"]+)['\\\"]\", init_py).group(1)\n\n\ndef get_long_description():\n    \"\"\"\n    Return the README.\n    \"\"\"\n    return open(\"README.md\", \"r\", encoding=\"utf8\").read()\n\n\ndef get_packages(package):\n    \"\"\"\n    Return root package and all sub-packages.\n    \"\"\"\n    return [\n        dirpath\n        for dirpath, dirnames, filenames in os.walk(package)\n        if os.path.exists(os.path.join(dirpath, \"__init__.py\"))\n    ]\n\n\nenv_marker_cpython = (\n    \"sys_platform != 'win32'\"\n    \" and (sys_platform != 'cygwin'\"\n    \" and platform_python_implementation != 'PyPy')\"\n)\n\nenv_marker_win = \"sys_platform == 'win32'\"\nenv_marker_below_38 = \"python_version < '3.8'\"\n\nminimal_requirements = [\n    \"asgiref>=3.4.0\",\n    \"click>=7.0\",\n    \"h11>=0.8\",\n    \"typing-extensions;\" + env_marker_below_38,\n]\n\n\nextra_requirements = [\n    \"websockets>=10.0\",\n    \"httptools>=0.2.0,<0.4.0\",\n    \"uvloop>=0.14.0,!=0.15.0,!=0.15.1; \" + env_marker_cpython,\n    \"colorama>=0.4;\" + env_marker_win,\n    \"watchgod>=0.6\",\n    \"python-dotenv>=0.13\",\n    \"PyYAML>=5.1\",\n]\n\n\nsetup(\n    name=\"uvicorn\",\n    version=get_version(\"uvicorn\"),\n    url=\"https://www.uvicorn.org/\",\n    license=\"BSD\",\n    description=\"The lightning-fast ASGI server.\",\n    long_description=get_long_description(),\n    long_description_content_type=\"text/markdown\",\n    author=\"Tom Christie\",\n    author_email=\"tom@tomchristie.com\",\n    packages=get_packages(\"uvicorn\"),\n    python_requires=\">=3.7\",\n    install_requires=minimal_requirements,\n    extras_require={\"standard\": extra_requirements},\n    include_package_data=True,\n    classifiers=[\n        \"Development Status :: 4 - Beta\",\n        \"Environment :: Web Environment\",\n        \"Intended Audience :: Developers\",\n        \"License :: OSI Approved :: BSD License\",\n        \"Operating System :: OS Independent\",\n        \"Topic :: Internet :: WWW/HTTP\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Programming Language :: Python :: Implementation :: CPython\",\n        \"Programming Language :: Python :: Implementation :: PyPy\",\n    ],\n    entry_points=\"\"\"\n    [console_scripts]\n    uvicorn=uvicorn.main:main\n    \"\"\",\n    project_urls={\n        \"Funding\": \"https://github.com/sponsors/encode\",\n        \"Source\": \"https://github.com/encode/uvicorn\",\n        \"Changelog\": \"https://github.com/encode/uvicorn/blob/master/CHANGELOG.md\",\n    },\n)\n", "path": "setup.py"}]}