diff --git a/valkey/_parsers/url_parser.py b/valkey/_parsers/url_parser.py index 3a674d3d..6e157e32 100644 --- a/valkey/_parsers/url_parser.py +++ b/valkey/_parsers/url_parser.py @@ -36,14 +36,8 @@ def to_bool(value) -> Optional[bool]: def parse_url(url: str, async_connection: bool): - url_prefixes = ["valkey://", "valkeys://", "unix://", "redis://", "rediss://"] supported_schemes = ["valkey", "valkeys", "redis", "rediss"] - if not any(url.startswith(prefix) for prefix in url_prefixes): - raise ValueError( - f"Valkey URL must specify one of the following schemes {url_prefixes}" - ) - parsed: ParseResult = urlparse(url) kwargs: ConnectKwargs = {} @@ -94,7 +88,7 @@ def parse_url(url: str, async_connection: bool): ) else: raise ValueError( - f"Valkey URL must specify one of the following schemes ({url_prefixes})" + f"Valkey URL must specify one of the following schemes ({supported_schemes})" ) return kwargs