aredis icon indicating copy to clipboard operation
aredis copied to clipboard

create_unix_connection() got an unexpected keyword argument 'loop' (Port to python 3.10)

Open jeff-alves opened this issue 4 years ago • 1 comments

Checklist

  • Python version: 3.10
  • Using hiredis
  • Using uvloop
  • Branch master

Steps to reproduce

Just try to connect, using python 3.10... raise Exception: create_unix_connection() got an unexpected keyword argument 'loop'

The loop parameter has been removed from most of asyncio‘s high-level API following deprecation in Python 3.8. https://docs.python.org/3.10/library/asyncio-stream.html#asyncio.open_connection https://docs.python.org/3.10/whatsnew/3.10.html#changes-in-the-python-api

Actual behavior

To fix, remove loop from args...

    #file "aredis/connection.py" line 644
    asyncio.open_unix_connection(path=self.path,
                                             ssl=self.ssl_context,
                                             loop=self.loop),

to

    asyncio.open_unix_connection(path=self.path,
                                             ssl=self.ssl_context),

and thats work!

line 595 also needs to remove...

jeff-alves avatar Oct 21 '21 16:10 jeff-alves

@NoneGG any timelines to get it merged?

akalex avatar Feb 10 '22 14:02 akalex