prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  AttributeError: module 'rfc3986.api' has no attribute 'iri_reference'
  Just did a pip install of httpx, and it appeared to meet all the pre-reqs. However, I'd encounter the error in the title.
  
  
  (python37) $ pip install httpx
  Collecting httpx
    Using cached https://files.pythonhosted.org/packages/15/fb/81861a0dbe87a0de57491b1b587419845f9a99e5b3d48e56cd440b1fcb68/httpx-0.7.6-py2.py3-none-any.whl
  Requirement already satisfied: certifi in .../envs/python37/lib/python3.7/site-packages (from httpx) (2019.6.16)
  Requirement already satisfied: h2==3.* in .../envs/python37/lib/python3.7/site-packages (from httpx) (3.1.0)
  Requirement already satisfied: chardet==3.* in .../envs/python37/lib/python3.7/site-packages (from httpx) (3.0.4)
  Requirement already satisfied: h11==0.8.* in .../envs/python37/lib/python3.7/site-packages (from httpx) (0.8.1)
  Requirement already satisfied: rfc3986==1.* in .../envs/python37/lib/python3.7/site-packages (from httpx) (1.2.0)
  Requirement already satisfied: idna==2.* in .../envs/python37/lib/python3.7/site-packages (from httpx) (2.8)
  Collecting hstspreload>=2019.8.27 (from httpx)
    Downloading https://files.pythonhosted.org/packages/55/77/e0031fbb2930891db135af5a53afdf5567ca6f1b1ff55bf231ed5330f66d/hstspreload-2019.11.4.tar.gz (701kB)
       |████████████████████████████████| 706kB 740kB/s 
  Requirement already satisfied: hpack<4,>=2.3 in .../envs/python37/lib/python3.7/site-packages (from h2==3.*->httpx) (3.0.0)
  Requirement already satisfied: hyperframe<6,>=5.2.0 in .../envs/python37/lib/python3.7/site-packages (from h2==3.*->httpx) (5.2.0)
  Building wheels for collected packages: hstspreload
    Building wheel for hstspreload (setup.py) ... done
    Created wheel for hstspreload: filename=hstspreload-2019.11.4-cp37-none-any.whl size=704190 sha256=ac82e6b8abe795fa1a179318d64d73660fa3024715b04b7db0746971c3e5a87b
    Stored in directory: .../Library/Caches/pip/wheels/49/f1/9d/dc01d2c108593d8d2c32d00cdd9daf595e6ad4a727d57b7033
  Successfully built hstspreload
  Installing collected packages: hstspreload, httpx
  Successfully installed hstspreload-2019.11.4 httpx-0.7.6
  
  Manually upgrading rfc3986 to 1.3.2 resolved the issue. Seems the installer should be checking for rfc3986==1.3.2 or greater? 
  
  --- 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 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     license="BSD",
  44     description="The next generation HTTP client.",
  45     long_description=get_long_description(),
  46     long_description_content_type="text/markdown",
  47     author="Tom Christie",
  48     author_email="tom@tomchristie.com",
  49     package_data={"httpx": ["py.typed"]},
  50     packages=get_packages("httpx"),
  51     include_package_data=True,
  52     zip_safe=False,
  53     install_requires=[
  54         "certifi",
  55         "hstspreload",
  56         "chardet==3.*",
  57         "h11==0.8.*",
  58         "h2==3.*",
  59         "idna==2.*",
  60         "rfc3986==1.*",
  61         "sniffio==1.*",
  62     ],
  63     classifiers=[
  64         "Development Status :: 3 - Alpha",
  65         "Environment :: Web Environment",
  66         "Intended Audience :: Developers",
  67         "License :: OSI Approved :: BSD License",
  68         "Operating System :: OS Independent",
  69         "Topic :: Internet :: WWW/HTTP",
  70         "Framework :: AsyncIO",
  71         "Framework :: Trio",
  72         "Programming Language :: Python :: 3",
  73         "Programming Language :: Python :: 3.6",
  74         "Programming Language :: Python :: 3.7",
  75         "Programming Language :: Python :: 3.8",
  76     ],
  77 )
  78
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -57,7 +57,7 @@
           "h11==0.8.*",
           "h2==3.*",
           "idna==2.*",
  -        "rfc3986==1.*",
  +        "rfc3986>=1.3,<2",
           "sniffio==1.*",
       ],
       classifiers=[
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -57,7 +57,7 @@\n         \"h11==0.8.*\",\n         \"h2==3.*\",\n         \"idna==2.*\",\n-        \"rfc3986==1.*\",\n+        \"rfc3986>=1.3,<2\",\n         \"sniffio==1.*\",\n     ],\n     classifiers=[\n", "issue": "AttributeError: module 'rfc3986.api' has no attribute 'iri_reference'\nJust did a pip install of httpx, and it appeared to meet all the pre-reqs. However, I'd encounter the error in the title.\r\n\r\n\r\n(python37) $ pip install httpx\r\nCollecting httpx\r\n  Using cached https://files.pythonhosted.org/packages/15/fb/81861a0dbe87a0de57491b1b587419845f9a99e5b3d48e56cd440b1fcb68/httpx-0.7.6-py2.py3-none-any.whl\r\nRequirement already satisfied: certifi in .../envs/python37/lib/python3.7/site-packages (from httpx) (2019.6.16)\r\nRequirement already satisfied: h2==3.* in .../envs/python37/lib/python3.7/site-packages (from httpx) (3.1.0)\r\nRequirement already satisfied: chardet==3.* in .../envs/python37/lib/python3.7/site-packages (from httpx) (3.0.4)\r\nRequirement already satisfied: h11==0.8.* in .../envs/python37/lib/python3.7/site-packages (from httpx) (0.8.1)\r\nRequirement already satisfied: rfc3986==1.* in .../envs/python37/lib/python3.7/site-packages (from httpx) (1.2.0)\r\nRequirement already satisfied: idna==2.* in .../envs/python37/lib/python3.7/site-packages (from httpx) (2.8)\r\nCollecting hstspreload>=2019.8.27 (from httpx)\r\n  Downloading https://files.pythonhosted.org/packages/55/77/e0031fbb2930891db135af5a53afdf5567ca6f1b1ff55bf231ed5330f66d/hstspreload-2019.11.4.tar.gz (701kB)\r\n     |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 706kB 740kB/s \r\nRequirement already satisfied: hpack<4,>=2.3 in .../envs/python37/lib/python3.7/site-packages (from h2==3.*->httpx) (3.0.0)\r\nRequirement already satisfied: hyperframe<6,>=5.2.0 in .../envs/python37/lib/python3.7/site-packages (from h2==3.*->httpx) (5.2.0)\r\nBuilding wheels for collected packages: hstspreload\r\n  Building wheel for hstspreload (setup.py) ... done\r\n  Created wheel for hstspreload: filename=hstspreload-2019.11.4-cp37-none-any.whl size=704190 sha256=ac82e6b8abe795fa1a179318d64d73660fa3024715b04b7db0746971c3e5a87b\r\n  Stored in directory: .../Library/Caches/pip/wheels/49/f1/9d/dc01d2c108593d8d2c32d00cdd9daf595e6ad4a727d57b7033\r\nSuccessfully built hstspreload\r\nInstalling collected packages: hstspreload, httpx\r\nSuccessfully installed hstspreload-2019.11.4 httpx-0.7.6\r\n\r\nManually upgrading rfc3986 to 1.3.2 resolved the issue. Seems the installer should be checking for rfc3986==1.3.2 or greater? \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    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        \"hstspreload\",\n        \"chardet==3.*\",\n        \"h11==0.8.*\",\n        \"h2==3.*\",\n        \"idna==2.*\",\n        \"rfc3986==1.*\",\n        \"sniffio==1.*\",\n    ],\n    classifiers=[\n        \"Development Status :: 3 - Alpha\",\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    ],\n)\n", "path": "setup.py"}], "after_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    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        \"hstspreload\",\n        \"chardet==3.*\",\n        \"h11==0.8.*\",\n        \"h2==3.*\",\n        \"idna==2.*\",\n        \"rfc3986>=1.3,<2\",\n        \"sniffio==1.*\",\n    ],\n    classifiers=[\n        \"Development Status :: 3 - Alpha\",\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    ],\n)\n", "path": "setup.py"}]}