Skip to content

Commit 49663a1

Browse files
committed
Reuse code from _infra
1 parent 0ebe6ae commit 49663a1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

w3lib/url.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
from urllib.request import pathname2url, url2pathname
3838

3939
from .util import to_unicode
40+
from ._infra import _ASCII_TAB_OR_NEWLINE, _C0_CONTROL_OR_SPACE
4041
from ._types import AnyUnicodeError, StrOrBytes
4142
from ._url import _SPECIAL_SCHEMES
4243

@@ -77,9 +78,6 @@ def _quote_byte(error: UnicodeError) -> Tuple[str, int]:
7778
_FRAGMENT_SAFEST_CHARS = _PATH_SAFEST_CHARS
7879

7980

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 + " "
8381
_ASCII_TAB_OR_NEWLINE_TRANSLATION_TABLE = {
8482
ord(char): None for char in _ASCII_TAB_OR_NEWLINE
8583
}

0 commit comments

Comments
 (0)