MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _have_zstd

Function _have_zstd

pymongo/compression_support.py:46–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44
45
46def _have_zstd() -> bool:
47 try:
48 if sys.version_info >= (3, 14):
49 from compression import zstd
50 else:
51 from backports import zstd # noqa: F401
52
53 return True
54 except ImportError:
55 return False
56
57
58def validate_compressors(dummy: Any, value: Union[str, Iterable[str]]) -> list[str]:

Callers 3

test_compressionMethod · 0.90
test_compressionMethod · 0.90
validate_compressorsFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_compressionMethod · 0.72
test_compressionMethod · 0.72