Yes I agree with you. It’s the core layer which I plan to use as it takes raw queries. One reason I like and recommend sqlalchemy is that it does not try to be another query language.
I have opened a PR. (View on Github)
I have made progress. Apparently, there was still an exiting import from mysqldb which was causing the problem. Now, the failure is in
bench reinstall --yes. It says
pymysql.err.InternalError: (1054, u"Unknown column 'content_hash' in 'field list'")
My understanding, Problem while inserting File DocType.
content_hash is a field on File DocType
I found the problem. PyMySQL is not quite the drop-in replacement for MySQLdb it should be. There’s quite a lot of differences which is causing the bumps. For example, exceptions that were thrown as
MySQLdb.OperationalError are thrown in pymysql as
pymysql.InternalError. After going through the code, I discovered that this is the exact cause of the problem as
DbTable.validate looks for error -1054 in
OperationalError while I had changed it to
pymysql.OperationalError. I have pushed the fix to upstream. I’m presently trying to change all such occurrences.