Skip to content

Commit de44ff0

Browse files
committed
Remove waiter option
1 parent f04067f commit de44ff0

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

HISTORY.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Release: TBD
1616
* Remove context manager API from Connection. It was for transaction.
1717
New context manager API for closing connection will be added in future version.
1818

19+
* Remove ``waiter`` option from Connection.
1920

2021
======================
2122
What's new in 1.3.14

MySQLdb/connections.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ class Connection(_mysql.connection):
5050
"""MySQL Database Connection Object"""
5151

5252
default_cursor = cursors.Cursor
53-
waiter = None
5453

5554
def __init__(self, *args, **kwargs):
5655
"""
@@ -173,11 +172,6 @@ class object, used to create cursors (keyword only)
173172

174173
# PEP-249 requires autocommit to be initially off
175174
autocommit = kwargs2.pop('autocommit', False)
176-
self.waiter = kwargs2.pop('waiter', None)
177-
if self.waiter:
178-
from warnings import warn
179-
warn("waiter is deprecated and will be removed in 1.4.",
180-
DeprecationWarning, 2)
181175

182176
super(Connection, self).__init__(*args, **kwargs2)
183177
self.cursorclass = cursorclass
@@ -246,12 +240,7 @@ def query(self, query):
246240
# Since _mysql releases GIL while querying, we need immutable buffer.
247241
if isinstance(query, bytearray):
248242
query = bytes(query)
249-
if self.waiter is not None:
250-
self.send_query(query)
251-
self.waiter(self.fileno())
252-
self.read_query_result()
253-
else:
254-
_mysql.connection.query(self, query)
243+
_mysql.connection.query(self, query)
255244

256245
def _bytes_literal(self, bs):
257246
assert isinstance(bs, (bytes, bytearray))

0 commit comments

Comments
 (0)