Mic92 / python-mpd2

Python library which provides a client interface for the Music Player Daemon.
GNU Lesser General Public License v3.0
352 stars 119 forks source link

asyncio client doesn't work with Python 3.10 #178

Closed Velaron closed 3 years ago

Velaron commented 3 years ago

File "C:\Users\Velaron\AppData\Local\Programs\Python\Python310\lib\site-packages\mpd\asyncio.py", line 195, in connect r, w = await asyncio.open_connection(host, port, loop=loop) File "C:\Users\Velaron\AppData\Local\Programs\Python\Python310\lib\asyncio\streams.py", line 47, in open_connection transport, _ = await loop.create_connection( TypeError: BaseEventLoop.create_connection() got an unexpected keyword argument 'loop'

Mic92 commented 3 years ago

@chrysn or @mweinelt maybe?

chrysn commented 3 years ago

Yeah, I'm more and more resenting Python's API versioning policy (and how the deprecations don't get noticed until someone actually runs things with the version in which it's dropped). But enough of the rant, fixes are here and tests now pass too.

mweinelt commented 3 years ago

The loop deprecation was already part of 3.9.7, which we had to roll back (in NixOS) due to too much breakages in libraries everywhere. So, yeah, the deprecation policy is weird at best.