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

Cassandra storage not compatible with Python 3.12 #236

Open
ekzhu opened this issue Mar 11, 2024 · 5 comments
Open

Cassandra storage not compatible with Python 3.12 #236

ekzhu opened this issue Mar 11, 2024 · 5 comments

Comments

@ekzhu
Copy link
Owner

ekzhu commented Mar 11, 2024

When running in Python 3.12, get the following error:

datasketch/__init__.py:4: in <module>
    from datasketch.lsh import MinHashLSH
datasketch/lsh.py:7: in <module>
    from datasketch.storage import ordered_storage, unordered_storage, _random_name
datasketch/storage.py:17: in <module>
    from cassandra import cluster as c_cluster
cassandra/cluster.py:173: in init cassandra.cluster
    ???
E   cassandra.DependencyException: Unable to load a default connection class
E   The following exceptions were observed: 
E    - The C extension needed to use libev was not found.  This probably means that you didn't have the required build dependencies when installing the driver.  See http://datastax.github.io/python-driver/installation.html#c-extensions for instructions on installing build dependencies and building the C extension.
E    - Unable to import asyncore module.  Note that this module has been removed in Python 3.12 so when using the driver with this version (or anything newer) you will need to use one of the other event loop implementations.
@ekzhu
Copy link
Owner Author

ekzhu commented Mar 11, 2024

@ostefano Could you help with this issue?

@rupeshkumaar
Copy link
Contributor

rupeshkumaar commented Mar 12, 2024

@ekzhu I have taken a look at the issue and it seems that Datastax already raised this. Sharing the ticket
cassandra-driver for Python 3.12 Linux is compiled without libev support

@ekzhu
Copy link
Owner Author

ekzhu commented Mar 13, 2024

  • Unable to import asyncore module. Note that this module has been removed in Python 3.12 so when using the driver with this version (or anything newer) you will need to use one of the other event loop implementations.

Thanks for looking into this. Regarding the second point in the error message:

E - Unable to import asyncore module. Note that this module has been removed in Python 3.12 so when using the driver with this version (or anything newer) you will need to use one of the other event loop implementations.

Is there anything we have to do on our end?

@rupeshkumaar
Copy link
Contributor

We might have to use asyncio since asyncore has been deprecated. But even if we implement it I think it will be a short time thing because once the issue is resolved and the new drivers are released we might have to reinstall it and it might create an issue again. We can still think about it. @ekzhu

@ekzhu
Copy link
Owner Author

ekzhu commented Mar 14, 2024

Thanks. Let's wait for their issue to resolve.

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

No branches or pull requests

2 participants