Skip to content

Commit 90363fa

Browse files
committed
Add deprecation warning for py35.
1 parent 7d9af50 commit 90363fa

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

newrelic/config.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import sys
1717
import logging
1818
import traceback
19+
import warnings
1920

2021
try:
2122
import ConfigParser
@@ -2755,6 +2756,14 @@ def _setup_agent_console():
27552756
def initialize(config_file=None, environment=None, ignore_errors=None,
27562757
log_file=None, log_level=None):
27572758

2759+
version_info = sys.version_info[:2]
2760+
if version_info == (3, 5):
2761+
warnings.warn('A future version of the newrelic package will drop '
2762+
'support for Python 3.5. Please upgrade your version of '
2763+
'Python.',
2764+
DeprecationWarning,
2765+
stacklevel=2)
2766+
27582767
if config_file is None:
27592768
config_file = os.environ.get('NEW_RELIC_CONFIG_FILE', None)
27602769

0 commit comments

Comments
 (0)