We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 939f268 commit 48e97c3Copy full SHA for 48e97c3
lib/mysql/connector/__init__.py
@@ -47,8 +47,10 @@
47
HAVE_DNSPYTHON = True
48
49
import random
50
+import warnings
51
52
from . import version
53
+from .catch23 import PY2
54
from .connection import MySQLConnection
55
from .constants import DEFAULT_CONFIGURATION
56
from .errors import ( # pylint: disable=W0622
@@ -64,6 +66,11 @@
64
66
apilevel, threadsafety, paramstyle)
65
67
from .optionfiles import read_option_files
68
69
+if PY2:
70
+ warnings.warn("MySQL Connector/Python will drop support for Python 2.7 in "
71
+ "release 8.0.24. Please upgrade your Python as Python 2.7 "
72
+ "won't work after this release", category=DeprecationWarning)
73
+
74
_CONNECTION_POOLS = {}
75
76
ERROR_NO_CEXT = "MySQL Connector/Python C Extension not available"
0 commit comments