Skip to content

Commit e6c7a7b

Browse files
committed
Drop support for Python 3.6
1 parent 20348b2 commit e6c7a7b

7 files changed

Lines changed: 19 additions & 35 deletions

File tree

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:

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

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)])
@@ -215,7 +198,7 @@ def main():
215198
if py_version in UNSUPPORTED_PYTHON:
216199
unsupported_python_msg = (
217200
"Unsupported Python version detected: Python {}.{}\n"
218-
"To continue using this installer you must use Python 3.6 "
201+
"To continue using this installer you must use Python 3.7 "
219202
"or later.\n"
220203
"For more information see the following blog post: "
221204
"https://aws.amazon.com/blogs/developer/announcing-end-"
@@ -258,10 +241,7 @@ def main():
258241
shutil.rmtree(working_dir)
259242

260243

261-
if GTE_PY37:
262-
create_virtualenv = _create_virtualenv_internal
263-
else:
264-
create_virtualenv = _create_virtualenv_external
244+
create_virtualenv = _create_virtualenv_internal
265245

266246

267247
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)