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/distlib/_backport/misc.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/distlib/_backport/misc.py')
-rw-r--r-- | venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/distlib/_backport/misc.py | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/distlib/_backport/misc.py b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/distlib/_backport/misc.py deleted file mode 100644 index 6eb7b86..0000000 --- a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/distlib/_backport/misc.py +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | # -*- coding: utf-8 -*- | ||
2 | # | ||
3 | # Copyright (C) 2012 The Python Software Foundation. | ||
4 | # See LICENSE.txt and CONTRIBUTORS.txt. | ||
5 | # | ||
6 | """Backports for individual classes and functions.""" | ||
7 | |||
8 | import os | ||
9 | import sys | ||
10 | |||
11 | __all__ = ['cache_from_source', 'callable', 'fsencode'] | ||
12 | |||
13 | |||
14 | try: | ||
15 | from imp import cache_from_source | ||
16 | except ImportError: | ||
17 | def cache_from_source(py_file, debug=__debug__): | ||
18 | ext = debug and 'c' or 'o' | ||
19 | return py_file + ext | ||
20 | |||
21 | |||
22 | try: | ||
23 | callable = callable | ||
24 | except NameError: | ||
25 | from collections import Callable | ||
26 | |||
27 | def callable(obj): | ||
28 | return isinstance(obj, Callable) | ||
29 | |||
30 | |||
31 | try: | ||
32 | fsencode = os.fsencode | ||
33 | except AttributeError: | ||
34 | def fsencode(filename): | ||
35 | if isinstance(filename, bytes): | ||
36 | return filename | ||
37 | elif isinstance(filename, str): | ||
38 | return filename.encode(sys.getfilesystemencoding()) | ||
39 | else: | ||
40 | raise TypeError("expect bytes or str, not %s" % | ||
41 | type(filename).__name__) | ||