Upload edit\Qwen3-TTS-test\.venv\Lib\site-packages\idna\compat.py with huggingface_hub
Browse files
edit//Qwen3-TTS-test//.venv//Lib//site-packages//idna//compat.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, Union
|
| 2 |
+
|
| 3 |
+
from .core import decode, encode
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
def ToASCII(label: str) -> bytes:
|
| 7 |
+
return encode(label)
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
def ToUnicode(label: Union[bytes, bytearray]) -> str:
|
| 11 |
+
return decode(label)
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
def nameprep(s: Any) -> None:
|
| 15 |
+
raise NotImplementedError("IDNA 2008 does not utilise nameprep protocol")
|