Skip to content

Commit

Permalink
Merge branch 'release-0.10.1'
Browse files Browse the repository at this point in the history
* release-0.10.1:
  Bumping version to 0.10.1
  Add changelog
  Linting fix
  Fix retrying incomplete downloads with urllib3 2.x
  • Loading branch information
aws-sdk-python-automation committed Mar 14, 2024
2 parents ffc1b46 + 6914663 commit 106c814
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .changes/0.10.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"category": "``urllib3``",
"description": "Fixed retry handling for IncompleteRead exception raised by urllib3 2.x during data transfer",
"type": "bugfix"
}
]
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
CHANGELOG
=========

0.10.1
======

* bugfix:``urllib3``: Fixed retry handling for IncompleteRead exception raised by urllib3 2.x during data transfer


0.10.0
======

Expand Down
6 changes: 4 additions & 2 deletions s3transfer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def __call__(self, bytes_amount):
import threading

from botocore.compat import six # noqa: F401
from botocore.exceptions import IncompleteReadError
from botocore.exceptions import IncompleteReadError, ResponseStreamingError
from botocore.vendored.requests.packages.urllib3.exceptions import (
ReadTimeoutError,
)
Expand All @@ -144,7 +144,7 @@ def __call__(self, bytes_amount):
from s3transfer.exceptions import RetriesExceededError, S3UploadFailedError

__author__ = 'Amazon Web Services'
__version__ = '0.10.0'
__version__ = '0.10.1'


class NullHandler(logging.Handler):
Expand Down Expand Up @@ -624,6 +624,7 @@ def _download_range(
OSError,
ReadTimeoutError,
IncompleteReadError,
ResponseStreamingError,
) as e:
logger.debug(
"Retrying exception caught (%s), "
Expand Down Expand Up @@ -840,6 +841,7 @@ def _get_object(self, bucket, key, filename, extra_args, callback):
OSError,
ReadTimeoutError,
IncompleteReadError,
ResponseStreamingError,
) as e:
# TODO: we need a way to reset the callback if the
# download failed.
Expand Down
7 changes: 6 additions & 1 deletion s3transfer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
import threading
from collections import defaultdict

from botocore.exceptions import IncompleteReadError, ReadTimeoutError
from botocore.exceptions import (
IncompleteReadError,
ReadTimeoutError,
ResponseStreamingError,
)
from botocore.httpchecksum import AwsChunkedWrapper
from botocore.utils import is_s3express_bucket

Expand All @@ -41,6 +45,7 @@
SOCKET_ERROR,
ReadTimeoutError,
IncompleteReadError,
ResponseStreamingError,
)


Expand Down

0 comments on commit 106c814

Please sign in to comment.