Skip to content

Commit 44f2b7d

Browse files
authored
Drop support for Python 3.6 (#6990)
1 parent f38cb39 commit 44f2b7d

File tree

9 files changed

+21
-37
lines changed

9 files changed

+21
-37
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"type": "feature",
3+
"category": "Python",
4+
"description": "Dropped support for Python 3.6"
5+
}

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
python-version: [3.6, 3.7, 3.8, 3.9, 3.10-dev]
15+
python-version: ["3.7", "3.8", "3.9", "3.10"]
1616
os: [ubuntu-latest, macOS-latest, windows-latest]
1717

1818
steps:

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The list below are guidelines to use when submitting pull requests. These are th
2121
- The SDK is released under the [Apache license](http://aws.amazon.com/apache2.0/). Any code you submit will be released under that license.
2222
- We maintain a high percentage of code coverage in our unit tests. As a general rule of thumb, code changes should not lower the overall code coverage percentage for the project. In practice, this means that **every bug fix and feature addition should include tests.**
2323
- Code should follow [pep8](https://www.python.org/dev/peps/pep-0008/), although if you are modifying an existing module, it is more important for the code to be consistent if there are any discrepancies. Using [`flake8`](https://flake8.pycqa.org/en/latest/) can assist in identifying `pep8` compliance issues.
24-
- Code must work on `python3.6` and higher.
24+
- Code must work on `python3.7` and higher.
2525
- The AWS CLI is cross platform and code must work on at least Linux, Windows, and Mac OS X. Avoid platform specific behavior.
2626
- If you would like to implement support for a significant feature that is not yet available in the AWS CLI, please talk to us beforehand to avoid any duplication of effort. You can file an [issue](https://github.com/aws/aws-cli/issues) to discuss the feature request further.
2727

README.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Requirements
2626

2727
The aws-cli package works on Python versions:
2828

29-
- 3.6.x and greater
3029
- 3.7.x and greater
3130
- 3.8.x and greater
3231
- 3.9.x and greater
@@ -40,7 +39,7 @@ on 2021-07-15. To avoid disruption, customers using the AWS CLI on Python 2.7 ma
4039
need to upgrade their version of Python or pin the version of the AWS CLI. For
4140
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/>`__.
4241

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

UPGRADE_PY3.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ v1. You can upgrade to the AWS CLI v2 to avoid these deprecations in the future.
1515
----
1616
## Timeline
1717

18-
Going forward, customers using the CLI v1 should transition to using Python 3, with Python 3.6 becoming
18+
Going forward, customers using the CLI v1 should transition to using Python 3, with Python 3.7 becoming
1919
the minimum by the end of the transition. The deprecation dates for the affected versions of Python are:
2020

2121
|Python version|Deprecation date|
2222
|--------------|----------------|
2323
| Python 2.7| 7/15/2021|
2424
| Python 3.4 and 3.5| 2/1/2021|
25+
| Python 3.6| 5/30/2022|
2526

2627
## Impact on the AWS CLI
2728

@@ -47,7 +48,7 @@ $ aws --version
4748
aws-cli/1.18.191 Python/2.7.18 Darwin/19.6.0 botocore/1.19.31
4849
```
4950

50-
If the second portion of the version string, starting with **Python/** isn’t Python/3.6.x
51+
If the second portion of the version string, starting with **Python/** isn’t Python/3.7.x
5152
or higher, you should review the options below.
5253

5354
### Installing CLI with Python 3
@@ -60,7 +61,7 @@ Otherwise, upgrading Python versions isn’t difficult.
6061

6162
1. To begin, uninstall your existing copy of the AWS CLI. You can find instructions in the
6263
[CLI v1 installation guide](https://docs.aws.amazon.com/cli/latest/userguide/install-linux.html).
63-
2. Now we’ll install Python 3.6 or later. You can get Python from
64+
2. Now we’ll install Python 3.7 or later. You can get Python from
6465
[Python.org](https://www.python.org/downloads) or using your local package manager.
6566
In this example, we’ll use a recent version, Python 3.8.7, to ensure the longest support window.
6667
3. Next, depending on your installation method, the new Python installation should be available at
@@ -87,7 +88,7 @@ $ python awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
8788
7. If you wish, you may verify that the newly installed copy of the AWS CLI tool, **aws**, is
8889
using the correct version of Python. The **aws --version** command reports the **aws** tool's
8990
version number, followed by the version of Python it's running under, then the operating system
90-
version and the version of botocore. As long as the Python version is at least 3.6,
91+
version and the version of botocore. As long as the Python version is at least 3.7,
9192
you're ready to go:
9293
```bash
9394
$ aws --version

doc/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Building The Documentation
33
==========================
44

5-
Before building the documentation, make sure you have Python 3.6,
5+
Before building the documentation, make sure you have Python 3.7,
66
the awscli, and all the necessary dependencies installed. You can
77
install dependencies by using the requirements-docs.txt file at the
88
root of this repo::

scripts/install

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ PACKAGES_DIR = os.path.join(
2020
os.path.dirname(os.path.abspath(__file__)), 'packages')
2121
INSTALL_DIR = os.path.expanduser(os.path.join(
2222
'~', '.local', 'lib', 'aws'))
23-
GTE_PY37 = sys.version_info[:2] >= (3, 7)
2423
UNSUPPORTED_PYTHON = (
2524
(2,6),
2625
(2,7),
2726
(3,3),
2827
(3,4),
2928
(3,5),
29+
(3,6),
3030
)
3131
INSTALL_ARGS = (
3232
'--no-binary :all: --no-build-isolation --no-cache-dir --no-index '
@@ -59,7 +59,8 @@ def _build_deprecations():
5959
}
6060

6161
return {
62-
(3, 6): py_36_params
62+
# Example for future deprecations
63+
# (3, 6): py_36_params
6364
}
6465

6566

@@ -114,24 +115,6 @@ def _create_virtualenv_internal(location, working_dir):
114115
run('%s -m venv %s' % (sys.executable, location))
115116

116117

117-
def _create_virtualenv_external(location, working_dir):
118-
# working_dir is used (generally somewhere in /tmp) so that we
119-
# don't modify the install/packages directories.
120-
with cd(PACKAGES_DIR):
121-
venv = _get_venv_package_tarball('.')
122-
compressed = tarfile.open(venv)
123-
compressed.extractall(path=working_dir)
124-
compressed.close()
125-
with cd(working_dir):
126-
# We know that virtualenv is the only dir in this directory
127-
# so we can listdir()[0] it.
128-
with cd(os.listdir('.')[0]):
129-
run(('%s virtualenv.py --no-download '
130-
'--python %s %s') % (sys.executable,
131-
sys.executable,
132-
location))
133-
134-
135118
def _get_package_tarball(package_dir, package_prefix):
136119
package_filenames = sorted([p for p in os.listdir(package_dir)
137120
if p.startswith(package_prefix)])
@@ -224,7 +207,7 @@ def main():
224207
if py_version in UNSUPPORTED_PYTHON:
225208
unsupported_python_msg = (
226209
"Unsupported Python version detected: Python {}.{}\n"
227-
"To continue using this installer you must use Python 3.6 "
210+
"To continue using this installer you must use Python 3.7 "
228211
"or later.\n"
229212
"For more information see the following blog post: "
230213
"https://aws.amazon.com/blogs/developer/announcing-end-"
@@ -267,10 +250,7 @@ def main():
267250
shutil.rmtree(working_dir)
268251

269252

270-
if GTE_PY37:
271-
create_virtualenv = _create_virtualenv_internal
272-
else:
273-
create_virtualenv = _create_virtualenv_external
253+
create_virtualenv = _create_virtualenv_internal
274254

275255

276256
if __name__ == '__main__':

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def find_version(*file_paths):
5151
install_requires=install_requires,
5252
extras_require={},
5353
license="Apache License 2.0",
54-
python_requires=">= 3.6",
54+
python_requires=">= 3.7",
5555
classifiers=[
5656
'Development Status :: 5 - Production/Stable',
5757
'Intended Audience :: Developers',
@@ -60,7 +60,6 @@ def find_version(*file_paths):
6060
'License :: OSI Approved :: Apache Software License',
6161
'Programming Language :: Python',
6262
'Programming Language :: Python :: 3',
63-
'Programming Language :: Python :: 3.6',
6463
'Programming Language :: Python :: 3.7',
6564
'Programming Language :: Python :: 3.8',
6665
'Programming Language :: Python :: 3.9',

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py36,py37,py38,py39,py310
2+
envlist = py37,py38,py39,py310
33

44
skipsdist = True
55

0 commit comments

Comments
 (0)