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

Allow either MySQLdb and PyMySQL and add -s/--socket option #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jhriggs
Copy link

@jhriggs jhriggs commented Apr 29, 2020

There are 3 commits that I left separate in this PR, so you can pick and choose if you like:

  1. The first allows using either MySQLdb or the less "heavy" PyMySQL.
  2. The second allows argparse help and errors to display. (They are currently unavailable/hidden due to npyscreen.)
  3. The third, e5b7da3, is purely PEP8 formatting to make flake8 happy, which you may not desire.

- Try to import MySQLdb first and fall back to PyMySQL.
- Add -s/--socket option to use UNIX sockets in addition to TCP.
- No reason to call get_pa_cursor() with the same arguments every time.
Copy link

@pondix pondix left a comment

Choose a reason for hiding this comment

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

Looks really good, all positive improvements.

All that remains is to test and merge if OK.

Thank you very much, this is great work!

@jtomaszon
Copy link

Probably a good approach will be leave the flake8 commit out of a feature request, so you can review just the changes and not ALL as flake8 touch every line.

@bonki
Copy link

bonki commented Jun 9, 2022

Friendly ping, can this be merged?

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.

4 participants