Skip to content

Commit 0095f14

Browse files
Merge branch 'release-1.21.6'
* release-1.21.6: Bumping version to 1.21.6 Add changelog entries from botocore Update black to 22.1.0 (#3166) Update 3.6 deprecation notice with blog post (#3164) Extend linting tools (#3041)
2 parents c033e92 + eee16db commit 0095f14

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+4769
-3642
lines changed

.changes/1.21.6.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[
2+
{
3+
"category": "``transfer``",
4+
"description": "[``botocore``] The file input selection feature provides the ability to use either the originally uploaded file or the output file from the previous workflow step, enabling customers to make multiple copies of the original file while keeping the source file intact for file archival.",
5+
"type": "api-change"
6+
},
7+
{
8+
"category": "``lambda``",
9+
"description": "[``botocore``] Lambda releases .NET 6 managed runtime to be available in all commercial regions.",
10+
"type": "api-change"
11+
},
12+
{
13+
"category": "``textract``",
14+
"description": "[``botocore``] Added support for merged cells and column header for table response.",
15+
"type": "api-change"
16+
}
17+
]

.pre-commit-config.yaml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
exclude: ^(.github|.changes|docs/|boto3/compat.py|boto3/data|CHANGELOG.rst)
22
repos:
3-
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
44
rev: v2.3.0
55
hooks:
6-
- id: check-yaml
7-
- id: end-of-file-fixer
8-
- id: trailing-whitespace
9-
- repo: https://github.com/pycqa/flake8
6+
- id: check-yaml
7+
- id: end-of-file-fixer
8+
- id: trailing-whitespace
9+
- repo: 'https://github.com/asottile/pyupgrade'
10+
rev: v2.29.0
11+
hooks:
12+
- id: pyupgrade
13+
args:
14+
- '--py36-plus'
15+
- repo: 'https://github.com/PyCQA/isort'
16+
rev: 5.9.3
17+
hooks:
18+
- id: isort
19+
- repo: 'https://github.com/psf/black'
20+
rev: 22.1.0
21+
hooks:
22+
- id: black
23+
- repo: 'https://github.com/pycqa/flake8'
1024
rev: 3.9.2
1125
hooks:
12-
- id: flake8
26+
- id: flake8

CHANGELOG.rst

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

5+
1.21.6
6+
======
7+
8+
* api-change:``transfer``: [``botocore``] The file input selection feature provides the ability to use either the originally uploaded file or the output file from the previous workflow step, enabling customers to make multiple copies of the original file while keeping the source file intact for file archival.
9+
* api-change:``lambda``: [``botocore``] Lambda releases .NET 6 managed runtime to be available in all commercial regions.
10+
* api-change:``textract``: [``botocore``] Added support for merged cells and column header for table response.
11+
12+
513
1.21.5
614
======
715

README.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ Boto3 is maintained and published by `Amazon Web Services`_.
1515
Notices
1616
-------
1717

18-
On 01/15/2021 deprecation for Python 2.7 was announced and support was dropped
19-
on 07/15/2021. To avoid disruption, customers using Boto3 on Python 2.7 may
18+
On 2021-01-15, deprecation for Python 2.7 was announced and support was dropped
19+
on 2021-07-15. To avoid disruption, customers using Boto3 on Python 2.7 may
2020
need to upgrade their version of Python or pin the version of Boto3. For
2121
more information, see this `blog post <https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-python-2-7-in-aws-sdk-for-python-and-aws-cli-v1/>`__.
2222

23-
Starting in May 2022, we will be dropping support for Python 3.6. This follows the Python Software Foundation `end of support <https://www.python.org/dev/peps/pep-0494/#lifespan>`__ for the runtime which occurred on 2021-12-23.
23+
On 2022-05-30, we will be dropping support for Python 3.6. This follows the
24+
Python Software Foundation `end of support <https://www.python.org/dev/peps/pep-0494/#lifespan>`__
25+
for the runtime which occurred on 2021-12-23.
26+
For more information, see this `blog post <https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/>`__.
2427

2528
.. _boto: https://docs.pythonboto.org/
2629
.. _`doc site`: https://boto3.amazonaws.com/v1/documentation/api/latest/index.html

boto3/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@
1313

1414
import logging
1515

16-
from boto3.session import Session
1716
from boto3.compat import _warn_deprecated_python
18-
17+
from boto3.session import Session
1918

2019
__author__ = 'Amazon Web Services'
21-
__version__ = '1.21.5'
20+
__version__ = '1.21.6'
2221

2322

2423
# The default Boto3 session; autoloaded when needed.

boto3/docs/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def generate_docs(root_dir, session):
3434
for service_name in session.get_available_services():
3535
docs = ServiceDocumenter(service_name, session).document_service()
3636
service_doc_path = os.path.join(
37-
services_doc_path, service_name + '.rst')
37+
services_doc_path, service_name + '.rst'
38+
)
3839
with open(service_doc_path, 'wb') as f:
3940
f.write(docs)

boto3/docs/action.py

Lines changed: 51 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,20 @@
1111
# ANY KIND, either express or implied. See the License for the specific
1212
# language governing permissions and limitations under the License.
1313
from botocore import xform_name
14+
from botocore.docs.method import (
15+
document_custom_method,
16+
document_model_driven_method,
17+
)
1418
from botocore.model import OperationModel
1519
from botocore.utils import get_service_module_name
16-
from botocore.docs.method import document_model_driven_method
17-
from botocore.docs.method import document_custom_method
1820

1921
from boto3.docs.base import BaseDocumenter
2022
from boto3.docs.method import document_model_driven_resource_method
21-
from boto3.docs.utils import get_resource_ignore_params
22-
from boto3.docs.utils import get_resource_public_actions
23-
from boto3.docs.utils import add_resource_type_overview
23+
from boto3.docs.utils import (
24+
add_resource_type_overview,
25+
get_resource_ignore_params,
26+
get_resource_public_actions,
27+
)
2428

2529

2630
class ActionDocumenter(BaseDocumenter):
@@ -30,16 +34,19 @@ def document_actions(self, section):
3034
for modeled_action in modeled_actions_list:
3135
modeled_actions[modeled_action.name] = modeled_action
3236
resource_actions = get_resource_public_actions(
33-
self._resource.__class__)
37+
self._resource.__class__
38+
)
3439
self.member_map['actions'] = sorted(resource_actions)
3540
add_resource_type_overview(
3641
section=section,
3742
resource_type='Actions',
3843
description=(
3944
'Actions call operations on resources. They may '
4045
'automatically handle the passing in of arguments set '
41-
'from identifiers and some attributes.'),
42-
intro_link='actions_intro')
46+
'from identifiers and some attributes.'
47+
),
48+
intro_link='actions_intro',
49+
)
4350

4451
for action_name in sorted(resource_actions):
4552
action_section = section.add_new_section(action_name)
@@ -50,7 +57,7 @@ def document_actions(self, section):
5057
resource_name=self._resource_name,
5158
event_emitter=self._resource.meta.client.meta.events,
5259
load_model=self._resource_model.load,
53-
service_model=self._service_model
60+
service_model=self._service_model,
5461
)
5562
elif action_name in modeled_actions:
5663
document_action(
@@ -62,11 +69,18 @@ def document_actions(self, section):
6269
)
6370
else:
6471
document_custom_method(
65-
action_section, action_name, resource_actions[action_name])
72+
action_section, action_name, resource_actions[action_name]
73+
)
6674

6775

68-
def document_action(section, resource_name, event_emitter, action_model,
69-
service_model, include_signature=True):
76+
def document_action(
77+
section,
78+
resource_name,
79+
event_emitter,
80+
action_model,
81+
service_model,
82+
include_signature=True,
83+
):
7084
"""Documents a resource action
7185
7286
:param section: The section to write to
@@ -83,7 +97,8 @@ def document_action(section, resource_name, event_emitter, action_model,
8397
It is useful for generating docstrings.
8498
"""
8599
operation_model = service_model.operation_model(
86-
action_model.request.operation)
100+
action_model.request.operation
101+
)
87102
ignore_params = get_resource_ignore_params(action_model.request.params)
88103

89104
example_return_value = 'response'
@@ -92,23 +107,31 @@ def document_action(section, resource_name, event_emitter, action_model,
92107
example_resource_name = xform_name(resource_name)
93108
if service_model.service_name == resource_name:
94109
example_resource_name = resource_name
95-
example_prefix = '%s = %s.%s' % (
96-
example_return_value, example_resource_name, action_model.name)
110+
example_prefix = '{} = {}.{}'.format(
111+
example_return_value, example_resource_name, action_model.name
112+
)
97113
document_model_driven_resource_method(
98-
section=section, method_name=action_model.name,
114+
section=section,
115+
method_name=action_model.name,
99116
operation_model=operation_model,
100117
event_emitter=event_emitter,
101118
method_description=operation_model.documentation,
102119
example_prefix=example_prefix,
103120
exclude_input=ignore_params,
104121
resource_action_model=action_model,
105-
include_signature=include_signature
122+
include_signature=include_signature,
106123
)
107124

108125

109-
def document_load_reload_action(section, action_name, resource_name,
110-
event_emitter, load_model, service_model,
111-
include_signature=True):
126+
def document_load_reload_action(
127+
section,
128+
action_name,
129+
resource_name,
130+
event_emitter,
131+
load_model,
132+
service_model,
133+
include_signature=True,
134+
):
112135
"""Documents the resource load action
113136
114137
:param section: The section to write to
@@ -129,20 +152,23 @@ def document_load_reload_action(section, action_name, resource_name,
129152
description = (
130153
'Calls :py:meth:`%s.Client.%s` to update the attributes of the'
131154
' %s resource. Note that the load and reload methods are '
132-
'the same method and can be used interchangeably.' % (
155+
'the same method and can be used interchangeably.'
156+
% (
133157
get_service_module_name(service_model),
134158
xform_name(load_model.request.operation),
135-
resource_name)
159+
resource_name,
160+
)
136161
)
137162
example_resource_name = xform_name(resource_name)
138163
if service_model.service_name == resource_name:
139164
example_resource_name = resource_name
140-
example_prefix = '%s.%s' % (example_resource_name, action_name)
165+
example_prefix = f'{example_resource_name}.{action_name}'
141166
document_model_driven_method(
142-
section=section, method_name=action_name,
167+
section=section,
168+
method_name=action_name,
143169
operation_model=OperationModel({}, service_model),
144170
event_emitter=event_emitter,
145171
method_description=description,
146172
example_prefix=example_prefix,
147-
include_signature=include_signature
173+
include_signature=include_signature,
148174
)

boto3/docs/attr.py

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,36 @@ class ResourceShapeDocumenter(ResponseParamsDocumenter):
1919
EVENT_NAME = 'resource-shape'
2020

2121

22-
def document_attribute(section, service_name, resource_name, attr_name,
23-
event_emitter, attr_model, include_signature=True):
22+
def document_attribute(
23+
section,
24+
service_name,
25+
resource_name,
26+
attr_name,
27+
event_emitter,
28+
attr_model,
29+
include_signature=True,
30+
):
2431
if include_signature:
2532
section.style.start_sphinx_py_attr(attr_name)
2633
# Note that an attribute may have one, may have many, or may have no
2734
# operations that back the resource's shape. So we just set the
2835
# operation_name to the resource name if we ever to hook in and modify
2936
# a particular attribute.
3037
ResourceShapeDocumenter(
31-
service_name=service_name, operation_name=resource_name,
32-
event_emitter=event_emitter).document_params(
33-
section=section,
34-
shape=attr_model)
38+
service_name=service_name,
39+
operation_name=resource_name,
40+
event_emitter=event_emitter,
41+
).document_params(section=section, shape=attr_model)
3542

3643

37-
def document_identifier(section, resource_name, identifier_model,
38-
include_signature=True):
44+
def document_identifier(
45+
section, resource_name, identifier_model, include_signature=True
46+
):
3947
if include_signature:
4048
section.style.start_sphinx_py_attr(identifier_model.name)
4149
description = get_identifier_description(
42-
resource_name, identifier_model.name)
50+
resource_name, identifier_model.name
51+
)
4352
description = '*(string)* ' + description
4453
section.write(description)
4554

boto3/docs/base.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from botocore.compat import OrderedDict
1414

1515

16-
class BaseDocumenter(object):
16+
class BaseDocumenter:
1717
def __init__(self, resource):
1818
self._resource = resource
1919
self._client = self._resource.meta.client
@@ -24,8 +24,9 @@ def __init__(self, resource):
2424
self._service_docs_name = self._client.__class__.__name__
2525
self.member_map = OrderedDict()
2626
self.represents_service_resource = (
27-
self._service_name == self._resource_name)
27+
self._service_name == self._resource_name
28+
)
2829

2930
@property
3031
def class_name(self):
31-
return '%s.%s' % (self._service_docs_name, self._resource_name)
32+
return f'{self._service_docs_name}.{self._resource_name}'

boto3/docs/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def _add_client_creation_example(self, section):
2222
section.style.new_line()
2323
section.write(
2424
'client = boto3.client(\'{service}\')'.format(
25-
service=self._service_name)
25+
service=self._service_name
26+
)
2627
)
2728
section.style.end_codeblock()

0 commit comments

Comments
 (0)