Skip to content

Commit aed1dd2

Browse files
authored
Remove uneeded code. (#512)
1 parent 14538b2 commit aed1dd2

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

MySQLdb/connections.py

-8
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ class object, used to create cursors (keyword only)
144144
"""
145145
from MySQLdb.constants import CLIENT, FIELD_TYPE
146146
from MySQLdb.converters import conversions, _bytes_or_str
147-
from weakref import proxy
148147

149148
kwargs2 = kwargs.copy()
150149

@@ -214,13 +213,6 @@ class object, used to create cursors (keyword only)
214213
# MySQL may return JSON with charset==binary.
215214
self.converter[FIELD_TYPE.JSON] = str
216215

217-
db = proxy(self)
218-
219-
def unicode_literal(u, dummy=None):
220-
return db.string_literal(u.encode(db.encoding))
221-
222-
self.encoders[str] = unicode_literal
223-
224216
self._transactional = self.server_capabilities & CLIENT.TRANSACTIONS
225217
if self._transactional:
226218
if autocommit is not None:

0 commit comments

Comments
 (0)