Skip to content

Commit

Permalink
Fixes #437 - Announce deprecation of py34 support on 2020-01-01 and r…
Browse files Browse the repository at this point in the history
…aise PendingDeprecationWarning
  • Loading branch information
jantman committed Oct 31, 2019
1 parent 59d08d8 commit d7662ad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Expand Up @@ -22,6 +22,8 @@ Unreleased Changes
* `Issue #441 <https://github.com/jantman/awslimitchecker/issues/441>`_ - Fix critical bug where awslimitchecker would die with an unhandled ``botocore.exceptions.ParamValidationError`` exception in accounts that have Trusted Advisor but do not have a "Service Limits" check in the "performance" category.
* `Issue #439 <https://github.com/jantman/awslimitchecker/issues/439>`_ - Fix unhandled exception in CloudTrail service when attempting to call ``GetEventSelectors`` on an Organization trail. When calling ``DescribeTrails``, we will now pass ``includeShadowTrails`` as False, to not include replications of trails in different regions or organization trails in member accounts (relevant `API documentation <https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_DescribeTrails.html>`_).
* `Issue #438 <https://github.com/jantman/awslimitchecker/issues/438>`_ - Per `PEP 373 <https://www.python.org/dev/peps/pep-0373/>`__, Python 2.7 will officially end support on January 1, 2020. As such, and in keeping with reasoning explained at `python3statement.org <https://python3statement.org/>`__, awslimitchecker will **stop supporting and testing against Python 2.7** on January 1, 2020. At that point, all new versions will be free to use Python features introduced in 3.5. As of this version, a `PendingDeprecationWarning <https://docs.python.org/3/library/exceptions.html#PendingDeprecationWarning>`__ will be emitted when running awslimitchecker under Python 2.7.
* `Issue #437 <https://github.com/jantman/awslimitchecker/issues/437>`_ - Per `PEP 429 <https://www.python.org/dev/peps/pep-0429/>`_, Python 3.4 reached end-of-life on March 18, 2019 and is now officially retired. Add a ``PendingDeprecationWarning`` for users running under this version, announcing that support for Python 3.4 will be removed on January 1, 2020.
* In following with the above two issues, raise a ``DeprecationWarning`` when running on any Python2 version prior to 2.7 or any Python3 version prior to 3.4, in accorance with the `published end-of-life dates of those versions <https://devguide.python.org/devcycle/#end-of-life-branches>`_.

New EC2 vCPU Limits
+++++++++++++++++++
Expand Down
10 changes: 10 additions & 0 deletions awslimitchecker/checker.py
Expand Up @@ -209,6 +209,16 @@ def _check_python_version(self):
'for further details.',
PendingDeprecationWarning
)
elif sys.version_info[:2] == (3, 4): # nocoverage
warnings.warn(
'awslimitchecker has detected that it is running under Python '
'3.4. This will no longer be supported as of January 1, 2020. '
'Please upgrade to Python 3.5 or newer. Please see the '
'changelog for awslimitchecker version 8.0.0 at <https://'
'awslimitchecker.readthedocs.io/en/latest/changes.html>'
'for further details.',
PendingDeprecationWarning
)
elif (
sys.version_info[0] < 3 or
sys.version_info[0] == 3 and sys.version_info[1] < 4
Expand Down

0 comments on commit d7662ad

Please sign in to comment.