Skip to content

Commit

Permalink
Add upcoming deprecation warning for Python 3.7 (#3773)
Browse files Browse the repository at this point in the history
  • Loading branch information
nateprewitt committed Jul 6, 2023
1 parent 94ffa45 commit 2419f0c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
11 changes: 3 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,9 @@ Boto (pronounced boh-toh) was named after the fresh water dolphin native to the
Notices
-------

On 2021-01-15, deprecation for Python 2.7 was announced and support was dropped
on 2021-07-15. To avoid disruption, customers using Boto3 on Python 2.7 may
need to upgrade their version of Python or pin the version of Boto3. For
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/>`__.

On 2022-05-30, support for Python 3.6 was ended. 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.
On 2023-12-13, support for Python 3.7 will end for Boto3. This follows the
Python Software Foundation `end of support <https://peps.python.org/pep-0537/#lifespan>`__
for the runtime which occurred on 2023-06-27.
For more information, see this `blog post <https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/>`__.

.. _boto: https://docs.pythonboto.org/
Expand Down
8 changes: 4 additions & 4 deletions boto3/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ def filter_python_deprecation_warnings():

def _warn_deprecated_python():
"""Use this template for future deprecation campaigns as needed."""
py_36_params = {
'date': 'May 30, 2022',
py_37_params = {
'date': 'December 13, 2023',
'blog_link': (
'https://aws.amazon.com/blogs/developer/'
'python-support-policy-updates-for-aws-sdks-and-tools/'
)
}
deprecated_versions = {
# Example template for future deprecations
# (3, 6): py_36_params,
(3, 7): py_37_params,
}
py_version = sys.version_info[:2]

Expand All @@ -76,7 +76,7 @@ def _warn_deprecated_python():
warning = (
"Boto3 will no longer support Python {}.{} "
"starting {}. To continue receiving service updates, "
"bug fixes, and security updates please upgrade to Python 3.7 or "
"bug fixes, and security updates please upgrade to Python 3.8 or "
"later. More information can be found here: {}"
).format(py_version[0], py_version[1], params['date'], params['blog_link'])
warnings.warn(warning, PythonDeprecationWarning)
6 changes: 3 additions & 3 deletions docs/source/guide/migrationpy3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ module) and Boto3 (which implements the API functionality and higher-level featu

Timeline
--------
Going forward, all projects using Boto3 need to transition to Python 3.7 or later. Boto3 and
Botocore ended support for Python 3.4 and 3.5 on Feb 21, 2021, and support for Python 2.7
Going forward, all projects using Boto3 need to transition to Python 3.8 or later. Boto3 and
Botocore will end support for Python 3.7 on December, 13, 2023, and support for Python 2.7
ended July 15, 2021.

Updating your project to use Python 3
-------------------------------------

Before you begin to update your project and environment, make sure you’ve installed or updated to
Python 3.7 or later as described in :ref:`upgrade to Python 3 <quickstart_install_python>`. You can
Python 3.8 or later as described in :ref:`upgrade to Python 3 <quickstart_install_python>`. You can
get Python from the `PSF web site <https://www.python.org/downloads>`_ or using your local package
manager.

Expand Down
4 changes: 2 additions & 2 deletions docs/source/guide/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ To use Boto3, you first need to install it and its dependencies.
Install or update Python
~~~~~~~~~~~~~~~~~~~~~~~~

Before installing Boto3, install Python 3.7 or later; support for Python 3.6 and
Before installing Boto3, install Python 3.8 or later; support for Python 3.6 and
earlier is deprecated. After the deprecation date listed for each Python
version, new releases of Boto3 will not include support for that version of
Python. For details, including the deprecation schedule and how to update your
project to use Python 3.7, see :ref:`guide_migration_py3`.
project to use Python 3.8, see :ref:`guide_migration_py3`.

For information about how to get the latest version of Python, see the official `Python
documentation <https://www.python.org/downloads/>`_.
Expand Down

0 comments on commit 2419f0c

Please sign in to comment.