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
Crash of cursor.execute() when passing mapping as args in 1.4.0. #323
Comments
Encoding diff --git a/MySQLdb/cursors.py b/MySQLdb/cursors.py
index b8c0d88..e612f1a 100644
--- a/MySQLdb/cursors.py
+++ b/MySQLdb/cursors.py
@@ -181,7 +181,7 @@ class BaseCursor(object):
if args is not None:
if isinstance(args, dict):
- args = dict((key, db.literal(item)) for key, item in args.items())
+ args = {key.encode(db.encoding): db.literal(item) for key, item in args.items()}
else:
args = tuple(map(db.literal, args))
try: |
This comment has been minimized.
This comment has been minimized.
Just missed.
I'm not follow semver strictly. Especially, many projects drop old Pyhton support without increasing major version. Django 2.1 dropped Python 3.4 support too. |
@methane Many thanks for the new release 🍾 🎉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the Django's test suite we encounter issues with
mysqliclient==1.4.0
.cursor.execute()
crashes when passing mapping in args, e.g.Stacktrace:
It is probably related with 5e8eeac.
See test failure.
The text was updated successfully, but these errors were encountered: