Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No support for the mysql-connector-python library in version 9.0.0 #629

Closed
dtrai2 opened this issue Jul 2, 2024 · 1 comment · Fixed by #688
Closed

No support for the mysql-connector-python library in version 9.0.0 #629

dtrai2 opened this issue Jul 2, 2024 · 1 comment · Fixed by #688
Assignees
Labels
bug Something isn't working

Comments

@dtrai2
Copy link
Collaborator

dtrai2 commented Jul 2, 2024

When using mysql-connector-python in version 9.0.0 logprep is not able to run.

Expected behavior
Logprep runs normally.

Current behavior
A stacktrace is printed during the text execution:

tests/acceptance/test_wineventlog_pseudonymization.py:7: in <module>
    from logprep.util.configuration import Configuration
logprep/util/configuration.py:220: in <module>
    from logprep.factory import Factory
logprep/factory.py:6: in <module>
    from logprep.configuration import Configuration
logprep/configuration.py:6: in <module>
    from logprep.registry import Registry
logprep/registry.py:30: in <module>
    from logprep.processor.generic_adder.processor import GenericAdder
logprep/processor/generic_adder/processor.py:50: in <module>
    from logprep.processor.generic_adder.mysql_connector import MySQLConnector
logprep/processor/generic_adder/mysql_connector.py:13: in <module>
    class MySQLConnector:
logprep/processor/generic_adder/mysql_connector.py:36: in MySQLConnector
    _cursor: mysql.connector.connection.CursorBase
E   AttributeError: module 'mysql.connector.connection' has no attribute 'CursorBase'

Steps to reproduce
Create a new venv with mysql-connector-python in version 9.0.0 and run the logprep tests

Environment
Logprep version: main
Python version: 3.11

@dtrai2 dtrai2 added the bug Something isn't working label Jul 2, 2024
@ekneg54
Copy link
Collaborator

ekneg54 commented Jul 10, 2024

we should extract this dependency and functionality from logprep. with the provided getter mechanic in combination with the reload_interval it is easy to provide this in an external API. It should't be the responsibility of logprep to provide a database interface for MySQL in the generic_resolver, because if we start with MySQL we have to provide support for all other databases too. That can't be our intention.

@ppcad ppcad self-assigned this Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants