Skip to content

Commit 6133f6e

Browse files
committed
Add ChunkedEncodingError and bump to v1.0.0
1 parent 6c70c36 commit 6133f6e

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

docs/changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## v1.0.0
4+
5+
* API is now stable. Any breaking changes will follow [SemVer](https://semver.org/) guidelines.
6+
* Added `requests.exceptions.ChunkedEncodingError` to the list of default network errors.
7+
38
## v0.2.0
49

510
* Rename `retryhttp.retry_http_errors` to [`retryhttp.retry`][].

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ build-backend="setuptools.build_meta"
1010

1111
[project]
1212
name = "retryhttp"
13-
version = "0.2.0"
14-
description = "Retry potentially transient HTTP errors."
13+
version = "1.0.0"
14+
description = "Retry potentially transient HTTP errors in Python."
1515
license = {file = "LICENSE"}
1616
readme = "README.md"
1717
requires-python = ">=3.8"
@@ -22,7 +22,7 @@ maintainers = [
2222
{name = "Austin de Coup-Crank", email = "[email protected]"},
2323
]
2424
classifiers = [
25-
"Development Status :: 4 - Beta",
25+
"Development Status :: 5 - Production/Stable",
2626
"Intended Audience :: Developers",
2727
"License :: OSI Approved :: Apache Software License",
2828
"Programming Language :: Python",
@@ -33,6 +33,7 @@ classifiers = [
3333
"Programming Language :: Python :: 3.10",
3434
"Programming Language :: Python :: 3.11",
3535
"Programming Language :: Python :: 3.12",
36+
"Topic :: Internet :: WWW/HTTP",
3637
"Topic :: Utilities",
3738
]
3839
dependencies = [

retryhttp/_retry.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def retry(
6060
- `httpx.ReadError`
6161
- `httpx.WriteError`
6262
- `requests.ConnectionError`
63+
- `requests.exceptions.ChunkedEncodingError`
6364
- Timeouts:
6465
- `httpx.TimeoutException`
6566
- `requests.Timeout`
@@ -149,6 +150,7 @@ class retry_if_network_error(retry_if_exception_type):
149150
- `httpx.ReadError`
150151
- `httpx.WriteError`
151152
- `requests.ConnectionError`
153+
- `requests.exceptions.ChunkedEncodingError`
152154
153155
"""
154156

retryhttp/_utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ def get_default_network_errors() -> (
4646
]
4747
)
4848
if _REQUESTS_INSTALLED:
49-
exceptions.append(requests.ConnectionError)
49+
exceptions.extend(
50+
[
51+
requests.ConnectionError,
52+
requests.exceptions.ChunkedEncodingError,
53+
]
54+
)
5055
return tuple(exceptions)
5156

5257

retryhttp/_wait.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ class wait_context_aware(wait_base):
8080
- `httpx.ReadError`
8181
- `httpx.WriteError`
8282
- `requests.ConnectionError`
83+
- `requests.exceptions.ChunkedEncodingError`
8384
timeouts: One or more exceptions that will trigger `wait_timeouts`. If omitted,
8485
defaults to:
8586

0 commit comments

Comments
 (0)