-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Fix for error when missing MySQLdb #1728
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
Fix for error when missing MySQLdb #1728
Conversation
@theacodes can you please review :)? Ref 90bfd6a. |
@andrewsg should review, not me. |
Thank you! This is indeed an issue but actually I think we can just use pymysql across the board here, since it's in the requirements file (mysqldb is not) and pymysql is fully compatible with the new Standard runtime (whereas it's not with the Python 2 one). @michaelawyu Can you please switch over to using pymysql here entirely, and also look into why our tests didn't catch the mismatch? |
@iotmani I am afraid there's some misunderstanding here. MySQLdb does not support Python 3; Django 2 however, requires Python 3. The sample Django app does use PyMySQL for default. |
I see... I think we might have a bug in Django 2 in that case (that we'll probably want to handle here nonetheless)... The sample code uses engine Stacktrace I got while trying to deploy the sample app in the first comment:
|
Hi @iotmani, I looked further into this issue; Django 2 requires Thanks again for reporting and fixing the problem :) |
Perfect, thanks @michaelawyu! |
While looking into the cause of an exception:
I noticed the pymysql initialisation was missing, yet it was done for the python2 tutorial settings.py counterpart..
Note that this was noticed even when running the app in "production" on GAE (link for my own error in case it's accessible by Google employees).
So worth looking into if this is the case here: