-
-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
Description
Cannot use asyncmy to connect to a specific server, while aiomysql works.
$ /usr/bin/python3 -m asyncio
...
>>> import aiomysql
>>> c = await aiomysql.connect(...) # works fine
>>> import asyncmy
>>> c = await asyncmy.connect(...)
Traceback (most recent call last):
File "/usr/lib64/python3.12/concurrent/futures/_base.py", line 456, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "<console>", line 1, in <module>
File "asyncmy/connection.pyx", line 1343, in _connect
File "asyncmy/connection.pyx", line 594, in connect
File "asyncmy/connection.pyx", line 572, in asyncmy.connection.Connection.connect
File "asyncmy/connection.pyx", line 787, in _request_authentication
AttributeError: 'Connection' object has no attribute '_auth_plugin_name'. Did you mean: '_auth_plugin_map'?
Code inspection suggests that _request_authentication uses _auth_plugin_name unconditionally:
asyncmy/asyncmy/connection.pyx
Line 787 in 044a4b0
| if self._auth_plugin_name == "": |
... while it's only set if a certain condition is met:
asyncmy/asyncmy/connection.pyx
Line 1013 in 044a4b0
| if self.server_capabilities & PLUGIN_AUTH and len(data) >= i: |
Should it have some default pre-set?
Version: python3-asyncmy-0.2.9-1.fc39.x86_64
Server reports itself as MariaDB, Server version: 5.1.73-log Source distribution.
Metadata
Metadata
Assignees
Labels
No labels