long2ice / asyncmy

A fast asyncio MySQL/MariaDB driver with replication protocol support
https://github.com/long2ice/asyncmy
Apache License 2.0
264 stars 32 forks source link

Fails on 3.10 - invalid argument loop #15

Closed pds2208 closed 3 years ago

pds2208 commented 3 years ago

Python 3.10 has removed the use of the loop argument in async io.

The issue is in line 512 and 522 in connection.pyx where it passes in the loop loop=loop. Running on 3.10 and later can be determined by:

use_loop = True if sys.version_info < (3, 10) else False

and this can be used to decide whether to pass in the loop parameter or not.

long2ice commented 3 years ago

Fixed