Skip to content

Conversation

@yauhen-sobaleu
Copy link

Summary

This PR deprecates asyncio_timeout library in favour of native asyncio.wait_for functionality.

asyncio_timeout library is deprecated and throws an error when using with Python 3.11

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <aiosocketpool.AsyncTcpConnector object at 0x10cce5350>

    async def connect(self) -> bool:
        """Establish a connection to the remote host.
    
        Returns
        -------
        `True` if the connection was successfully established, raises if not.
        """
        if __debug__:
            logging.debug(f"AsyncTcpConnector: new connection to {self.host}:{self.port}")
    
        loop = asyncio.get_event_loop()
    
>       with async_timeout.timeout(self.timeout):
E       TypeError: 'Timeout' object does not support the context manager protocol

Resolves: #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError: 'Timeout' object does not support the context manager protocol

1 participant