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

Rewrite MySQL/python interface #4039

Closed
davidpanderson opened this issue Sep 28, 2020 · 2 comments · Fixed by #4043
Closed

Rewrite MySQL/python interface #4039

davidpanderson opened this issue Sep 28, 2020 · 2 comments · Fixed by #4043

Comments

@davidpanderson
Copy link
Contributor

The python scripts that access the DB (create_project, update_versions) use a module called MySQLdb
(these scripts were written in 2003; that was the only option at that point).
MySQLdb doesn't work with Python 3 and as far as I can tell is unlikely to in the future.

So we need to use something else. I think the best candidate is Mysql Connector/Python:
https://dev.mysql.com/doc/connector-python/en/

The other issue is that the DB interface code (py/Boinc/db_base.py)
was largely borrowed from a class project in an undergrad DB class or something.
It has fancy logic to cache DB rows and to auto-fetch rows pointed to from other tables.
We don't need any of this stuff; it complicates the code and should be tossed.

@lfield
Copy link
Contributor

lfield commented Sep 29, 2020

One thing to consider is whether we would like to go all the way use a Web development framework such as Django or Flask.

@davidpanderson
Copy link
Contributor Author

Fixed in #4043. Turns out the the "mysqlclient" module (for Python 3) has the same interface as the MySQLDB module.

@AenBleidd AenBleidd linked a pull request Oct 1, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants