prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  color codes in windows console not escaped
  Fixes https://github.com/tiangolo/fastapi/issues/815 that should have been reported upstream
  
  There are many ways to handle the case obviously, I choose to use click.clear() since we use already click.style and because it already performs the os check and issues the right command for that.
  
  
  Use optional package installs.
  Instead of the platform detection I’d like uvicorn to use optional installs.
  
  * `pip install uvicorn` - Just the package itself.
  * `pip install uvicorn[standard]` - uvloop/httptools/websockets
  * `pip install uvicorn[pure]` - asyncio/h11/wsproto
  * `pip install uvicorn[full]` - Everything
  
  </issue>
  <code>
  [start of setup.py]
  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 = (
  38     "sys_platform != 'win32'"
  39     " and sys_platform != 'cygwin'"
  40     " and platform_python_implementation != 'PyPy'"
  41 )
  42 
  43 requirements = [
  44     "click==7.*",
  45     "h11>=0.8,<0.10",
  46     "websockets==8.*",
  47     "httptools==0.1.* ;" + env_marker,
  48     "uvloop>=0.14.0 ;" + env_marker,
  49 ]
  50 
  51 extras_require = {"watchgodreload": ["watchgod>=0.6,<0.7"]}
  52 
  53 
  54 setup(
  55     name="uvicorn",
  56     version=get_version("uvicorn"),
  57     url="https://github.com/encode/uvicorn",
  58     license="BSD",
  59     description="The lightning-fast ASGI server.",
  60     long_description=get_long_description(),
  61     long_description_content_type="text/markdown",
  62     author="Tom Christie",
  63     author_email="tom@tomchristie.com",
  64     packages=get_packages("uvicorn"),
  65     install_requires=requirements,
  66     extras_require=extras_require,
  67     include_package_data=True,
  68     classifiers=[
  69         "Development Status :: 4 - Beta",
  70         "Environment :: Web Environment",
  71         "Intended Audience :: Developers",
  72         "License :: OSI Approved :: BSD License",
  73         "Operating System :: OS Independent",
  74         "Topic :: Internet :: WWW/HTTP",
  75         "Programming Language :: Python :: 3",
  76         "Programming Language :: Python :: 3.6",
  77         "Programming Language :: Python :: 3.7",
  78         "Programming Language :: Python :: 3.8",
  79         "Programming Language :: Python :: Implementation :: CPython",
  80         "Programming Language :: Python :: Implementation :: PyPy",
  81     ],
  82     entry_points="""
  83     [console_scripts]
  84     uvicorn=uvicorn.main:main
  85     """,
  86 )
  87
  [end of setup.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -34,21 +34,28 @@
       ]
   
   
  -env_marker = (
  +env_marker_cpython = (
       "sys_platform != 'win32'"
       " and sys_platform != 'cygwin'"
       " and platform_python_implementation != 'PyPy'"
   )
   
  -requirements = [
  +env_marker_win = "sys_platform == 'win32'"
  +
  +
  +minimal_requirements = [
       "click==7.*",
       "h11>=0.8,<0.10",
  -    "websockets==8.*",
  -    "httptools==0.1.* ;" + env_marker,
  -    "uvloop>=0.14.0 ;" + env_marker,
   ]
   
  -extras_require = {"watchgodreload": ["watchgod>=0.6,<0.7"]}
  +extra_requirements = [
  +    "websockets==8.*",
  +    "httptools==0.1.* ;" + env_marker_cpython,
  +    "uvloop>=0.14.0 ;" + env_marker_cpython,
  +    "colorama>=0.4.*;" + env_marker_win,
  +    "watchgod>=0.6,<0.7",
  +    "python-dotenv==0.13.*",
  +]
   
   
   setup(
  @@ -62,8 +69,8 @@
       author="Tom Christie",
       author_email="tom@tomchristie.com",
       packages=get_packages("uvicorn"),
  -    install_requires=requirements,
  -    extras_require=extras_require,
  +    install_requires=minimal_requirements,
  +    extras_require={"standard": extra_requirements},
       include_package_data=True,
       classifiers=[
           "Development Status :: 4 - Beta",
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -34,21 +34,28 @@\n     ]\n \n \n-env_marker = (\n+env_marker_cpython = (\n     \"sys_platform != 'win32'\"\n     \" and sys_platform != 'cygwin'\"\n     \" and platform_python_implementation != 'PyPy'\"\n )\n \n-requirements = [\n+env_marker_win = \"sys_platform == 'win32'\"\n+\n+\n+minimal_requirements = [\n     \"click==7.*\",\n     \"h11>=0.8,<0.10\",\n-    \"websockets==8.*\",\n-    \"httptools==0.1.* ;\" + env_marker,\n-    \"uvloop>=0.14.0 ;\" + env_marker,\n ]\n \n-extras_require = {\"watchgodreload\": [\"watchgod>=0.6,<0.7\"]}\n+extra_requirements = [\n+    \"websockets==8.*\",\n+    \"httptools==0.1.* ;\" + env_marker_cpython,\n+    \"uvloop>=0.14.0 ;\" + env_marker_cpython,\n+    \"colorama>=0.4.*;\" + env_marker_win,\n+    \"watchgod>=0.6,<0.7\",\n+    \"python-dotenv==0.13.*\",\n+]\n \n \n setup(\n@@ -62,8 +69,8 @@\n     author=\"Tom Christie\",\n     author_email=\"tom@tomchristie.com\",\n     packages=get_packages(\"uvicorn\"),\n-    install_requires=requirements,\n-    extras_require=extras_require,\n+    install_requires=minimal_requirements,\n+    extras_require={\"standard\": extra_requirements},\n     include_package_data=True,\n     classifiers=[\n         \"Development Status :: 4 - Beta\",\n", "issue": "color codes in windows console not escaped\nFixes https://github.com/tiangolo/fastapi/issues/815 that should have been reported upstream\r\n\r\nThere are many ways to handle the case obviously, I choose to use click.clear() since we use already click.style and because it already performs the os check and issues the right command for that.\r\n\r\n\nUse optional package installs.\nInstead of the platform detection I\u2019d like uvicorn to use optional installs.\r\n\r\n* `pip install uvicorn` - Just the package itself.\r\n* `pip install uvicorn[standard]` - uvloop/httptools/websockets\r\n* `pip install uvicorn[pure]` - asyncio/h11/wsproto\r\n* `pip install uvicorn[full]` - Everything\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 = (\n    \"sys_platform != 'win32'\"\n    \" and sys_platform != 'cygwin'\"\n    \" and platform_python_implementation != 'PyPy'\"\n)\n\nrequirements = [\n    \"click==7.*\",\n    \"h11>=0.8,<0.10\",\n    \"websockets==8.*\",\n    \"httptools==0.1.* ;\" + env_marker,\n    \"uvloop>=0.14.0 ;\" + env_marker,\n]\n\nextras_require = {\"watchgodreload\": [\"watchgod>=0.6,<0.7\"]}\n\n\nsetup(\n    name=\"uvicorn\",\n    version=get_version(\"uvicorn\"),\n    url=\"https://github.com/encode/uvicorn\",\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=requirements,\n    extras_require=extras_require,\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.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\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)\n", "path": "setup.py"}]}