Raise an appropriate error if the min pymongocrypt is not installed.
()
| 41 | |
| 42 | |
| 43 | def check_min_pymongocrypt() -> None: |
| 44 | """Raise an appropriate error if the min pymongocrypt is not installed.""" |
| 45 | pymongocrypt_version, required_version, is_valid = check_for_min_version("pymongocrypt") |
| 46 | if not is_valid: |
| 47 | raise ConfigurationError( |
| 48 | f"client side encryption requires pymongocrypt>={required_version}, " |
| 49 | f"found version {pymongocrypt_version}. " |
| 50 | "Install a compatible version with: " |
| 51 | "python -m pip install 'pymongo[encryption]'" |
| 52 | ) |
| 53 | |
| 54 | |
| 55 | class AutoEncryptionOpts: |
no test coverage detected