golden hour
/opt/alt/python37/lib/python3.7/site-packages/pip/_vendor/requests
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.py
4.36 KB
Del
OK
__init__.pyc
4.33 KB
Del
OK
__init__.pyo
4.16 KB
Del
OK
__pycache__
-
Del
OK
__version__.py
441 B
Del
OK
__version__.pyc
605 B
Del
OK
__version__.pyo
605 B
Del
OK
_internal_utils.py
1.07 KB
Del
OK
_internal_utils.pyc
1.54 KB
Del
OK
_internal_utils.pyo
1.49 KB
Del
OK
adapters.py
21.04 KB
Del
OK
adapters.pyc
19.22 KB
Del
OK
adapters.pyo
19.22 KB
Del
OK
api.py
6.34 KB
Del
OK
api.pyc
7.26 KB
Del
OK
api.pyo
7.26 KB
Del
OK
auth.py
9.97 KB
Del
OK
auth.pyc
10.61 KB
Del
OK
auth.pyo
10.61 KB
Del
OK
certs.py
465 B
Del
OK
certs.pyc
631 B
Del
OK
certs.pyo
631 B
Del
OK
compat.py
2 KB
Del
OK
compat.pyc
1.92 KB
Del
OK
compat.pyo
1.92 KB
Del
OK
cookies.py
18 KB
Del
OK
cookies.pyc
22.85 KB
Del
OK
cookies.pyo
22.85 KB
Del
OK
exceptions.py
3.1 KB
Del
OK
exceptions.pyc
7.32 KB
Del
OK
exceptions.pyo
7.32 KB
Del
OK
help.py
3.49 KB
Del
OK
help.pyc
3.36 KB
Del
OK
help.pyo
3.36 KB
Del
OK
hooks.py
757 B
Del
OK
hooks.pyc
1.23 KB
Del
OK
hooks.pyo
1.23 KB
Del
OK
models.py
33.48 KB
Del
OK
models.pyc
29.39 KB
Del
OK
models.pyo
29.39 KB
Del
OK
packages.py
695 B
Del
OK
packages.pyc
591 B
Del
OK
packages.pyo
591 B
Del
OK
sessions.py
28.63 KB
Del
OK
sessions.pyc
22.74 KB
Del
OK
sessions.pyo
22.74 KB
Del
OK
status_codes.py
4.09 KB
Del
OK
status_codes.pyc
6.04 KB
Del
OK
status_codes.pyo
6.04 KB
Del
OK
structures.py
2.93 KB
Del
OK
structures.pyc
5.54 KB
Del
OK
structures.pyo
5.54 KB
Del
OK
utils.py
29.47 KB
Del
OK
utils.pyc
27.41 KB
Del
OK
utils.pyo
27.41 KB
Del
OK
Edit: _internal_utils.py
# -*- coding: utf-8 -*- """ requests._internal_utils ~~~~~~~~~~~~~~ Provides utility functions that are consumed internally by Requests which depend on extremely few external helpers (such as compat) """ from .compat import is_py2, builtin_str, str def to_native_string(string, encoding='ascii'): """Given a string object, regardless of type, returns a representation of that string in the native string type, encoding and decoding where necessary. This assumes ASCII unless told otherwise. """ if isinstance(string, builtin_str): out = string else: if is_py2: out = string.encode(encoding) else: out = string.decode(encoding) return out def unicode_is_ascii(u_string): """Determine if unicode string only contains ASCII characters. :param str u_string: unicode string to check. Must be unicode and not Python 2 `str`. :rtype: bool """ assert isinstance(u_string, str) try: u_string.encode('ascii') return True except UnicodeEncodeError: return False
Save