prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Update h2 pin?
  ### Discussed in https://github.com/encode/httpx/discussions/1485
  
  <div type='discussions-op-text'>
  
  <sup>Originally posted by **HarrySky** February 24, 2021</sup>
  Hi, some time ago `h2` pin was updated in `httpcore`: https://github.com/encode/httpcore/pull/208
  
  But it is still pinned to `3.*` in this package's `http2` extra:
  https://github.com/encode/httpx/blob/0f280af8b170ed5cc48c12a894f71a8b5762f748/setup.py#L65
  
  This is not an issue, as I can just add `h2>=3,<5` to my setup.py instead of using `httpx[http2]`, but maybe you want dependencies to be in sync with `httpcore`.
  
  EDIT: Using git blame we can see that before `http2` extra - `httpcore[http2]` was used instead of `h2` dependency directly.</div>
  
  </issue>
  <code>
  [start of setup.py]
  1 #!/usr/bin/env python
  2 # -*- coding: utf-8 -*-
  3 
  4 import re
  5 from pathlib import Path
  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     version = Path(package, "__version__.py").read_text()
  15     return re.search("__version__ = ['\"]([^'\"]+)['\"]", version).group(1)
  16 
  17 
  18 def get_long_description():
  19     """
  20     Return the README.
  21     """
  22     long_description = ""
  23     with open("README.md", encoding="utf8") as f:
  24         long_description += f.read()
  25     long_description += "\n\n"
  26     with open("CHANGELOG.md", encoding="utf8") as f:
  27         long_description += f.read()
  28     return long_description
  29 
  30 
  31 def get_packages(package):
  32     """
  33     Return root package and all sub-packages.
  34     """
  35     return [str(path.parent) for path in Path(package).glob("**/__init__.py")]
  36 
  37 
  38 setup(
  39     name="httpx",
  40     python_requires=">=3.6",
  41     version=get_version("httpx"),
  42     url="https://github.com/encode/httpx",
  43     project_urls={
  44         "Changelog": "https://github.com/encode/httpx/blob/master/CHANGELOG.md",
  45         "Documentation": "https://www.python-httpx.org",
  46         "Source": "https://github.com/encode/httpx",
  47     },
  48     license="BSD",
  49     description="The next generation HTTP client.",
  50     long_description=get_long_description(),
  51     long_description_content_type="text/markdown",
  52     author="Tom Christie",
  53     author_email="tom@tomchristie.com",
  54     package_data={"httpx": ["py.typed"]},
  55     packages=get_packages("httpx"),
  56     include_package_data=True,
  57     zip_safe=False,
  58     install_requires=[
  59         "certifi",
  60         "sniffio",
  61         "rfc3986[idna2008]>=1.3,<2",
  62         "httpcore>=0.13.3,<0.14.0",
  63         "async_generator; python_version < '3.7'"
  64     ],
  65     extras_require={
  66         "http2": "h2==3.*",
  67         "brotli": "brotlicffi==1.*",
  68     },
  69     classifiers=[
  70         "Development Status :: 4 - Beta",
  71         "Environment :: Web Environment",
  72         "Intended Audience :: Developers",
  73         "License :: OSI Approved :: BSD License",
  74         "Operating System :: OS Independent",
  75         "Topic :: Internet :: WWW/HTTP",
  76         "Framework :: AsyncIO",
  77         "Framework :: Trio",
  78         "Programming Language :: Python :: 3",
  79         "Programming Language :: Python :: 3.6",
  80         "Programming Language :: Python :: 3.7",
  81         "Programming Language :: Python :: 3.8",
  82         "Programming Language :: Python :: 3.9",
  83         "Programming Language :: Python :: 3.10",
  84         "Programming Language :: Python :: 3 :: Only",
  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
  @@ -63,7 +63,7 @@
           "async_generator; python_version < '3.7'"
       ],
       extras_require={
  -        "http2": "h2==3.*",
  +        "http2": "h2>=3,<5",
           "brotli": "brotlicffi==1.*",
       },
       classifiers=[
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -63,7 +63,7 @@\n         \"async_generator; python_version < '3.7'\"\n     ],\n     extras_require={\n-        \"http2\": \"h2==3.*\",\n+        \"http2\": \"h2>=3,<5\",\n         \"brotli\": \"brotlicffi==1.*\",\n     },\n     classifiers=[\n", "issue": "Update h2 pin?\n### Discussed in https://github.com/encode/httpx/discussions/1485\r\n\r\n<div type='discussions-op-text'>\r\n\r\n<sup>Originally posted by **HarrySky** February 24, 2021</sup>\r\nHi, some time ago `h2` pin was updated in `httpcore`: https://github.com/encode/httpcore/pull/208\r\n\r\nBut it is still pinned to `3.*` in this package's `http2` extra:\r\nhttps://github.com/encode/httpx/blob/0f280af8b170ed5cc48c12a894f71a8b5762f748/setup.py#L65\r\n\r\nThis is not an issue, as I can just add `h2>=3,<5` to my setup.py instead of using `httpx[http2]`, but maybe you want dependencies to be in sync with `httpcore`.\r\n\r\nEDIT: Using git blame we can see that before `http2` extra - `httpcore[http2]` was used instead of `h2` dependency directly.</div>\n", "before_files": [{"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport re\nfrom pathlib import Path\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    version = Path(package, \"__version__.py\").read_text()\n    return re.search(\"__version__ = ['\\\"]([^'\\\"]+)['\\\"]\", version).group(1)\n\n\ndef get_long_description():\n    \"\"\"\n    Return the README.\n    \"\"\"\n    long_description = \"\"\n    with open(\"README.md\", encoding=\"utf8\") as f:\n        long_description += f.read()\n    long_description += \"\\n\\n\"\n    with open(\"CHANGELOG.md\", encoding=\"utf8\") as f:\n        long_description += f.read()\n    return long_description\n\n\ndef get_packages(package):\n    \"\"\"\n    Return root package and all sub-packages.\n    \"\"\"\n    return [str(path.parent) for path in Path(package).glob(\"**/__init__.py\")]\n\n\nsetup(\n    name=\"httpx\",\n    python_requires=\">=3.6\",\n    version=get_version(\"httpx\"),\n    url=\"https://github.com/encode/httpx\",\n    project_urls={\n        \"Changelog\": \"https://github.com/encode/httpx/blob/master/CHANGELOG.md\",\n        \"Documentation\": \"https://www.python-httpx.org\",\n        \"Source\": \"https://github.com/encode/httpx\",\n    },\n    license=\"BSD\",\n    description=\"The next generation HTTP client.\",\n    long_description=get_long_description(),\n    long_description_content_type=\"text/markdown\",\n    author=\"Tom Christie\",\n    author_email=\"tom@tomchristie.com\",\n    package_data={\"httpx\": [\"py.typed\"]},\n    packages=get_packages(\"httpx\"),\n    include_package_data=True,\n    zip_safe=False,\n    install_requires=[\n        \"certifi\",\n        \"sniffio\",\n        \"rfc3986[idna2008]>=1.3,<2\",\n        \"httpcore>=0.13.3,<0.14.0\",\n        \"async_generator; python_version < '3.7'\"\n    ],\n    extras_require={\n        \"http2\": \"h2==3.*\",\n        \"brotli\": \"brotlicffi==1.*\",\n    },\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        \"Framework :: AsyncIO\",\n        \"Framework :: Trio\",\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 :: 3.9\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Programming Language :: Python :: 3 :: Only\",\n    ],\n)\n", "path": "setup.py"}]}