Skip to content
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 #177

Conversation

ziegenberg
Copy link
Contributor

@ziegenberg ziegenberg commented Jun 1, 2021

SUMMARY

Parameters db and passwd are deprecated, using database and password is recommended by the DB-API 2.0.

This MySQL collections support two connectors:

In PyMySQL the change from the short parameter to the new long-form was made with v0.6.7 (and the short forms are kept as an alias for database and password). Warnings will be activated around 2022 (for details, see PyMySQL/PyMySQL#939).

In MySQLdb the change was introduced with v1.3.8 (and the short forms are kept as an alias for database and password).

FIXES #176

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

module_utils

ADDITIONAL INFORMATION

This ought to be a more sensible way than #116.

@ziegenberg ziegenberg force-pushed the 176-change-deprecated-parameter-pw-and-db branch from 16cd98d to 34bcbce Compare June 1, 2021 21:14
@codecov
Copy link

codecov bot commented Jun 1, 2021

Codecov Report

Merging #177 (34bcbce) into main (71b2742) will decrease coverage by 1.13%.
The diff coverage is 22.22%.

❗ Current head 34bcbce differs from pull request most recent head 19d971d. Consider uploading reports for the commit 19d971d to get more accurate results

@@            Coverage Diff             @@
##             main     #177      +/-   ##
==========================================
- Coverage   76.92%   75.80%   -1.13%     
==========================================
  Files          20       20              
  Lines        1794     1810      +16     
  Branches      439      449      +10     
==========================================
- Hits         1380     1372       -8     
- Misses        268      287      +19     
- Partials      146      151       +5     
Impacted Files Coverage Δ
plugins/module_utils/mysql.py 64.64% <22.22%> (-18.49%) ⬇️
plugins/modules/mysql_query.py 86.58% <0.00%> (-2.44%) ⬇️
plugins/modules/mysql_db.py 74.21% <0.00%> (-0.35%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Andersson007
Copy link
Collaborator

@ziegenberg thanks for working on this!

@Jorge-Rodriguez as I remember you implemented very good checks for mysql versions. Maybe you have ideas on implementation?

@Jorge-Rodriguez
Copy link
Contributor

@Andersson007 sure, I can get on that but I'm in the middle of moving, so I can't handle it straight away. I'll give it some thought in the meanwhile

Copy link
Contributor

@Jorge-Rodriguez Jorge-Rodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Andersson007
Copy link
Collaborator

@Jorge-Rodriguez sure, thanks!
@ziegenberg we should make the CI tests green. After that, we can ask our WG leader to review the PR, thanks!
Exception message: module 'MySQLdb' has no attribute '__version__'"

@ziegenberg
Copy link
Contributor Author

I can have a look at it on the weekend

@Andersson007
Copy link
Collaborator

@ziegenberg perfect (no rush)!

@Jorge-Rodriguez
Copy link
Contributor

These changes are dependent on #141

@Andersson007
Copy link
Collaborator

Any updates on the PR? If it's irrelevant, please close it

@Jorge-Rodriguez
Copy link
Contributor

Jorge-Rodriguez commented Jan 22, 2023

The old versions of the database plugins are no longer supported on the collection. So I have removed the conditional checks, leaving only the currently supported parameter names, unconditionally.

@Jorge-Rodriguez Jorge-Rodriguez marked this pull request as ready for review January 23, 2023 10:41
@Andersson007 Andersson007 merged commit 2f151dc into ansible-collections:main Feb 10, 2023
@Andersson007
Copy link
Collaborator

@ziegenberg @Jorge-Rodriguez thanks for the contribution!

@ziegenberg ziegenberg deleted the 176-change-deprecated-parameter-pw-and-db branch April 25, 2023 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

change deprecated parameter pw and db - 2nd try
3 participants