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

Commit c64915b

Browse filesBrowse files
authored
Remove context interface from Connector (PyMySQL#295)
1 parent 0d7fcc2 commit c64915b
Copy full SHA for c64915b

File tree

Expand file treeCollapse file tree

1 file changed

+0
-14
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-14
lines changed

‎MySQLdb/connections.py

Copy file name to clipboardExpand all lines: MySQLdb/connections.py
-14Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -253,20 +253,6 @@ def query(self, query):
253253
else:
254254
_mysql.connection.query(self, query)
255255

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-
270256
def _bytes_literal(self, bs):
271257
assert isinstance(bs, (bytes, bytearray))
272258
x = self.string_literal(bs) # x is escaped and quoted bytes

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.