diff options
author | Shubham Saini <shubham6405@gmail.com> | 2019-08-05 08:32:33 +0000 |
---|---|---|
committer | Shubham Saini <shubham6405@gmail.com> | 2019-08-05 08:32:33 +0000 |
commit | 227b2d30a8675b44918f9d9ca89b24144a938215 (patch) | |
tree | 9f8e6a28724514b6fdf463a9ab2067a7ef309b72 /venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/_internal_utils.py | |
parent | 842a8cfbbbdb1f92889d892e4859dbd5d40c5be8 (diff) |
removing venv files
Diffstat (limited to 'venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/_internal_utils.py')
-rw-r--r-- | venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/_internal_utils.py | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/_internal_utils.py b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/_internal_utils.py deleted file mode 100644 index 405b025..0000000 --- a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/_internal_utils.py +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | # -*- coding: utf-8 -*- | ||
2 | |||
3 | """ | ||
4 | requests._internal_utils | ||
5 | ~~~~~~~~~~~~~~ | ||
6 | |||
7 | Provides utility functions that are consumed internally by Requests | ||
8 | which depend on extremely few external helpers (such as compat) | ||
9 | """ | ||
10 | |||
11 | from .compat import is_py2, builtin_str, str | ||
12 | |||
13 | |||
14 | def to_native_string(string, encoding='ascii'): | ||
15 | """Given a string object, regardless of type, returns a representation of | ||
16 | that string in the native string type, encoding and decoding where | ||
17 | necessary. This assumes ASCII unless told otherwise. | ||
18 | """ | ||
19 | if isinstance(string, builtin_str): | ||
20 | out = string | ||
21 | else: | ||
22 | if is_py2: | ||
23 | out = string.encode(encoding) | ||
24 | else: | ||
25 | out = string.decode(encoding) | ||
26 | |||
27 | return out | ||
28 | |||
29 | |||
30 | def unicode_is_ascii(u_string): | ||
31 | """Determine if unicode string only contains ASCII characters. | ||
32 | |||
33 | :param str u_string: unicode string to check. Must be unicode | ||
34 | and not Python 2 `str`. | ||
35 | :rtype: bool | ||
36 | """ | ||
37 | assert isinstance(u_string, str) | ||
38 | try: | ||
39 | u_string.encode('ascii') | ||
40 | return True | ||
41 | except UnicodeEncodeError: | ||
42 | return False | ||