Skip to content

Commit a45b9de

Browse files
Merge branch 'release-1.39.11'
* release-1.39.11: Bumping version to 1.39.11 Add changelog entries from botocore Update retries documentation (#4571)
2 parents 8ed8b60 + d864fdd commit a45b9de

File tree

6 files changed

+56
-12
lines changed

6 files changed

+56
-12
lines changed

.changes/1.39.11.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[
2+
{
3+
"category": "``ecr``",
4+
"description": "[``botocore``] Add support for Image Tag Mutability Exception feature, allowing repositories to define wildcard-based patterns that override the default image tag mutability settings.",
5+
"type": "api-change"
6+
},
7+
{
8+
"category": "``emr``",
9+
"description": "[``botocore``] This release adds new parameter 'ExtendedSupport' in AWS EMR RunJobFlow, ModifyCluster and DescribeCluster API.",
10+
"type": "api-change"
11+
},
12+
{
13+
"category": "``lambda``",
14+
"description": "[``botocore``] This release migrated the model to Smithy keeping all features unchanged.",
15+
"type": "api-change"
16+
},
17+
{
18+
"category": "``neptunedata``",
19+
"description": "[``botocore``] This release updates the supported regions for Neptune API to include current AWS regions.",
20+
"type": "api-change"
21+
}
22+
]

CHANGELOG.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
CHANGELOG
33
=========
44

5+
1.39.11
6+
=======
7+
8+
* api-change:``ecr``: [``botocore``] Add support for Image Tag Mutability Exception feature, allowing repositories to define wildcard-based patterns that override the default image tag mutability settings.
9+
* api-change:``emr``: [``botocore``] This release adds new parameter 'ExtendedSupport' in AWS EMR RunJobFlow, ModifyCluster and DescribeCluster API.
10+
* api-change:``lambda``: [``botocore``] This release migrated the model to Smithy keeping all features unchanged.
11+
* api-change:``neptunedata``: [``botocore``] This release updates the supported regions for Neptune API to include current AWS regions.
12+
13+
514
1.39.10
615
=======
716

boto3/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from boto3.session import Session
1919

2020
__author__ = 'Amazon Web Services'
21-
__version__ = '1.39.10'
21+
__version__ = '1.39.11'
2222

2323

2424
# The default Boto3 session; autoloaded when needed.

docs/source/guide/retries.rst

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Legacy mode is the default mode used by any Boto3 client you create. As its name
2424

2525
**Legacy mode’s functionality includes:**
2626

27-
* A default value of 5 for maximum retry attempts. This value can be overwritten through the ``max_attempts`` configuration parameter.
27+
* A default value of 5 for maximum attempts (including the initial request). See `Available configuration options`_ for more information on overwriting this value.
2828
* Retry attempts for a limited number of errors/exceptions::
2929

3030
# General socket/connection errors
@@ -55,7 +55,7 @@ Standard mode is a retry mode that was introduced with the updated retry handler
5555

5656
**Standard mode’s functionality includes:**
5757

58-
* A default value of 3 for maximum retry attempts. This value can be overwritten through the ``max_attempts`` configuration parameter.
58+
* A default value of 3 for maximum attempts (including the initial request). See `Available configuration options`_ for more information on overwriting this value.
5959
* Retry attempts for an expanded list of errors/exceptions::
6060

6161
# Transient errors/exceptions
@@ -102,10 +102,23 @@ Boto3 includes a variety of both retry configurations as well as configuration m
102102
Available configuration options
103103
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104104

105-
In Boto3, users can customize two retry configurations:
105+
In Boto3, users can customize retry configurations:
106106

107107
* ``retry_mode`` - This tells Boto3 which retry mode to use. As described previously, there are three retry modes available: legacy (default), standard, and adaptive.
108-
* ``max_attempts`` - This provides Boto3’s retry handler with a value of maximum retry attempts, where the initial call counts toward the ``max_attempts`` value that you provide.
108+
* ``max_attempts`` - This provides Boto3's retry handler with a value of maximum attempts. **Important**: The behavior differs depending on how it's configured:
109+
110+
* When set in your AWS config file or using the ``AWS_MAX_ATTEMPTS`` environment variable: ``max_attempts`` includes the initial request (total requests)
111+
* When set in a ``Config`` object: ``max_attempts`` excludes the initial request (retries only)
112+
113+
**Examples:**
114+
115+
* AWS config file with ``max_attempts = 3``: 1 initial request + 2 retries = 3 total attempts
116+
* Environment variable ``AWS_MAX_ATTEMPTS=3``: 1 initial request + 2 retries = 3 total attempts
117+
* Config object with ``max_attempts: 3``: 1 initial request + 3 retries = 4 total attempts
118+
119+
* ``total_max_attempts`` - Available only in ``Config`` objects, this always represents total requests including the initial call. This parameter was introduced to provide consistent behavior with the ``max_attempts`` setting used in AWS config files and environment variables. Note that ``total_max_attempts`` is not supported as an environment variable or in AWS config files.
120+
121+
For consistency, consider using ``total_max_attempts`` in ``Config`` objects instead of ``max_attempts``.
109122

110123
Defining a retry configuration in your AWS configuration file
111124
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -117,7 +130,7 @@ This first way to define your retry configuration is to update your global AWS c
117130
max_attempts = 10
118131
retry_mode = standard
119132

120-
Any Boto3 script or code that uses your AWS config file inherits these configurations when using your profile, unless otherwise explicitly overwritten by a ``Config`` object when instantiating your client object at runtime. If no configuration options are set, the default retry mode value is ``legacy``, and the default ``max_attempts`` value is 5.
133+
Any Boto3 script or code that uses your AWS config file inherits these configurations when using your profile, unless otherwise explicitly overwritten by a ``Config`` object when instantiating your client object at runtime. If no configuration options are set, the default retry mode value is ``legacy``, and the default ``max_attempts`` value is 5 (total attempts including initial request).
121134

122135
Defining a retry configuration in a Config object for your Boto3 client
123136
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -126,13 +139,13 @@ The second way to define your retry configuration is to use botocore to enable m
126139

127140
Additionally, if your AWS configuration file is configured with retry behavior, but you want to override those global settings, you can use the ``Config`` object to override an individual client object at runtime.
128141

129-
As shown in the following example, the ``Config`` object takes a ``retries`` dictionary where you can supply your two configuration options, ``max_attempts`` and ``mode``, and the values for each.
142+
As shown in the following example, the ``Config`` object takes a ``retries`` dictionary where you can supply configuration options such as ``total_max_attempts`` and ``mode``, and the values for each.
130143

131144
.. code-block:: python
132145
133146
config = Config(
134147
retries = {
135-
'max_attempts': 10,
148+
'total_max_attempts': 10,
136149
'mode': 'standard'
137150
}
138151
)
@@ -149,15 +162,15 @@ The following is an example of instantiating a ``Config`` object and passing it
149162
150163
config = Config(
151164
retries = {
152-
'max_attempts': 10,
165+
'total_max_attempts': 10,
153166
'mode': 'standard'
154167
}
155168
)
156169
157170
ec2 = boto3.client('ec2', config=config)
158171
159172
.. note::
160-
As mentioned previously, if no configuration options are set, the default mode is ``legacy`` and the default ``max_attempts`` is 5.
173+
As mentioned previously, if no configuration options are set, the default mode is ``legacy`` and the default ``total_max_attempts`` is 5 (total attempts including initial request).
161174

162175

163176
Validating retry attempts

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ universal = 0
33

44
[metadata]
55
requires_dist =
6-
botocore>=1.39.10,<1.40.0
6+
botocore>=1.39.11,<1.40.0
77
jmespath>=0.7.1,<2.0.0
88
s3transfer>=0.13.0,<0.14.0
99

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
requires = [
17-
'botocore>=1.39.10,<1.40.0',
17+
'botocore>=1.39.11,<1.40.0',
1818
'jmespath>=0.7.1,<2.0.0',
1919
's3transfer>=0.13.0,<0.14.0',
2020
]

0 commit comments

Comments
 (0)