We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ebe6ae commit 49663a1Copy full SHA for 49663a1
w3lib/url.py
@@ -37,6 +37,7 @@
37
from urllib.request import pathname2url, url2pathname
38
39
from .util import to_unicode
40
+from ._infra import _ASCII_TAB_OR_NEWLINE, _C0_CONTROL_OR_SPACE
41
from ._types import AnyUnicodeError, StrOrBytes
42
from ._url import _SPECIAL_SCHEMES
43
@@ -77,9 +78,6 @@ def _quote_byte(error: UnicodeError) -> Tuple[str, int]:
77
78
_FRAGMENT_SAFEST_CHARS = _PATH_SAFEST_CHARS
79
80
-_ASCII_TAB_OR_NEWLINE = "\t\n\r"
81
-_C0_CONTROL = "".join(chr(n) for n in range(32))
82
-_C0_CONTROL_OR_SPACE = _C0_CONTROL + " "
83
_ASCII_TAB_OR_NEWLINE_TRANSLATION_TABLE = {
84
ord(char): None for char in _ASCII_TAB_OR_NEWLINE
85
}
0 commit comments