-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change deprecated parameter pw and db #116
change deprecated parameter pw and db #116
Conversation
Codecov Report
@@ Coverage Diff @@
## main #116 +/- ##
=======================================
Coverage 75.75% 75.75%
=======================================
Files 12 12
Lines 1712 1712
Branches 438 438
=======================================
Hits 1297 1297
Misses 269 269
Partials 146 146
Continue to review full report at Codecov.
|
@ziegenberg hi, thanks for the PR!
https://dev.mysql.com/doc/connector-python/en/connector-python-connectargs.html also doesn't recommend to use @bmalynovytch @Jorge-Rodriguez what do you think? As far as i know we test against both pymysql and mysqldb and the tests seem to be green. |
@Andersson007 changelog fragment added. |
@ziegenberg thanks! BTW don't worry about codecov |
Let's wait for the folks opinion |
@ziegenberg I'm worried about the backwards compatibility of this change. Do you have the version numbers when these options were deprecated? |
It was introduced into PyMySQL with this PR on Jun 6, 2014: PyMySQL/PyMySQL#247 |
@ziegenberg I'm afraid this change breaks the compatibility with MySQLdb connector that still uses the parameter names deprecated in pymysql, as seen here But then, the tests pass, so it must be an issue with MySQLdb's documentation, and since we're testing all the connector versions that we support, I suppose it's all good. |
@ziegenberg thanks for the PR! |
@Jorge-Rodriguez in MySQLdb they also have |
Ah, they already have updated the docs in their main branch. See this commit PyMySQL/mysqlclient@fa25358 |
I am seeing the following error due to this change:
The remote is using |
Switching to PyMySQL fixed things for me, but looks like backwards compatibility was broken with MySQLdb. |
I'm not sure if MySQL-python-1.2.5 is a supported version of this collection? It was released in 2014. |
As of now, only MySQLdb version 2 is supported. |
Ok that's fine, but it might be wise to update the docs accordingly. |
You're very correct about that. And it's actually planned, along with the list of supported server versions. |
Hi, |
Is that CentOS 7? |
|
or 2) quick patch like "if this error occurs, use |
Let's revert and consider a more seamless approach to reimplement it |
@ziegenberg could you check what was the version of MySQLdb that introduced the new database and password keywords? |
A quick check brought up that it might be v1.3.8 in 2016. I'll check thoroughly when I'm back at my desk. Currently only on a mobile. |
Reverted with #153. will try to release today. Thanks everyone for collaborating! |
Released:) Who wants to handle it gracefully now, welcome:) |
Available on galaxy https://galaxy.ansible.com/community/mysql. How to install from galaxy, refer to https://galaxy.ansible.com/community/mysql, or wait for the next Ansible package release. |
@ziegenberg hi, would you like to continue working on this? |
I can give it another try. But first, I want to say sorry for the disruption my contribution has caused. Before implementing this, I guess we need to sort out the supported versions of the connectors. And fix the CI accordingly. I think this should go into a separate PR beforehand. |
Don't worry about it much, this happens to all of us from time to time (for example, I broke and am breaking stuff a lot but it gives valuable experience). It's normal. Now we know that we should be careful about driver versions even if they seem to be absolutely obsolete.
Sounds very sensible. @ziegenberg feel free to create related issues / PRs and ask if there are any questions on your mind. Thanks! |
@ziegenberg I'm working on a PR tackling CI versions, you can keep an eye on #163 |
I've created #176 to track the discussion of changing deprecated parameter pw and db. |
SUMMARY
Parameter
db
andpassed
are deprecated in PyMySQL since v1.0.0 and are kept as an alias fordatabase
andpassword
. Warnings will be activated around 2022 (for details see PyMySQL/PyMySQL#939).ISSUE TYPE
COMPONENT NAME
module_utils
ADDITIONAL INFORMATION