mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-21 15:20:59 +00:00
f9c41e864e
Signed-off-by: Dan Ryan <dan@danryan.co>
354 lines
16 KiB
Diff
354 lines
16 KiB
Diff
diff --git a/pipenv/vendor/pip9/__init__.py b/pipenv/vendor/pip9/__init__.py
|
|
index 238d791..4e3e530 100644
|
|
--- a/pipenv/vendor/pip9/__init__.py
|
|
+++ b/pipenv/vendor/pip9/__init__.py
|
|
@@ -17,7 +17,7 @@ import re
|
|
# the stderr output) and is just plain annoying in normal usage. I don't want
|
|
# to add socks as yet another dependency for pip, nor do I want to allow-stder
|
|
# in the DEP-8 tests, so just suppress the warning. pdb tells me this has to
|
|
-# be done before the import of pip.vcs.
|
|
+# be done before the import of pip9.vcs.
|
|
from pip9._vendor.urllib3.exceptions import DependencyWarning
|
|
warnings.filterwarnings("ignore", category=DependencyWarning) # noqa
|
|
|
|
@@ -55,7 +55,7 @@ from pip9._vendor.urllib3.exceptions import InsecureRequestWarning
|
|
# initialising the pip module, "from pip9 import cmdoptions" is recursive
|
|
# and appears not to work properly in that situation.
|
|
import pip9.cmdoptions
|
|
-cmdoptions = pip.cmdoptions
|
|
+cmdoptions = pip9.cmdoptions
|
|
|
|
# The version as used in the setup.py and the docs conf.py
|
|
__version__ = "9.0.3"
|
|
@@ -238,7 +238,7 @@ def main(args=None):
|
|
sys.exit(1)
|
|
|
|
# Needed for locale.getpreferredencoding(False) to work
|
|
- # in pip.utils.encoding.auto_decode
|
|
+ # in pip9.utils.encoding.auto_decode
|
|
try:
|
|
locale.setlocale(locale.LC_ALL, '')
|
|
except locale.Error as e:
|
|
diff --git a/pipenv/vendor/pip9/_vendor/__init__.py b/pipenv/vendor/pip9/_vendor/__init__.py
|
|
index aa90315..efe4f53 100644
|
|
--- a/pipenv/vendor/pip9/_vendor/__init__.py
|
|
+++ b/pipenv/vendor/pip9/_vendor/__init__.py
|
|
@@ -2,7 +2,7 @@
|
|
pip._vendor is for vendoring dependencies of pip to prevent needing pip to
|
|
depend on something external.
|
|
|
|
-Files inside of pip._vendor should be considered immutable and should only be
|
|
+Files inside of pip9._vendor should be considered immutable and should only be
|
|
updated to versions from upstream.
|
|
"""
|
|
from __future__ import absolute_import
|
|
@@ -13,7 +13,7 @@ import sys
|
|
|
|
# Downstream redistributors which have debundled our dependencies should also
|
|
# patch this value to be true. This will trigger the additional patching
|
|
-# to cause things like "six" to be available as pip.
|
|
+# to cause things like "six" to be available as pip9.
|
|
DEBUNDLED = False
|
|
|
|
# By default, look in this directory for a bunch of .whl files which we will
|
|
diff --git a/pipenv/vendor/pip9/_vendor/re-vendor.py b/pipenv/vendor/pip9/_vendor/re-vendor.py
|
|
index 82c4ef0..5841a2f 100644
|
|
--- a/pipenv/vendor/pip9/_vendor/re-vendor.py
|
|
+++ b/pipenv/vendor/pip9/_vendor/re-vendor.py
|
|
@@ -19,7 +19,7 @@ def clean():
|
|
os.unlink(os.path.join(here, 'six.py'))
|
|
|
|
def vendor():
|
|
- pip.main(['install', '-t', here, '-r', 'vendor.txt'])
|
|
+ pip9.main(['install', '-t', here, '-r', 'vendor.txt'])
|
|
for dirname in glob.glob('*.egg-info'):
|
|
shutil.rmtree(dirname)
|
|
|
|
diff --git a/pipenv/vendor/pip9/basecommand.py b/pipenv/vendor/pip9/basecommand.py
|
|
index 9c4117c..9c8610f 100644
|
|
--- a/pipenv/vendor/pip9/basecommand.py
|
|
+++ b/pipenv/vendor/pip9/basecommand.py
|
|
@@ -169,7 +169,7 @@ class Command(object):
|
|
])),
|
|
},
|
|
# Disable any logging besides WARNING unless we have DEBUG level
|
|
- # logging enabled. These use both pip._vendor and the bare names
|
|
+ # logging enabled. These use both pip9._vendor and the bare names
|
|
# for the case where someone unbundles our libraries.
|
|
"loggers": dict(
|
|
(
|
|
diff --git a/pipenv/vendor/pip9/commands/freeze.py b/pipenv/vendor/pip9/commands/freeze.py
|
|
index c93c7c1..5a6deb9 100644
|
|
--- a/pipenv/vendor/pip9/commands/freeze.py
|
|
+++ b/pipenv/vendor/pip9/commands/freeze.py
|
|
@@ -67,7 +67,7 @@ class FreezeCommand(Command):
|
|
self.parser.insert_option_group(0, self.cmd_opts)
|
|
|
|
def run(self, options, args):
|
|
- format_control = pip.index.FormatControl(set(), set())
|
|
+ format_control = pip9.index.FormatControl(set(), set())
|
|
wheel_cache = WheelCache(options.cache_dir, format_control)
|
|
skip = set(stdlib_pkgs)
|
|
if not options.freeze_all:
|
|
diff --git a/pipenv/vendor/pip9/commands/help.py b/pipenv/vendor/pip9/commands/help.py
|
|
index 702d62a..0c6bf17 100644
|
|
--- a/pipenv/vendor/pip9/commands/help.py
|
|
+++ b/pipenv/vendor/pip9/commands/help.py
|
|
@@ -15,7 +15,7 @@ class HelpCommand(Command):
|
|
from pip9.commands import commands_dict, get_similar_commands
|
|
|
|
try:
|
|
- # 'pip help' with no args is handled by pip.__init__.parseopt()
|
|
+ # 'pip help' with no args is handled by pip9.__init__.parseopt()
|
|
cmd_name = args[0] # the command we need help for
|
|
except IndexError:
|
|
return SUCCESS
|
|
diff --git a/pipenv/vendor/pip9/commands/list.py b/pipenv/vendor/pip9/commands/list.py
|
|
index 1a1e601..9f36140 100644
|
|
--- a/pipenv/vendor/pip9/commands/list.py
|
|
+++ b/pipenv/vendor/pip9/commands/list.py
|
|
@@ -138,7 +138,7 @@ class ListCommand(Command):
|
|
warnings.warn(
|
|
"The default format will switch to columns in the future. "
|
|
"You can use --format=(legacy|columns) (or define a "
|
|
- "format=(legacy|columns) in your pip.conf under the [list] "
|
|
+ "format=(legacy|columns) in your pip9.conf under the [list] "
|
|
"section) to disable this warning.",
|
|
RemovedInPip10Warning,
|
|
)
|
|
diff --git a/pipenv/vendor/pip9/commands/uninstall.py b/pipenv/vendor/pip9/commands/uninstall.py
|
|
index 8e5eacb..0346582 100644
|
|
--- a/pipenv/vendor/pip9/commands/uninstall.py
|
|
+++ b/pipenv/vendor/pip9/commands/uninstall.py
|
|
@@ -44,7 +44,7 @@ class UninstallCommand(Command):
|
|
|
|
def run(self, options, args):
|
|
with self._build_session(options) as session:
|
|
- format_control = pip.index.FormatControl(set(), set())
|
|
+ format_control = pip9.index.FormatControl(set(), set())
|
|
wheel_cache = WheelCache(options.cache_dir, format_control)
|
|
requirement_set = RequirementSet(
|
|
build_dir=None,
|
|
diff --git a/pipenv/vendor/pip9/download.py b/pipenv/vendor/pip9/download.py
|
|
index 546c792..b212798 100644
|
|
--- a/pipenv/vendor/pip9/download.py
|
|
+++ b/pipenv/vendor/pip9/download.py
|
|
@@ -65,7 +65,7 @@ def user_agent():
|
|
Return a string representing the user agent.
|
|
"""
|
|
data = {
|
|
- "installer": {"name": "pip", "version": pip.__version__},
|
|
+ "installer": {"name": "pip", "version": pip9.__version__},
|
|
"python": platform.python_version(),
|
|
"implementation": {
|
|
"name": platform.python_implementation(),
|
|
@@ -251,7 +251,7 @@ class SafeFileCache(FileCache):
|
|
super(SafeFileCache, self).__init__(*args, **kwargs)
|
|
|
|
# Check to ensure that the directory containing our cache directory
|
|
- # is owned by the user current executing pip. If it does not exist
|
|
+ # is owned by the user current executing pip9. If it does not exist
|
|
# we will check the parent directory until we find one that does exist.
|
|
# If it is not owned by the user executing pip then we will disable
|
|
# the cache and log a warning.
|
|
diff --git a/pipenv/vendor/pip9/locations.py b/pipenv/vendor/pip9/locations.py
|
|
index 868ab6e..e635dd9 100644
|
|
--- a/pipenv/vendor/pip9/locations.py
|
|
+++ b/pipenv/vendor/pip9/locations.py
|
|
@@ -19,7 +19,7 @@ USER_CACHE_DIR = appdirs.user_cache_dir("pip")
|
|
|
|
DELETE_MARKER_MESSAGE = '''\
|
|
This file is placed here by pip to indicate the source was put
|
|
-here by pip.
|
|
+here by pip9.
|
|
|
|
Once this package is successfully installed this source code will be
|
|
deleted (unless you remove this file).
|
|
diff --git a/pipenv/vendor/pip9/operations/freeze.py b/pipenv/vendor/pip9/operations/freeze.py
|
|
index 7cc32ad..5e9c6ea 100644
|
|
--- a/pipenv/vendor/pip9/operations/freeze.py
|
|
+++ b/pipenv/vendor/pip9/operations/freeze.py
|
|
@@ -45,7 +45,7 @@ def freeze(
|
|
skip=(),
|
|
user_only=user_only):
|
|
try:
|
|
- req = pip.FrozenRequirement.from_dist(
|
|
+ req = pip9.FrozenRequirement.from_dist(
|
|
dist,
|
|
dependency_links
|
|
)
|
|
diff --git a/pipenv/vendor/pip9/pep425tags.py b/pipenv/vendor/pip9/pep425tags.py
|
|
index 44793b2..f2d65d4 100644
|
|
--- a/pipenv/vendor/pip9/pep425tags.py
|
|
+++ b/pipenv/vendor/pip9/pep425tags.py
|
|
@@ -159,7 +159,7 @@ def is_manylinux1_compatible():
|
|
pass
|
|
|
|
# Check glibc version. CentOS 5 uses glibc 2.5.
|
|
- return pip.utils.glibc.have_compatible_glibc(2, 5)
|
|
+ return pip9.utils.glibc.have_compatible_glibc(2, 5)
|
|
|
|
|
|
def get_darwin_arches(major, minor, machine):
|
|
diff --git a/pipenv/vendor/pip9/req/req_file.py b/pipenv/vendor/pip9/req/req_file.py
|
|
index 77e51be..5377cad 100644
|
|
--- a/pipenv/vendor/pip9/req/req_file.py
|
|
+++ b/pipenv/vendor/pip9/req/req_file.py
|
|
@@ -66,13 +66,13 @@ def parse_requirements(filename, finder=None, comes_from=None, options=None,
|
|
"""Parse a requirements file and yield InstallRequirement instances.
|
|
|
|
:param filename: Path or url of requirements file.
|
|
- :param finder: Instance of pip.index.PackageFinder.
|
|
+ :param finder: Instance of pip9.index.PackageFinder.
|
|
:param comes_from: Origin description of requirements.
|
|
:param options: cli options.
|
|
- :param session: Instance of pip.download.PipSession.
|
|
+ :param session: Instance of pip9.download.PipSession.
|
|
:param constraint: If true, parsing a constraint file rather than
|
|
requirements file.
|
|
- :param wheel_cache: Instance of pip.wheel.WheelCache
|
|
+ :param wheel_cache: Instance of pip9.wheel.WheelCache
|
|
"""
|
|
if session is None:
|
|
raise TypeError(
|
|
@@ -226,7 +226,7 @@ def process_line(line, filename, line_number, finder=None, comes_from=None,
|
|
finder.index_urls = [opts.index_url]
|
|
if opts.use_wheel is False:
|
|
finder.use_wheel = False
|
|
- pip.index.fmt_ctl_no_use_wheel(finder.format_control)
|
|
+ pip9.index.fmt_ctl_no_use_wheel(finder.format_control)
|
|
if opts.no_index is True:
|
|
finder.index_urls = []
|
|
if opts.extra_index_urls:
|
|
diff --git a/pipenv/vendor/pip9/req/req_install.py b/pipenv/vendor/pip9/req/req_install.py
|
|
index 6644816..c618790 100644
|
|
--- a/pipenv/vendor/pip9/req/req_install.py
|
|
+++ b/pipenv/vendor/pip9/req/req_install.py
|
|
@@ -691,7 +691,7 @@ class InstallRequirement(object):
|
|
paths_to_remove.add_pth(easy_install_pth, './' + easy_install_egg)
|
|
|
|
elif egg_info_exists and dist.egg_info.endswith('.dist-info'):
|
|
- for path in pip.wheel.uninstallation_paths(dist):
|
|
+ for path in pip9.wheel.uninstallation_paths(dist):
|
|
paths_to_remove.add(path)
|
|
|
|
elif develop_egg_link:
|
|
@@ -845,8 +845,8 @@ class InstallRequirement(object):
|
|
install_options, global_options, prefix=prefix)
|
|
return
|
|
if self.is_wheel:
|
|
- version = pip.wheel.wheel_version(self.source_dir)
|
|
- pip.wheel.check_compatibility(version, self.name)
|
|
+ version = pip9.wheel.wheel_version(self.source_dir)
|
|
+ pip9.wheel.check_compatibility(version, self.name)
|
|
|
|
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
|
|
self.install_succeeded = True
|
|
diff --git a/pipenv/vendor/pip9/utils/deprecation.py b/pipenv/vendor/pip9/utils/deprecation.py
|
|
index c3f799e..4212424 100644
|
|
--- a/pipenv/vendor/pip9/utils/deprecation.py
|
|
+++ b/pipenv/vendor/pip9/utils/deprecation.py
|
|
@@ -42,7 +42,7 @@ def _showwarning(message, category, filename, lineno, file=None, line=None):
|
|
else:
|
|
if issubclass(category, PipDeprecationWarning):
|
|
# We use a specially named logger which will handle all of the
|
|
- # deprecation messages for pip.
|
|
+ # deprecation messages for pip9.
|
|
logger = logging.getLogger("pip.deprecations")
|
|
|
|
# This is purposely using the % formatter here instead of letting
|
|
@@ -53,7 +53,7 @@ def _showwarning(message, category, filename, lineno, file=None, line=None):
|
|
# PipDeprecationWarnings that are Pending still have at least 2
|
|
# versions to go until they are removed so they can just be
|
|
# warnings. Otherwise, they will be removed in the very next
|
|
- # version of pip. We want these to be more obvious so we use the
|
|
+ # version of pip9. We want these to be more obvious so we use the
|
|
# ERROR logging level.
|
|
if issubclass(category, Pending):
|
|
logger.warning(log_message)
|
|
diff --git a/pipenv/vendor/pip9/utils/outdated.py b/pipenv/vendor/pip9/utils/outdated.py
|
|
index c087312..0f3eeee 100644
|
|
--- a/pipenv/vendor/pip9/utils/outdated.py
|
|
+++ b/pipenv/vendor/pip9/utils/outdated.py
|
|
@@ -93,7 +93,7 @@ def load_selfcheck_statefile():
|
|
|
|
|
|
def pip_version_check(session):
|
|
- """Check for an update for pip.
|
|
+ """Check for an update for pip9.
|
|
|
|
Limit the frequency of checks to once per week. State is stored either in
|
|
the active virtualenv or in the user's USER_CACHE_DIR keyed off the prefix
|
|
@@ -143,7 +143,7 @@ def pip_version_check(session):
|
|
if (pip_version < remote_version and
|
|
pip_version.base_version != remote_version.base_version):
|
|
# Advise "python -m pip" on Windows to avoid issues
|
|
- # with overwriting pip.exe.
|
|
+ # with overwriting pip9.exe.
|
|
if WINDOWS:
|
|
pip_cmd = "python -m pip"
|
|
else:
|
|
diff --git a/pipenv/vendor/pip9/wheel.py b/pipenv/vendor/pip9/wheel.py
|
|
index c9ebbf1..728f5cc 100644
|
|
--- a/pipenv/vendor/pip9/wheel.py
|
|
+++ b/pipenv/vendor/pip9/wheel.py
|
|
@@ -57,7 +57,7 @@ class WheelCache(object):
|
|
"""Create a wheel cache.
|
|
|
|
:param cache_dir: The root of the cache.
|
|
- :param format_control: A pip.index.FormatControl object to limit
|
|
+ :param format_control: A pip9.index.FormatControl object to limit
|
|
binaries being read from the cache.
|
|
"""
|
|
self._cache_dir = expanduser(cache_dir) if cache_dir else None
|
|
@@ -82,7 +82,7 @@ def _cache_for_link(cache_dir, link):
|
|
a version of 0.0...and if we built and cached a wheel, we'd end up using
|
|
the same wheel even if the source has been edited.
|
|
|
|
- :param cache_dir: The cache_dir being used by pip.
|
|
+ :param cache_dir: The cache_dir being used by pip9.
|
|
:param link: The link of the sdist for which this will cache wheels.
|
|
"""
|
|
|
|
@@ -121,7 +121,7 @@ def cached_wheel(cache_dir, link, format_control, package_name):
|
|
if not package_name:
|
|
return link
|
|
canonical_name = canonicalize_name(package_name)
|
|
- formats = pip.index.fmt_ctl_formats(format_control, canonical_name)
|
|
+ formats = pip9.index.fmt_ctl_formats(format_control, canonical_name)
|
|
if "binary" not in formats:
|
|
return link
|
|
root = _cache_for_link(cache_dir, link)
|
|
@@ -145,7 +145,7 @@ def cached_wheel(cache_dir, link, format_control, package_name):
|
|
return link
|
|
candidates.sort()
|
|
path = os.path.join(root, candidates[0][1])
|
|
- return pip.index.Link(path_to_url(path))
|
|
+ return pip9.index.Link(path_to_url(path))
|
|
|
|
|
|
def rehash(path, algo='sha256', blocksize=1 << 20):
|
|
@@ -768,11 +768,11 @@ class WheelBuilder(object):
|
|
if autobuilding:
|
|
link = req.link
|
|
base, ext = link.splitext()
|
|
- if pip.index.egg_info_matches(base, None, link) is None:
|
|
+ if pip9.index.egg_info_matches(base, None, link) is None:
|
|
# Doesn't look like a package - don't autobuild a wheel
|
|
# because we'll have no way to lookup the result sanely
|
|
continue
|
|
- if "binary" not in pip.index.fmt_ctl_formats(
|
|
+ if "binary" not in pip9.index.fmt_ctl_formats(
|
|
self.finder.format_control,
|
|
canonicalize_name(req.name)):
|
|
logger.info(
|
|
@@ -828,7 +828,7 @@ class WheelBuilder(object):
|
|
req.source_dir = req.build_location(
|
|
self.requirement_set.build_dir)
|
|
# Update the link for this.
|
|
- req.link = pip.index.Link(
|
|
+ req.link = pip9.index.Link(
|
|
path_to_url(wheel_file))
|
|
assert req.link.is_wheel
|
|
# extract the wheel into the dir
|