Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated loop argument for python 3.10 #631

Merged
merged 2 commits into from
Nov 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changes
-------

0.0.22 (2021-11-11)
^^^^^^^^^^^^^^^^^^^

* Support python 3.10 #505


0.0.21 (2020-11-26)
^^^^^^^^^^^^^^^^^^^

Expand Down
8 changes: 3 additions & 5 deletions aiomysql/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,7 @@ async def _connect(self):
self._reader, self._writer = await \
asyncio.wait_for(
asyncio.open_unix_connection(
self._unix_socket,
loop=self._loop),
self._unix_socket),
timeout=self.connect_timeout)
self.host_info = "Localhost via UNIX socket: " + \
self._unix_socket
Expand All @@ -487,8 +486,7 @@ async def _connect(self):
asyncio.wait_for(
asyncio.open_connection(
self._host,
self._port,
loop=self._loop),
self._port),
timeout=self.connect_timeout)
self._set_keep_alive()
self.host_info = "socket %s:%d" % (self._host, self._port)
Expand Down Expand Up @@ -706,7 +704,7 @@ async def _request_authentication(self):
# open_connection will cause it to negotiate TLS on an existing
# connection not initiate a new one.
self._reader, self._writer = await asyncio.open_connection(
sock=raw_sock, ssl=self._ssl_context, loop=self._loop,
sock=raw_sock, ssl=self._ssl_context,
server_hostname=self._host
)

Expand Down
2 changes: 1 addition & 1 deletion aiomysql/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, minsize, maxsize, echo, pool_recycle, loop, **kwargs):
self._conn_kwargs = kwargs
self._acquiring = 0
self._free = collections.deque(maxlen=maxsize)
self._cond = asyncio.Condition(loop=loop)
self._cond = asyncio.Condition()
self._used = set()
self._terminated = set()
self._closing = False
Expand Down
2 changes: 1 addition & 1 deletion tests/_testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def run_until_complete(fun):
def wrapper(test, *args, **kw):
loop = test.loop
ret = loop.run_until_complete(
asyncio.wait_for(fun(test, *args, **kw), 15, loop=loop))
asyncio.wait_for(fun(test, *args, **kw), 15))
return ret
return wrapper

Expand Down