You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add Python 3.13 support, drop 3.8 (#29)
* Fix optional dependencies to avoid forcing installation of both httpx and requests (#26)
- Move httpx and requests from core dependencies to optional extras
- Add 'all' extra for users who want both libraries
- Update README to reflect new installation instructions
- Update noxfile to install both extras for testing
Previously, both httpx and requests were always installed even when users
only wanted one library. Now users can install only what they need:
- retryhttp[all] for both libraries
- retryhttp[httpx] for httpx only
- retryhttp[requests] for requests only
* Add support for aiohttp (#28)
Co-authored-by: Austin de Coup-Crank <austindcc@gmail.com>
* Release v1.4.0
---------
Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Copy file name to clipboardExpand all lines: README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,21 +19,22 @@ Several HTTP errors are often transient, and might succeed if retried:
19
19
20
20
This project aims to simplify retrying these, by extending [`tenacity`](https://tenacity.readthedocs.io/) with custom retry and wait strategies, as well as a custom decorator. Defaults are sensible for most use cases, but are fully customizable.
21
21
22
-
Supports both [`requests`](https://docs.python-requests.org/en/latest/index.html) and [`httpx`](https://python-httpx.org/) natively, but could be customized to use with any library that raises exceptions for the conditions listed above.
22
+
Supports both [`requests`](https://docs.python-requests.org/en/latest/index.html), [`httpx`](https://python-httpx.org/) and [`aiohttp`](https://docs.aiohttp.org/) natively, but could be customized to use with any library that raises exceptions for the conditions listed above.
23
23
24
24
## Install
25
25
26
26
Install from PyPI:
27
27
28
28
```sh
29
-
pip install retryhttp # Supports both HTTPXand requests
29
+
pip install retryhttp # Supports HTTPX, requests and aiohttp
30
30
```
31
31
32
32
You can also install support for only HTTPX or requests, if you would rather not install unnecessary dependencies:
33
33
34
34
```sh
35
35
pip install retryhttp[httpx] # Supports only HTTPX
36
36
pip install retryhttp[requests] # Supports only requests
37
+
pip install retryhttp[aiohttp] # Supports only aiohttp
37
38
```
38
39
39
40
Or, install the latest development snapshot from git:
Copy file name to clipboardExpand all lines: docs/guide.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
## Overview
2
2
3
-
`retryhttp` makes it easy to retry potentially transient HTTP errors when using `httpx`or `requests`.
3
+
`retryhttp` makes it easy to retry potentially transient HTTP errors when using `httpx`, `requests`or `aiohttp`.
4
4
5
5
!!! note
6
6
Errors that you can safely retry vary from service to service.
@@ -83,4 +83,4 @@ Under the hood, RetryHTTP is a convenience layer on top of the excellent retry l
83
83
84
84
`tenacity` works by adding a decorator to functions that might fail. This decorator is configured with retry, wait, and stop strategies that configure what conditions to retry, how long to wait between retries, and when to stop retrying, respectively. Failures could be a raised exception, or a configurable return value. See [`tenacity` documentation](https://tenacity.readthedocs.io/en/latest/index.html) for details.
85
85
86
-
`retryhttp` provides new retry and stop strategies for potentially transient error conditions raised by `httpx`and `requests`. To make things as convenient as possible, `retryhttp` also provides a [new decorator][retryhttp.retry] that wraps [`tenacity.retry`](https://tenacity.readthedocs.io/en/latest/api.html#tenacity.retry) with sensible defaults, which are all customizable.
86
+
`retryhttp` provides new retry and stop strategies for potentially transient error conditions raised by `httpx`, `requests`and `aiohttp`. To make things as convenient as possible, `retryhttp` also provides a [new decorator][retryhttp.retry] that wraps [`tenacity.retry`](https://tenacity.readthedocs.io/en/latest/api.html#tenacity.retry) with sensible defaults, which are all customizable.
Copy file name to clipboardExpand all lines: docs/index.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,14 +17,14 @@ Several HTTP errors are often transient, and might succeed if retried:
17
17
18
18
This project aims to simplify retrying these, by extending [`tenacity`](https://tenacity.readthedocs.io/) with custom retry and wait strategies, as well as a custom decorator. Defaults are sensible for most use cases, but are fully customizable.
19
19
20
-
Supports exceptions raised by both [`requests`](https://docs.python-requests.org/en/latest/index.html) and [`httpx`](https://python-httpx.org/).
20
+
Supports exceptions raised by both [`requests`](https://docs.python-requests.org/en/latest/index.html), [`httpx`](https://python-httpx.org/) and [`aiohttp`](https://docs.aiohttp.org/).
21
21
22
22
## Install
23
23
24
24
Install from PyPI:
25
25
26
26
```sh
27
-
# Supports both HTTPXand requests
27
+
# Supports HTTPX, requests and aiohttp
28
28
pip install retryhttp
29
29
```
30
30
@@ -33,6 +33,7 @@ You can also install support for only HTTPX or requests:
33
33
```sh
34
34
pip install retryhttp[httpx] # Supports only HTTPX
35
35
pip install retryhttp[requests] # Supports only requests
36
+
pip install retryhttp[aiohttp] # Supports only aiohttp
36
37
```
37
38
38
39
Or, install the latest development snapshot from git:
0 commit comments