diff --git a/MySQLdb/connections.py b/MySQLdb/connections.py index 482b12f0..20d8c0b0 100644 --- a/MySQLdb/connections.py +++ b/MySQLdb/connections.py @@ -144,7 +144,6 @@ class object, used to create cursors (keyword only) """ from MySQLdb.constants import CLIENT, FIELD_TYPE from MySQLdb.converters import conversions, _bytes_or_str - from weakref import proxy kwargs2 = kwargs.copy() @@ -223,13 +222,6 @@ class object, used to create cursors (keyword only) # MySQL may return JSON with charset==binary. self.converter[FIELD_TYPE.JSON] = str - db = proxy(self) - - def unicode_literal(u, dummy=None): - return db.string_literal(u.encode(db.encoding)) - - self.encoders[str] = unicode_literal - self._transactional = self.server_capabilities & CLIENT.TRANSACTIONS if self._transactional: if autocommit is not None: