prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  HTTPError should be importable frop the top-level httpx package
  From #365:
  
  > `HTTPError` is not available at the top level like the other exceptions and like it was in requests. This is a somewhat common exception to catch raise_for_status, so having to add another import statement for it is a bit odd if intentional.
  
  Put differently, `HTTPError` is missing from `httpx/__init__.py`. Adding it would allow us to do:
  
  ```python
  import httpx
  
  try:
      r = httpx.get("https://example.org")
      r.raise_for_status()
  except httpx.HTTPError:
      ...
  ```
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `httpx/__init__.py`
  Content:
  ```
  1 from .__version__ import __description__, __title__, __version__
  2 from .api import delete, get, head, options, patch, post, put, request
  3 from .client import AsyncClient, Client
  4 from .concurrency.asyncio import AsyncioBackend
  5 from .concurrency.base import (
  6     BaseBackgroundManager,
  7     BasePoolSemaphore,
  8     BaseTCPStream,
  9     ConcurrencyBackend,
  10 )
  11 from .config import (
  12     USER_AGENT,
  13     CertTypes,
  14     HTTPVersionConfig,
  15     HTTPVersionTypes,
  16     PoolLimits,
  17     SSLConfig,
  18     TimeoutConfig,
  19     TimeoutTypes,
  20     VerifyTypes,
  21 )
  22 from .dispatch.base import AsyncDispatcher, Dispatcher
  23 from .dispatch.connection import HTTPConnection
  24 from .dispatch.connection_pool import ConnectionPool
  25 from .dispatch.proxy_http import HTTPProxy, HTTPProxyMode
  26 from .exceptions import (
  27     ConnectTimeout,
  28     CookieConflict,
  29     DecodingError,
  30     InvalidURL,
  31     NotRedirectResponse,
  32     PoolTimeout,
  33     ProtocolError,
  34     ProxyError,
  35     ReadTimeout,
  36     RedirectBodyUnavailable,
  37     RedirectLoop,
  38     ResponseClosed,
  39     ResponseNotRead,
  40     StreamConsumed,
  41     Timeout,
  42     TooManyRedirects,
  43     WriteTimeout,
  44 )
  45 from .middleware.digest_auth import DigestAuth
  46 from .models import (
  47     URL,
  48     AsyncRequest,
  49     AsyncRequestData,
  50     AsyncResponse,
  51     AsyncResponseContent,
  52     AuthTypes,
  53     Cookies,
  54     CookieTypes,
  55     Headers,
  56     HeaderTypes,
  57     Origin,
  58     QueryParams,
  59     QueryParamTypes,
  60     Request,
  61     RequestData,
  62     RequestFiles,
  63     Response,
  64     ResponseContent,
  65     URLTypes,
  66 )
  67 from .status_codes import StatusCode, codes
  68 
  69 __all__ = [
  70     "__description__",
  71     "__title__",
  72     "__version__",
  73     "delete",
  74     "get",
  75     "head",
  76     "options",
  77     "patch",
  78     "post",
  79     "patch",
  80     "put",
  81     "request",
  82     "AsyncClient",
  83     "Client",
  84     "AsyncioBackend",
  85     "USER_AGENT",
  86     "CertTypes",
  87     "PoolLimits",
  88     "SSLConfig",
  89     "TimeoutConfig",
  90     "VerifyTypes",
  91     "HTTPConnection",
  92     "BasePoolSemaphore",
  93     "BaseBackgroundManager",
  94     "ConnectionPool",
  95     "HTTPProxy",
  96     "HTTPProxyMode",
  97     "ConnectTimeout",
  98     "CookieConflict",
  99     "DecodingError",
  100     "InvalidURL",
  101     "NotRedirectResponse",
  102     "PoolTimeout",
  103     "ProtocolError",
  104     "ReadTimeout",
  105     "RedirectBodyUnavailable",
  106     "RedirectLoop",
  107     "ResponseClosed",
  108     "ResponseNotRead",
  109     "StreamConsumed",
  110     "ProxyError",
  111     "Timeout",
  112     "TooManyRedirects",
  113     "WriteTimeout",
  114     "AsyncDispatcher",
  115     "BaseTCPStream",
  116     "ConcurrencyBackend",
  117     "Dispatcher",
  118     "URL",
  119     "URLTypes",
  120     "StatusCode",
  121     "codes",
  122     "TimeoutTypes",
  123     "HTTPVersionTypes",
  124     "HTTPVersionConfig",
  125     "AsyncRequest",
  126     "AsyncRequestData",
  127     "AsyncResponse",
  128     "AsyncResponseContent",
  129     "AuthTypes",
  130     "Cookies",
  131     "CookieTypes",
  132     "Headers",
  133     "HeaderTypes",
  134     "Origin",
  135     "QueryParams",
  136     "QueryParamTypes",
  137     "Request",
  138     "RequestData",
  139     "Response",
  140     "ResponseContent",
  141     "RequestFiles",
  142     "DigestAuth",
  143 ]
  144
  ```
  --- 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/httpx/__init__.py b/httpx/__init__.py
  --- a/httpx/__init__.py
  +++ b/httpx/__init__.py
  @@ -27,6 +27,7 @@
       ConnectTimeout,
       CookieConflict,
       DecodingError,
  +    HTTPError,
       InvalidURL,
       NotRedirectResponse,
       PoolTimeout,
  @@ -97,6 +98,7 @@
       "ConnectTimeout",
       "CookieConflict",
       "DecodingError",
  +    "HTTPError",
       "InvalidURL",
       "NotRedirectResponse",
       "PoolTimeout",
  
verification_info: {"golden_diff": "diff --git a/httpx/__init__.py b/httpx/__init__.py\n--- a/httpx/__init__.py\n+++ b/httpx/__init__.py\n@@ -27,6 +27,7 @@\n     ConnectTimeout,\n     CookieConflict,\n     DecodingError,\n+    HTTPError,\n     InvalidURL,\n     NotRedirectResponse,\n     PoolTimeout,\n@@ -97,6 +98,7 @@\n     \"ConnectTimeout\",\n     \"CookieConflict\",\n     \"DecodingError\",\n+    \"HTTPError\",\n     \"InvalidURL\",\n     \"NotRedirectResponse\",\n     \"PoolTimeout\",\n", "issue": "HTTPError should be importable frop the top-level httpx package\nFrom #365:\r\n\r\n> `HTTPError` is not available at the top level like the other exceptions and like it was in requests. This is a somewhat common exception to catch raise_for_status, so having to add another import statement for it is a bit odd if intentional.\r\n\r\nPut differently, `HTTPError` is missing from `httpx/__init__.py`. Adding it would allow us to do:\r\n\r\n```python\r\nimport httpx\r\n\r\ntry:\r\n    r = httpx.get(\"https://example.org\")\r\n    r.raise_for_status()\r\nexcept httpx.HTTPError:\r\n    ...\r\n```\n", "before_files": [{"content": "from .__version__ import __description__, __title__, __version__\nfrom .api import delete, get, head, options, patch, post, put, request\nfrom .client import AsyncClient, Client\nfrom .concurrency.asyncio import AsyncioBackend\nfrom .concurrency.base import (\n    BaseBackgroundManager,\n    BasePoolSemaphore,\n    BaseTCPStream,\n    ConcurrencyBackend,\n)\nfrom .config import (\n    USER_AGENT,\n    CertTypes,\n    HTTPVersionConfig,\n    HTTPVersionTypes,\n    PoolLimits,\n    SSLConfig,\n    TimeoutConfig,\n    TimeoutTypes,\n    VerifyTypes,\n)\nfrom .dispatch.base import AsyncDispatcher, Dispatcher\nfrom .dispatch.connection import HTTPConnection\nfrom .dispatch.connection_pool import ConnectionPool\nfrom .dispatch.proxy_http import HTTPProxy, HTTPProxyMode\nfrom .exceptions import (\n    ConnectTimeout,\n    CookieConflict,\n    DecodingError,\n    InvalidURL,\n    NotRedirectResponse,\n    PoolTimeout,\n    ProtocolError,\n    ProxyError,\n    ReadTimeout,\n    RedirectBodyUnavailable,\n    RedirectLoop,\n    ResponseClosed,\n    ResponseNotRead,\n    StreamConsumed,\n    Timeout,\n    TooManyRedirects,\n    WriteTimeout,\n)\nfrom .middleware.digest_auth import DigestAuth\nfrom .models import (\n    URL,\n    AsyncRequest,\n    AsyncRequestData,\n    AsyncResponse,\n    AsyncResponseContent,\n    AuthTypes,\n    Cookies,\n    CookieTypes,\n    Headers,\n    HeaderTypes,\n    Origin,\n    QueryParams,\n    QueryParamTypes,\n    Request,\n    RequestData,\n    RequestFiles,\n    Response,\n    ResponseContent,\n    URLTypes,\n)\nfrom .status_codes import StatusCode, codes\n\n__all__ = [\n    \"__description__\",\n    \"__title__\",\n    \"__version__\",\n    \"delete\",\n    \"get\",\n    \"head\",\n    \"options\",\n    \"patch\",\n    \"post\",\n    \"patch\",\n    \"put\",\n    \"request\",\n    \"AsyncClient\",\n    \"Client\",\n    \"AsyncioBackend\",\n    \"USER_AGENT\",\n    \"CertTypes\",\n    \"PoolLimits\",\n    \"SSLConfig\",\n    \"TimeoutConfig\",\n    \"VerifyTypes\",\n    \"HTTPConnection\",\n    \"BasePoolSemaphore\",\n    \"BaseBackgroundManager\",\n    \"ConnectionPool\",\n    \"HTTPProxy\",\n    \"HTTPProxyMode\",\n    \"ConnectTimeout\",\n    \"CookieConflict\",\n    \"DecodingError\",\n    \"InvalidURL\",\n    \"NotRedirectResponse\",\n    \"PoolTimeout\",\n    \"ProtocolError\",\n    \"ReadTimeout\",\n    \"RedirectBodyUnavailable\",\n    \"RedirectLoop\",\n    \"ResponseClosed\",\n    \"ResponseNotRead\",\n    \"StreamConsumed\",\n    \"ProxyError\",\n    \"Timeout\",\n    \"TooManyRedirects\",\n    \"WriteTimeout\",\n    \"AsyncDispatcher\",\n    \"BaseTCPStream\",\n    \"ConcurrencyBackend\",\n    \"Dispatcher\",\n    \"URL\",\n    \"URLTypes\",\n    \"StatusCode\",\n    \"codes\",\n    \"TimeoutTypes\",\n    \"HTTPVersionTypes\",\n    \"HTTPVersionConfig\",\n    \"AsyncRequest\",\n    \"AsyncRequestData\",\n    \"AsyncResponse\",\n    \"AsyncResponseContent\",\n    \"AuthTypes\",\n    \"Cookies\",\n    \"CookieTypes\",\n    \"Headers\",\n    \"HeaderTypes\",\n    \"Origin\",\n    \"QueryParams\",\n    \"QueryParamTypes\",\n    \"Request\",\n    \"RequestData\",\n    \"Response\",\n    \"ResponseContent\",\n    \"RequestFiles\",\n    \"DigestAuth\",\n]\n", "path": "httpx/__init__.py"}], "after_files": [{"content": "from .__version__ import __description__, __title__, __version__\nfrom .api import delete, get, head, options, patch, post, put, request\nfrom .client import AsyncClient, Client\nfrom .concurrency.asyncio import AsyncioBackend\nfrom .concurrency.base import (\n    BaseBackgroundManager,\n    BasePoolSemaphore,\n    BaseTCPStream,\n    ConcurrencyBackend,\n)\nfrom .config import (\n    USER_AGENT,\n    CertTypes,\n    HTTPVersionConfig,\n    HTTPVersionTypes,\n    PoolLimits,\n    SSLConfig,\n    TimeoutConfig,\n    TimeoutTypes,\n    VerifyTypes,\n)\nfrom .dispatch.base import AsyncDispatcher, Dispatcher\nfrom .dispatch.connection import HTTPConnection\nfrom .dispatch.connection_pool import ConnectionPool\nfrom .dispatch.proxy_http import HTTPProxy, HTTPProxyMode\nfrom .exceptions import (\n    ConnectTimeout,\n    CookieConflict,\n    DecodingError,\n    HTTPError,\n    InvalidURL,\n    NotRedirectResponse,\n    PoolTimeout,\n    ProtocolError,\n    ProxyError,\n    ReadTimeout,\n    RedirectBodyUnavailable,\n    RedirectLoop,\n    ResponseClosed,\n    ResponseNotRead,\n    StreamConsumed,\n    Timeout,\n    TooManyRedirects,\n    WriteTimeout,\n)\nfrom .middleware.digest_auth import DigestAuth\nfrom .models import (\n    URL,\n    AsyncRequest,\n    AsyncRequestData,\n    AsyncResponse,\n    AsyncResponseContent,\n    AuthTypes,\n    Cookies,\n    CookieTypes,\n    Headers,\n    HeaderTypes,\n    Origin,\n    QueryParams,\n    QueryParamTypes,\n    Request,\n    RequestData,\n    RequestFiles,\n    Response,\n    ResponseContent,\n    URLTypes,\n)\nfrom .status_codes import StatusCode, codes\n\n__all__ = [\n    \"__description__\",\n    \"__title__\",\n    \"__version__\",\n    \"delete\",\n    \"get\",\n    \"head\",\n    \"options\",\n    \"patch\",\n    \"post\",\n    \"patch\",\n    \"put\",\n    \"request\",\n    \"AsyncClient\",\n    \"Client\",\n    \"AsyncioBackend\",\n    \"USER_AGENT\",\n    \"CertTypes\",\n    \"PoolLimits\",\n    \"SSLConfig\",\n    \"TimeoutConfig\",\n    \"VerifyTypes\",\n    \"HTTPConnection\",\n    \"BasePoolSemaphore\",\n    \"BaseBackgroundManager\",\n    \"ConnectionPool\",\n    \"HTTPProxy\",\n    \"HTTPProxyMode\",\n    \"ConnectTimeout\",\n    \"CookieConflict\",\n    \"DecodingError\",\n    \"HTTPError\",\n    \"InvalidURL\",\n    \"NotRedirectResponse\",\n    \"PoolTimeout\",\n    \"ProtocolError\",\n    \"ReadTimeout\",\n    \"RedirectBodyUnavailable\",\n    \"RedirectLoop\",\n    \"ResponseClosed\",\n    \"ResponseNotRead\",\n    \"StreamConsumed\",\n    \"ProxyError\",\n    \"Timeout\",\n    \"TooManyRedirects\",\n    \"WriteTimeout\",\n    \"AsyncDispatcher\",\n    \"BaseTCPStream\",\n    \"ConcurrencyBackend\",\n    \"Dispatcher\",\n    \"URL\",\n    \"URLTypes\",\n    \"StatusCode\",\n    \"codes\",\n    \"TimeoutTypes\",\n    \"HTTPVersionTypes\",\n    \"HTTPVersionConfig\",\n    \"AsyncRequest\",\n    \"AsyncRequestData\",\n    \"AsyncResponse\",\n    \"AsyncResponseContent\",\n    \"AuthTypes\",\n    \"Cookies\",\n    \"CookieTypes\",\n    \"Headers\",\n    \"HeaderTypes\",\n    \"Origin\",\n    \"QueryParams\",\n    \"QueryParamTypes\",\n    \"Request\",\n    \"RequestData\",\n    \"Response\",\n    \"ResponseContent\",\n    \"RequestFiles\",\n    \"DigestAuth\",\n]\n", "path": "httpx/__init__.py"}]}