Skip to content

(improvement) log a warning when importing of lz4 or snappy packages … #510

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

Merged
merged 1 commit into from
Aug 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cassandra/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
try:
import lz4
except ImportError:
log.debug("lz4 package could not be imported. LZ4 Compression will not be available")
pass
else:
# The compress and decompress functions we need were moved from the lz4 to
Expand Down Expand Up @@ -102,6 +103,7 @@ def lz4_decompress(byts):
try:
import snappy
except ImportError:
log.debug("snappy package could not be imported. Snappy Compression will not be available")
pass
else:
# work around apparently buggy snappy decompress
Expand Down Expand Up @@ -1408,7 +1410,7 @@ def _handle_options_response(self, options_response):
overlap = (set(locally_supported_compressions.keys()) &
set(remote_supported_compressions))
if len(overlap) == 0:
log.debug("No available compression types supported on both ends."
log.error("No available compression types supported on both ends."
" locally supported: %r. remotely supported: %r",
locally_supported_compressions.keys(),
remote_supported_compressions)
Expand Down
Loading