Skip to content

Commit 3767cc8

Browse files
Merge branch 'master' into dependabot/github_actions/actions/checkout-5
2 parents 142e421 + 3fee278 commit 3767cc8

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

docs/compatibility.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,3 +226,7 @@ For both query params (`params=`) and form data (`data=`), `requests` supports s
226226
In HTTPX, event hooks may access properties of requests and responses, but event hook callbacks cannot mutate the original request/response.
227227

228228
If you are looking for more control, consider checking out [Custom Transports](advanced/transports.md#custom-transports).
229+
230+
## Exceptions and Errors
231+
232+
`requests` exception hierarchy is slightly different to the `httpx` exception hierarchy. `requests` exposes a top level `RequestException`, where as `httpx` exposes a top level `HTTPError`. see the exceptions exposes in requests [here](https://requests.readthedocs.io/en/latest/_modules/requests/exceptions/). See the `httpx` error hierarchy [here](https://www.python-httpx.org/exceptions/).

docs/logging.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ httpx.get("https://www.example.com")
2020
Will send debug level output to the console, or wherever `stdout` is directed too...
2121

2222
```
23-
DEBUG [2024-09-28 17:27:40] httpx - load_ssl_context verify=True cert=None
24-
DEBUG [2024-09-28 17:27:40] httpx - load_verify_locations cafile='/Users/karenpetrosyan/oss/karhttpx/.venv/lib/python3.9/site-packages/certifi/cacert.pem'
2523
DEBUG [2024-09-28 17:27:40] httpcore.connection - connect_tcp.started host='www.example.com' port=443 local_address=None timeout=5.0 socket_options=None
2624
DEBUG [2024-09-28 17:27:41] httpcore.connection - connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x101f1e8e0>
2725
DEBUG [2024-09-28 17:27:41] httpcore.connection - start_tls.started ssl_context=SSLContext(verify=True) server_hostname='www.example.com' timeout=5.0
@@ -80,4 +78,4 @@ logging.config.dictConfig(LOGGING_CONFIG)
8078
httpx.get('https://www.example.com')
8179
```
8280

83-
The exact formatting of the debug logging may be subject to change across different versions of `httpx` and `httpcore`. If you need to rely on a particular format it is recommended that you pin installation of these packages to fixed versions.
81+
The exact formatting of the debug logging may be subject to change across different versions of `httpx` and `httpcore`. If you need to rely on a particular format it is recommended that you pin installation of these packages to fixed versions.

0 commit comments

Comments
 (0)