def _is_compatible_text_stream(stream, encoding, errors):
    """Check if a stream's encoding and errors attributes are
    compatible with the desired values.
    """
    return _is_compat_stream_attr(
        stream, "encoding", encoding
    ) and _is_compat_stream_attr(stream, "errors", errors)
Check if a stream's encoding and errors attributes are
    compatible with the desired values.
    
dynaconf/vendor/click/_compat.py