2
0
mirror of https://github.com/openkmip/pykmip synced 2026-01-09 12:03:38 +00:00

Add pending deprecation warnings for Python 2.7 and 3.4

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.
This commit is contained in:
Peter Hamilton
2020-02-24 18:20:22 -05:00
committed by Peter Hamilton
parent 43016fef20
commit 5b7cb4f194

View File

@@ -15,6 +15,8 @@
import os
import re
import sys
import warnings
from kmip.core import enums
from kmip.pie import client
@@ -44,3 +46,22 @@ __all__ = [
'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
)