diff --git a/aioamqp/__init__.py b/aioamqp/__init__.py index 3e67936..030e7db 100644 --- a/aioamqp/__init__.py +++ b/aioamqp/__init__.py @@ -10,7 +10,7 @@ async def connect(host='localhost', port=None, login='guest', password='guest', - virtualhost='/', ssl=None, login_method='AMQPLAIN', insist=False, + virtualhost='/', ssl=None, login_method='PLAIN', insist=False, protocol_factory=AmqpProtocol, *, loop=None, **kwargs): """Convenient method to connect to an AMQP broker @@ -69,7 +69,7 @@ async def connect(host='localhost', port=None, login='guest', password='guest', async def from_url( - url, login_method='AMQPLAIN', insist=False, protocol_factory=AmqpProtocol, **kwargs): + url, login_method='PLAIN', insist=False, protocol_factory=AmqpProtocol, **kwargs): """ Connect to the AMQP using a single url parameter and return the client. For instance: diff --git a/aioamqp/protocol.py b/aioamqp/protocol.py index ddf1285..e111dea 100644 --- a/aioamqp/protocol.py +++ b/aioamqp/protocol.py @@ -188,7 +188,7 @@ async def start_connection(self, host, port, login, password, virtualhost, ssl=F """ if login_method != 'PLAIN': - logger.warning('only PLAIN login_method is supported, falling back to AMQPLAIN') + logger.warning('login_method %s is not supported, falling back to PLAIN', login_method) self._stream_writer.write(amqp_constants.PROTOCOL_HEADER) diff --git a/aioamqp/tests/test_protocol.py b/aioamqp/tests/test_protocol.py index 766a5d9..80d4187 100644 --- a/aioamqp/tests/test_protocol.py +++ b/aioamqp/tests/test_protocol.py @@ -55,7 +55,7 @@ async def func(*x, **y): connect.assert_called_once_with( insist=False, password='pass', - login_method='AMQPLAIN', + login_method='PLAIN', login='tom', host='example.com', protocol_factory=AmqpProtocol, @@ -74,7 +74,7 @@ async def func(*x, **y): connect.assert_called_once_with( insist=False, password='pass', - login_method='AMQPLAIN', + login_method='PLAIN', ssl=ssl_context, login='tom', host='example.com', diff --git a/docs/changelog.rst b/docs/changelog.rst index 0939ca4..bd2822a 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,6 +4,8 @@ Changelog Next release ------------ + * Fix annoying auth method warning because of a wrong defined default argument (closes #214). + Aioamqp 0.14.0 --------------