Skip to content

memsql-python doesn't work with newest mysqlclient #20

Closed
@tomasz-at-nira

Description

@tomasz-at-nira

Issue:
There has been a rename of parameters in connect() in mysqlclient
PyMySQL/mysqlclient#513

Installing latest memsql-python in a new python environment pulls latest mysqlclient. Code crashes.

Proposed solution:
Either patch memsql-python or freeze requirement for mysqlclient to use an older version.

Log:

/home/tomasz/.cache/pypoetry/virtualenvs/app-kIoj1aan-py3.8/bin/python /home/tomasz/Desktop/memstore/app/main.py
Traceback (most recent call last):
  File "/home/tomasz/Desktop/memstore/app/main.py", line 15, in <module>
    MemsqlConnector().test_connection()
  File "/home/tomasz/Desktop/memstore/app/mqmsql/connector.py", line 29, in test_connection
    with self.get_connection(db="information_schema") as conn:
  File "/home/tomasz/Desktop/memstore/app/mqmsql/connector.py", line 20, in get_connection
    return database.connect(
  File "/home/tomasz/.cache/pypoetry/virtualenvs/app-kIoj1aan-py3.8/lib/python3.8/site-packages/memsql/common/database.py", line 19, in connect
    return Connection(*args, **kwargs)
  File "/home/tomasz/.cache/pypoetry/virtualenvs/app-kIoj1aan-py3.8/lib/python3.8/site-packages/memsql/common/database.py", line 62, in __init__
    self.reconnect()
  File "/home/tomasz/.cache/pypoetry/virtualenvs/app-kIoj1aan-py3.8/lib/python3.8/site-packages/memsql/common/database.py", line 93, in reconnect
    conn = _mysql.connect(**self._db_args)
TypeError: 'db' is an invalid keyword argument for connect()

Process finished with exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions