We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d7fcc2 commit c64915bCopy full SHA for c64915b
MySQLdb/connections.py
@@ -253,20 +253,6 @@ def query(self, query):
253
else:
254
_mysql.connection.query(self, query)
255
256
- def __enter__(self):
257
- from warnings import warn
258
- warn("context interface will be changed. Use explicit conn.commit() or conn.rollback().",
259
- DeprecationWarning, 2)
260
- if self.get_autocommit():
261
- self.query("BEGIN")
262
- return self.cursor()
263
-
264
- def __exit__(self, exc, value, tb):
265
- if exc:
266
- self.rollback()
267
- else:
268
- self.commit()
269
270
def _bytes_literal(self, bs):
271
assert isinstance(bs, (bytes, bytearray))
272
x = self.string_literal(bs) # x is escaped and quoted bytes
0 commit comments