mirror of https://github.com/OpenKMIP/PyKMIP.git
Merge pull request #118 from OpenKMIP/maint/add-py26-deprecation-warning
Adding pending deprecation warning for Python2.6
This commit is contained in:
commit
4c12eb65c6
|
@ -17,6 +17,7 @@ import logging.config
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
import warnings
|
||||||
|
|
||||||
# Dynamically set __version__
|
# Dynamically set __version__
|
||||||
version_path = os.path.join(os.path.dirname(
|
version_path = os.path.join(os.path.dirname(
|
||||||
|
@ -63,3 +64,11 @@ else:
|
||||||
logging.basicConfig()
|
logging.basicConfig()
|
||||||
|
|
||||||
__all__ = ['core', 'demos', 'services']
|
__all__ = ['core', 'demos', 'services']
|
||||||
|
|
||||||
|
if sys.version_info[:2] == (2, 6):
|
||||||
|
warnings.simplefilter("always")
|
||||||
|
warnings.warn(
|
||||||
|
("Please use a newer version of Python (2.7.9+ preferred). PyKMIP "
|
||||||
|
"support for Python 2.6 will be deprecated in the future."),
|
||||||
|
PendingDeprecationWarning)
|
||||||
|
warnings.simplefilter("default")
|
||||||
|
|
Loading…
Reference in New Issue