GithubHelp home page GithubHelp logo

Comments (2)

melange396 avatar melange396 commented on July 30, 2024

I went looking for places these db packages are actually referenced/used...

pymysql seems vestigial and doesnt appear to be used anywhere, and thus should probably be removed.

In all of our python ( https://github.com/search?q=repo%3Acmu-delphi%2Fdelphi-epidata+%2Fmysql%2F+language%3Apython&type=code ), we really only use mysql-connector/mysql-connector-python aka mysql.connector. This amounts to just the acquisition and test code.

In non-python ( https://github.com/search?q=repo%3Acmu-delphi%2Fdelphi-epidata+%2Fmysql%2F+-language%3Apython&type=code ), the only places we see mysqlclient aka mysqldb are in requirements files and as a 'dialect' in SQLAlchemy DBURIs.

It seems silly to use two different adapters/drivers across this single repository. I was going to suggest settling on using only mysql-connector because it would not require changing code and could be done with a very small diff, but the SQLAlchemy documentation has some scary-sounding commentary on it AND it was mysql-connector that was in play when i noticed the behavior that caused me to file this issue in the first place (see #1356). That makes me think it may be safer in the long run to have all of our stuff use mysqlclient instead. The programming interface for mysqlclient (at a glance) looks fairly similar to what we are already using, so it might be enough to just find and replace
import mysql.connector --> from MySQLdb import _mysql as mysqldb
and then
mysql.connector --> mysqldb
but realistically, all of the usages of the module in our repo should be individually checked for compatibility.

So, at this point, we can either:

  • just remove the one package and update versions for the other two (and leave the other work for a new and separate GH issue)
  • OR remove two packages and update the version for the third, plus make python code changes to consolidate on the third.

from delphi-epidata.

melange396 avatar melange396 commented on July 30, 2024

After all of the SQLAlchemy talk, it occurs to me that its probably worth it to bump its version too. The version we are currently using (1.4.40) is about 1.5y old. There is a new major release, but also very recent maintenance releases to the minor version we are already using. Our uses of the package are fairly simplistic, so it is probably low risk to attempt the major.

from delphi-epidata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.