mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-18 16:31:26 -07:00
Deprecate mysqlclient/MySQLdb connector support (#655)
* Deprecate mysqlclient/MySQLdb connector support * Update README * Put in README that mysqlclient is deprecated
This commit is contained in:
parent
4912f1a41b
commit
83ed4af4e1
5 changed files with 18 additions and 21 deletions
|
@ -154,6 +154,13 @@ def mysql_connect(module, login_user=None, login_password=None, config_file='',
|
|||
db_connection = mysql_driver.connect(autocommit=autocommit, **config)
|
||||
else:
|
||||
# In case of MySQLdb driver
|
||||
|
||||
# Will be deprecated and dropped
|
||||
# https://github.com/ansible-collections/community.mysql/issues/654
|
||||
module.warn('Support of mysqlcline/MySQLdb connector is deprecated. '
|
||||
'We\'ll stop testing against it in collection version 4.0.0 '
|
||||
'and remove the related code in 5.0.0. Use PyMySQL connector instead.')
|
||||
|
||||
if mysql_driver.version_info[0] < 2 or (mysql_driver.version_info[0] == 2 and mysql_driver.version_info[1] < 1):
|
||||
# for MySQLdb < 2.1.0, use 'db' instead of 'database' and 'passwd' instead of 'password'
|
||||
if 'database' in config:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue