jpayne@69: from typing import Any, Union jpayne@69: jpayne@69: from .core import decode, encode jpayne@69: jpayne@69: jpayne@69: def ToASCII(label: str) -> bytes: jpayne@69: return encode(label) jpayne@69: jpayne@69: jpayne@69: def ToUnicode(label: Union[bytes, bytearray]) -> str: jpayne@69: return decode(label) jpayne@69: jpayne@69: jpayne@69: def nameprep(s: Any) -> None: jpayne@69: raise NotImplementedError("IDNA 2008 does not utilise nameprep protocol")