Skip to content

Commit

Permalink
Add pending deprecation warnings for Python 2.7 and 3.4
Browse files Browse the repository at this point in the history
This change adds pending deprecation warnings for both Python 2.7
and 3.4. Both of these Python versions have reached end-of-life
and no longer receive security updates. Future versions of PyKMIP
will drop support for both of these Python versions.
  • Loading branch information
PeterHamilton committed Feb 25, 2020
1 parent 43016fe commit 5b7cb4f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions kmip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

import os
import re
import sys
import warnings

from kmip.core import enums
from kmip.pie import client
Expand Down Expand Up @@ -44,3 +46,22 @@
'objects',
'services'
]


if sys.version_info[:2] == (2, 7):
warnings.warn(
(
"PyKMIP will drop support for Python 2.7 in a future release. "
"Please upgrade to a newer version of Python (3.5+ preferred)."
),
PendingDeprecationWarning
)

if sys.version_info[:2] == (3, 4):
warnings.warn(
(
"PyKMIP will drop support for Python 3.4 in a future release. "
"Please upgrade to a newer version of Python (3.5+ preferred)."
),
PendingDeprecationWarning
)

0 comments on commit 5b7cb4f

Please sign in to comment.