UserWarning when importing on Python <3
@@ -30,6 +30,7 @@ import ssl
import sys
import tempfile
import time
+import warnings
import xml.dom
from . import version
@@ -42,6 +43,12 @@ __license__ = "apache2"
__email__ = "amr.hassan@gmail.com"
__version__ = version.__version__
+if sys.version_info < (3,):
+ warnings.warn('You are using pylast with Python 2. '
+ 'Pylast will soon be Python 3 only. '
+ 'More info: https://github.com/pylast/pylast/issues/265',
+ UserWarning)
+
if sys.version_info.major == 2:
import htmlentitydefs
from httplib import HTTPSConnection
