Skip to content

Commit 0c4e35d

Browse files
committed
Python 2 deprecation warning
1 parent 55772e8 commit 0c4e35d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/sasctl/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@
1313
'Cary, NC, USA. All Rights Reserved.'
1414

1515
import logging
16+
import sys
17+
18+
if sys.version_info < (3, ):
19+
from warnings import warn
20+
warn('You are using Python %d.%d which was officially sunset on January 1st, 2020. '
21+
'sasctl will drop support for Python 2 in a future release. '
22+
'Please upgrade to a current version of Python to continue using sasctl.' % (sys.version_info.major, sys.version_info.minor),
23+
UserWarning, 2)
1624

1725
from .core import current_session, delete, get, get_link, post, put, request_link
1826
from .core import RestObj, Session, HTTPError

0 commit comments

Comments
 (0)