Repository: boto/boto3
File: boto3/s3/transfer.py (Python)

Code before:
            return crt_transfer_manager

    # If we don't resolve something above, fallback to the default.
    logger.debug(
        f"Using default client. pid: {getpid()}, thread: {threading.get_ident()}"
    )
    return _create_default_transfer_manager(client, config, osutil)


def _should_use_crt(config):
    # This feature requires awscrt>=0.19.18
    has_min_crt = HAS_CRT and has_minimum_crt_version((0, 19, 18))
    is_optimized_instance = has_min_crt and awscrt.s3.is_optimized_for_system()
    pref_transfer_client = config.preferred_transfer_client.lower()

    if (
        pref_transfer_client == constants.CRT_TRANSFER_CLIENT
        and not has_min_crt
    ):
        msg = (
            "CRT transfer client is configured but is missing minimum CRT "
            f"version. CRT installed: {HAS_CRT}"
        )
        if HAS_CRT:
            msg += f", with version: {awscrt.__version__}"
        raise MissingMinimumCrtVersionError(msg)

    if (
        is_optimized_instance
        and pref_transfer_client == constants.AUTO_RESOLVE_TRANSFER_CLIENT
    ) or pref_transfer_client == constants.CRT_TRANSFER_CLIENT:
        logger.debug(
            "Attempting to use CRTTransferManager. Config settings may be ignored."
        )
        return True

    logger.debug(
        "Opting out of CRT Transfer Manager. Preferred client: "
        f"{pref_transfer_client}, CRT available: {HAS_CRT}, "
        f"Instance Optimized: {is_optimized_instance}."
    )
    return False


def has_minimum_crt_version(minimum_version):
    """Not intended for use outside boto3."""
    if not HAS_CRT:
        return False

    crt_version_str = awscrt.__version__
    try:

Review comment (suggestion):
There exists a `MissingDependencyException` error in botocore that we usually throw for cases when we're missing CRT or don't have a minimum supported version. I think we should do one of the following:
- Use `MissingDependencyException`
- Have `MissingMinimumCrtVersionError` inherit from `MissingDependencyException` so people catching these types of exceptions don't have to try and catch a new one 

Code after:
            return crt_transfer_manager

    # If we don't resolve something above, fallback to the default.
    logger.debug(
        f"Using default client. pid: {getpid()}, thread: {threading.get_ident()}"
    )
    return _create_default_transfer_manager(client, config, osutil)


def _should_use_crt(config):
    # This feature requires awscrt>=0.19.18
    has_min_crt = HAS_CRT and has_minimum_crt_version((0, 19, 18))
    is_optimized_instance = has_min_crt and awscrt.s3.is_optimized_for_system()
    pref_transfer_client = config.preferred_transfer_client.lower()

    if (
        pref_transfer_client == constants.CRT_TRANSFER_CLIENT
        and not has_min_crt
    ):
        msg = (
            "CRT transfer client is configured but is missing minimum CRT "
            f"version. CRT installed: {HAS_CRT}"
        )
        if HAS_CRT:
            msg += f", with version: {awscrt.__version__}"
        raise MissingDependencyException(msg=msg)

    if (
        is_optimized_instance
        and pref_transfer_client == constants.AUTO_RESOLVE_TRANSFER_CLIENT
    ) or pref_transfer_client == constants.CRT_TRANSFER_CLIENT:
        logger.debug(
            "Attempting to use CRTTransferManager. Config settings may be ignored."
        )
        return True

    logger.debug(
        "Opting out of CRT Transfer Manager. Preferred client: "
        f"{pref_transfer_client}, CRT available: {HAS_CRT}, "
        f"Instance Optimized: {is_optimized_instance}."
    )
    return False


def has_minimum_crt_version(minimum_version):
    """Not intended for use outside boto3."""
    if not HAS_CRT:
        return False

    crt_version_str = awscrt.__version__
    try: