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