Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix Cursor.executemany created many circular references #375

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

Merged
merged 2 commits into from
Aug 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions 11 MySQLdb/cursors.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,17 @@ def ensure_bytes(x):
return x

if isinstance(args, (tuple, list)):
return tuple(literal(ensure_bytes(arg)) for arg in args)
ret = tuple(literal(ensure_bytes(arg)) for arg in args)
elif isinstance(args, dict):
return {ensure_bytes(key): literal(ensure_bytes(val))
for (key, val) in args.items()}
ret = {ensure_bytes(key): literal(ensure_bytes(val))
for (key, val) in args.items()}
else:
# If it's not a dictionary let's try escaping it anyways.
# Worst case it will throw a Value error
return literal(ensure_bytes(args))
ret = literal(ensure_bytes(args))

ensure_bytes = None # break circular reference
return ret

def _check_executed(self):
if not self._executed:
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.