|
| 1 | +diff --git a/pipenv/patched/pip/_internal/commands/__init__.py b/pipenv/patched/pip/_internal/commands/__init__.py |
| 2 | +index bc4f216a8..156846015 100644 |
| 3 | +--- a/pipenv/patched/pip/_internal/commands/__init__.py |
| 4 | ++++ b/pipenv/patched/pip/_internal/commands/__init__.py |
| 5 | +@@ -14,97 +14,97 @@ CommandInfo = namedtuple("CommandInfo", "module_path, class_name, summary") |
| 6 | + # - Enables avoiding additional (costly) imports for presenting `--help`. |
| 7 | + # - The ordering matters for help display. |
| 8 | + # |
| 9 | +-# Even though the module path starts with the same "pip._internal.commands" |
| 10 | ++# Even though the module path starts with the same "pipenv.patched.pip_internal.commands" |
| 11 | + # prefix, the full path makes testing easier (specifically when modifying |
| 12 | + # `commands_dict` in test setup / teardown). |
| 13 | + commands_dict: Dict[str, CommandInfo] = { |
| 14 | + "install": CommandInfo( |
| 15 | +- "pip._internal.commands.install", |
| 16 | ++ "pipenv.patched.pip_internal.commands.install", |
| 17 | + "InstallCommand", |
| 18 | + "Install packages.", |
| 19 | + ), |
| 20 | + "lock": CommandInfo( |
| 21 | +- "pip._internal.commands.lock", |
| 22 | ++ "pipenv.patched.pip_internal.commands.lock", |
| 23 | + "LockCommand", |
| 24 | + "Generate a lock file.", |
| 25 | + ), |
| 26 | + "download": CommandInfo( |
| 27 | +- "pip._internal.commands.download", |
| 28 | ++ "pipenv.patched.pip_internal.commands.download", |
| 29 | + "DownloadCommand", |
| 30 | + "Download packages.", |
| 31 | + ), |
| 32 | + "uninstall": CommandInfo( |
| 33 | +- "pip._internal.commands.uninstall", |
| 34 | ++ "pipenv.patched.pip_internal.commands.uninstall", |
| 35 | + "UninstallCommand", |
| 36 | + "Uninstall packages.", |
| 37 | + ), |
| 38 | + "freeze": CommandInfo( |
| 39 | +- "pip._internal.commands.freeze", |
| 40 | ++ "pipenv.patched.pip_internal.commands.freeze", |
| 41 | + "FreezeCommand", |
| 42 | + "Output installed packages in requirements format.", |
| 43 | + ), |
| 44 | + "inspect": CommandInfo( |
| 45 | +- "pip._internal.commands.inspect", |
| 46 | ++ "pipenv.patched.pip_internal.commands.inspect", |
| 47 | + "InspectCommand", |
| 48 | + "Inspect the python environment.", |
| 49 | + ), |
| 50 | + "list": CommandInfo( |
| 51 | +- "pip._internal.commands.list", |
| 52 | ++ "pipenv.patched.pip_internal.commands.list", |
| 53 | + "ListCommand", |
| 54 | + "List installed packages.", |
| 55 | + ), |
| 56 | + "show": CommandInfo( |
| 57 | +- "pip._internal.commands.show", |
| 58 | ++ "pipenv.patched.pip_internal.commands.show", |
| 59 | + "ShowCommand", |
| 60 | + "Show information about installed packages.", |
| 61 | + ), |
| 62 | + "check": CommandInfo( |
| 63 | +- "pip._internal.commands.check", |
| 64 | ++ "pipenv.patched.pip_internal.commands.check", |
| 65 | + "CheckCommand", |
| 66 | + "Verify installed packages have compatible dependencies.", |
| 67 | + ), |
| 68 | + "config": CommandInfo( |
| 69 | +- "pip._internal.commands.configuration", |
| 70 | ++ "pipenv.patched.pip_internal.commands.configuration", |
| 71 | + "ConfigurationCommand", |
| 72 | + "Manage local and global configuration.", |
| 73 | + ), |
| 74 | + "search": CommandInfo( |
| 75 | +- "pip._internal.commands.search", |
| 76 | ++ "pipenv.patched.pip_internal.commands.search", |
| 77 | + "SearchCommand", |
| 78 | + "Search PyPI for packages.", |
| 79 | + ), |
| 80 | + "cache": CommandInfo( |
| 81 | +- "pip._internal.commands.cache", |
| 82 | ++ "pipenv.patched.pip_internal.commands.cache", |
| 83 | + "CacheCommand", |
| 84 | + "Inspect and manage pip's wheel cache.", |
| 85 | + ), |
| 86 | + "index": CommandInfo( |
| 87 | +- "pip._internal.commands.index", |
| 88 | ++ "pipenv.patched.pip_internal.commands.index", |
| 89 | + "IndexCommand", |
| 90 | + "Inspect information available from package indexes.", |
| 91 | + ), |
| 92 | + "wheel": CommandInfo( |
| 93 | +- "pip._internal.commands.wheel", |
| 94 | ++ "pipenv.patched.pip_internal.commands.wheel", |
| 95 | + "WheelCommand", |
| 96 | + "Build wheels from your requirements.", |
| 97 | + ), |
| 98 | + "hash": CommandInfo( |
| 99 | +- "pip._internal.commands.hash", |
| 100 | ++ "pipenv.patched.pip_internal.commands.hash", |
| 101 | + "HashCommand", |
| 102 | + "Compute hashes of package archives.", |
| 103 | + ), |
| 104 | + "completion": CommandInfo( |
| 105 | +- "pip._internal.commands.completion", |
| 106 | ++ "pipenv.patched.pip_internal.commands.completion", |
| 107 | + "CompletionCommand", |
| 108 | + "A helper command used for command completion.", |
| 109 | + ), |
| 110 | + "debug": CommandInfo( |
| 111 | +- "pip._internal.commands.debug", |
| 112 | ++ "pipenv.patched.pip_internal.commands.debug", |
| 113 | + "DebugCommand", |
| 114 | + "Show information useful for debugging.", |
| 115 | + ), |
| 116 | + "help": CommandInfo( |
| 117 | +- "pip._internal.commands.help", |
| 118 | ++ "pipenv.patched.pip_internal.commands.help", |
| 119 | + "HelpCommand", |
| 120 | + "Show help for commands.", |
| 121 | + ), |
| 122 | +diff --git a/pipenv/patched/pip/_vendor/requests/packages.py b/pipenv/patched/pip/_vendor/requests/packages.py |
| 123 | +index 200c38287..c92ef2d0d 100644 |
| 124 | +--- a/pipenv/patched/pip/_vendor/requests/packages.py |
| 125 | ++++ b/pipenv/patched/pip/_vendor/requests/packages.py |
| 126 | +@@ -6,14 +6,14 @@ from .compat import chardet |
| 127 | + # I don't like it either. Just look the other way. :) |
| 128 | + |
| 129 | + for package in ("urllib3", "idna"): |
| 130 | +- vendored_package = "pip._vendor." + package |
| 131 | ++ vendored_package = "pipenv.patched.pip._vendor." + package |
| 132 | + locals()[package] = __import__(vendored_package) |
| 133 | + # This traversal is apparently necessary such that the identities are |
| 134 | + # preserved (requests.packages.urllib3.* is urllib3.*) |
| 135 | + for mod in list(sys.modules): |
| 136 | + if mod == vendored_package or mod.startswith(vendored_package + '.'): |
| 137 | +- unprefixed_mod = mod[len("pip._vendor."):] |
| 138 | +- sys.modules['pip._vendor.requests.packages.' + unprefixed_mod] = sys.modules[mod] |
| 139 | ++ unprefixed_mod = mod[len("pipenv.patched.pip._vendor."):] |
| 140 | ++ sys.modules['pipenv.patched.pip._vendor.requests.packages.' + unprefixed_mod] = sys.modules[mod] |
| 141 | + |
| 142 | + if chardet is not None: |
| 143 | + target = chardet.__name__ |
0 commit comments