Remove unused patches
This commit is contained in:
parent
b476c02485
commit
695f7debe3
395
local-dos.patch
395
local-dos.patch
@ -1,395 +0,0 @@
|
||||
diff --git a/pip/cmdoptions.py b/pip/cmdoptions.py
|
||||
index 8ed3d91..01b2104 100644
|
||||
--- a/pip/cmdoptions.py
|
||||
+++ b/pip/cmdoptions.py
|
||||
@@ -9,7 +9,7 @@ To be consistent, all options will follow this design.
|
||||
"""
|
||||
import copy
|
||||
from optparse import OptionGroup, SUPPRESS_HELP, Option
|
||||
-from pip.locations import build_prefix, default_log_file
|
||||
+from pip.locations import default_log_file
|
||||
|
||||
|
||||
def make_option_group(group, parser):
|
||||
@@ -297,10 +297,8 @@ build_dir = OptionMaker(
|
||||
'-b', '--build', '--build-dir', '--build-directory',
|
||||
dest='build_dir',
|
||||
metavar='dir',
|
||||
- default=build_prefix,
|
||||
- help='Directory to unpack packages into and build in. '
|
||||
- 'The default in a virtualenv is "<venv path>/build". '
|
||||
- 'The default for global installs is "<OS temp dir>/pip_build_<username>".')
|
||||
+ help='Directory to unpack packages into and build in.',
|
||||
+)
|
||||
|
||||
install_options = OptionMaker(
|
||||
'--install-option',
|
||||
diff --git a/pip/commands/install.py b/pip/commands/install.py
|
||||
index cbf22a0..cb7d0db 100644
|
||||
--- a/pip/commands/install.py
|
||||
+++ b/pip/commands/install.py
|
||||
@@ -10,6 +10,7 @@ from pip.basecommand import Command
|
||||
from pip.index import PackageFinder
|
||||
from pip.exceptions import InstallationError, CommandError, PreviousBuildDirError
|
||||
from pip import cmdoptions
|
||||
+from pip.util import BuildDirectory
|
||||
|
||||
|
||||
class InstallCommand(Command):
|
||||
@@ -188,7 +189,7 @@ class InstallCommand(Command):
|
||||
if (
|
||||
options.no_install or
|
||||
options.no_download or
|
||||
- (options.build_dir != build_prefix) or
|
||||
+ options.build_dir or
|
||||
options.no_clean
|
||||
):
|
||||
logger.deprecated('1.7', 'DEPRECATION: --no-install, --no-download, --build, '
|
||||
@@ -197,7 +198,16 @@ class InstallCommand(Command):
|
||||
if options.download_dir:
|
||||
options.no_install = True
|
||||
options.ignore_installed = True
|
||||
- options.build_dir = os.path.abspath(options.build_dir)
|
||||
+
|
||||
+ # If we have --no-install or --no-download and no --build we use the
|
||||
+ # legacy static build dir
|
||||
+ if (options.build_dir is None
|
||||
+ and (options.no_install or options.no_download)):
|
||||
+ options.build_dir = build_prefix
|
||||
+
|
||||
+ if options.build_dir:
|
||||
+ options.build_dir = os.path.abspath(options.build_dir)
|
||||
+
|
||||
options.src_dir = os.path.abspath(options.src_dir)
|
||||
install_options = options.install_options or []
|
||||
if options.use_user_site:
|
||||
@@ -246,73 +256,75 @@ class InstallCommand(Command):
|
||||
|
||||
finder = self._build_package_finder(options, index_urls, session)
|
||||
|
||||
- requirement_set = RequirementSet(
|
||||
- build_dir=options.build_dir,
|
||||
- src_dir=options.src_dir,
|
||||
- download_dir=options.download_dir,
|
||||
- download_cache=options.download_cache,
|
||||
- upgrade=options.upgrade,
|
||||
- as_egg=options.as_egg,
|
||||
- ignore_installed=options.ignore_installed,
|
||||
- ignore_dependencies=options.ignore_dependencies,
|
||||
- force_reinstall=options.force_reinstall,
|
||||
- use_user_site=options.use_user_site,
|
||||
- target_dir=temp_target_dir,
|
||||
- session=session,
|
||||
- pycompile=options.compile,
|
||||
- )
|
||||
- for name in args:
|
||||
- requirement_set.add_requirement(
|
||||
- InstallRequirement.from_line(name, None))
|
||||
- for name in options.editables:
|
||||
- requirement_set.add_requirement(
|
||||
- InstallRequirement.from_editable(name, default_vcs=options.default_vcs))
|
||||
- for filename in options.requirements:
|
||||
- for req in parse_requirements(filename, finder=finder, options=options, session=session):
|
||||
- requirement_set.add_requirement(req)
|
||||
- if not requirement_set.has_requirements:
|
||||
- opts = {'name': self.name}
|
||||
- if options.find_links:
|
||||
- msg = ('You must give at least one requirement to %(name)s '
|
||||
- '(maybe you meant "pip %(name)s %(links)s"?)' %
|
||||
- dict(opts, links=' '.join(options.find_links)))
|
||||
- else:
|
||||
- msg = ('You must give at least one requirement '
|
||||
- 'to %(name)s (see "pip help %(name)s")' % opts)
|
||||
- logger.warn(msg)
|
||||
- return
|
||||
-
|
||||
- try:
|
||||
- if not options.no_download:
|
||||
- requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
|
||||
- else:
|
||||
- requirement_set.locate_files()
|
||||
-
|
||||
- if not options.no_install and not self.bundle:
|
||||
- requirement_set.install(
|
||||
- install_options,
|
||||
- global_options,
|
||||
- root=options.root_path,
|
||||
- strip_file_prefix=options.strip_file_prefix)
|
||||
- installed = ' '.join([req.name for req in
|
||||
- requirement_set.successfully_installed])
|
||||
- if installed:
|
||||
- logger.notify('Successfully installed %s' % installed)
|
||||
- elif not self.bundle:
|
||||
- downloaded = ' '.join([req.name for req in
|
||||
- requirement_set.successfully_downloaded])
|
||||
- if downloaded:
|
||||
- logger.notify('Successfully downloaded %s' % downloaded)
|
||||
- elif self.bundle:
|
||||
- requirement_set.create_bundle(self.bundle_filename)
|
||||
- logger.notify('Created bundle in %s' % self.bundle_filename)
|
||||
- except PreviousBuildDirError:
|
||||
- options.no_clean = True
|
||||
- raise
|
||||
- finally:
|
||||
- # Clean up
|
||||
- if (not options.no_clean) and ((not options.no_install) or options.download_dir):
|
||||
- requirement_set.cleanup_files(bundle=self.bundle)
|
||||
+ build_delete = (not (options.no_clean or options.build_dir))
|
||||
+ with BuildDirectory(options.build_dir, delete=build_delete) as build_dir:
|
||||
+ requirement_set = RequirementSet(
|
||||
+ build_dir=build_dir,
|
||||
+ src_dir=options.src_dir,
|
||||
+ download_dir=options.download_dir,
|
||||
+ download_cache=options.download_cache,
|
||||
+ upgrade=options.upgrade,
|
||||
+ as_egg=options.as_egg,
|
||||
+ ignore_installed=options.ignore_installed,
|
||||
+ ignore_dependencies=options.ignore_dependencies,
|
||||
+ force_reinstall=options.force_reinstall,
|
||||
+ use_user_site=options.use_user_site,
|
||||
+ target_dir=temp_target_dir,
|
||||
+ session=session,
|
||||
+ pycompile=options.compile,
|
||||
+ )
|
||||
+ for name in args:
|
||||
+ requirement_set.add_requirement(
|
||||
+ InstallRequirement.from_line(name, None))
|
||||
+ for name in options.editables:
|
||||
+ requirement_set.add_requirement(
|
||||
+ InstallRequirement.from_editable(name, default_vcs=options.default_vcs))
|
||||
+ for filename in options.requirements:
|
||||
+ for req in parse_requirements(filename, finder=finder, options=options, session=session):
|
||||
+ requirement_set.add_requirement(req)
|
||||
+ if not requirement_set.has_requirements:
|
||||
+ opts = {'name': self.name}
|
||||
+ if options.find_links:
|
||||
+ msg = ('You must give at least one requirement to %(name)s '
|
||||
+ '(maybe you meant "pip %(name)s %(links)s"?)' %
|
||||
+ dict(opts, links=' '.join(options.find_links)))
|
||||
+ else:
|
||||
+ msg = ('You must give at least one requirement '
|
||||
+ 'to %(name)s (see "pip help %(name)s")' % opts)
|
||||
+ logger.warn(msg)
|
||||
+ return
|
||||
+
|
||||
+ try:
|
||||
+ if not options.no_download:
|
||||
+ requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
|
||||
+ else:
|
||||
+ requirement_set.locate_files()
|
||||
+
|
||||
+ if not options.no_install and not self.bundle:
|
||||
+ requirement_set.install(
|
||||
+ install_options,
|
||||
+ global_options,
|
||||
+ root=options.root_path,
|
||||
+ strip_file_prefix=options.strip_file_prefix)
|
||||
+ installed = ' '.join([req.name for req in
|
||||
+ requirement_set.successfully_installed])
|
||||
+ if installed:
|
||||
+ logger.notify('Successfully installed %s' % installed)
|
||||
+ elif not self.bundle:
|
||||
+ downloaded = ' '.join([req.name for req in
|
||||
+ requirement_set.successfully_downloaded])
|
||||
+ if downloaded:
|
||||
+ logger.notify('Successfully downloaded %s' % downloaded)
|
||||
+ elif self.bundle:
|
||||
+ requirement_set.create_bundle(self.bundle_filename)
|
||||
+ logger.notify('Created bundle in %s' % self.bundle_filename)
|
||||
+ except PreviousBuildDirError:
|
||||
+ options.no_clean = True
|
||||
+ raise
|
||||
+ finally:
|
||||
+ # Clean up
|
||||
+ if (not options.no_clean) and ((not options.no_install) or options.download_dir):
|
||||
+ requirement_set.cleanup_files(bundle=self.bundle)
|
||||
|
||||
if options.target_dir:
|
||||
if not os.path.exists(options.target_dir):
|
||||
diff --git a/pip/commands/wheel.py b/pip/commands/wheel.py
|
||||
index 6527063..a96631a 100644
|
||||
--- a/pip/commands/wheel.py
|
||||
+++ b/pip/commands/wheel.py
|
||||
@@ -8,7 +8,7 @@ from pip.index import PackageFinder
|
||||
from pip.log import logger
|
||||
from pip.exceptions import CommandError, PreviousBuildDirError
|
||||
from pip.req import InstallRequirement, RequirementSet, parse_requirements
|
||||
-from pip.util import normalize_path
|
||||
+from pip.util import BuildDirectory, normalize_path
|
||||
from pip.wheel import WheelBuilder
|
||||
from pip import cmdoptions
|
||||
|
||||
@@ -123,6 +123,9 @@ class WheelCommand(Command):
|
||||
"--extra-index-url is suggested.")
|
||||
index_urls += options.mirrors
|
||||
|
||||
+ if options.build_dir:
|
||||
+ options.build_dir = os.path.abspath(options.build_dir)
|
||||
+
|
||||
session = self._build_session(options)
|
||||
|
||||
finder = PackageFinder(find_links=options.find_links,
|
||||
@@ -137,59 +140,60 @@ class WheelCommand(Command):
|
||||
session=session,
|
||||
)
|
||||
|
||||
- options.build_dir = os.path.abspath(options.build_dir)
|
||||
- requirement_set = RequirementSet(
|
||||
- build_dir=options.build_dir,
|
||||
- src_dir=None,
|
||||
- download_dir=None,
|
||||
- download_cache=options.download_cache,
|
||||
- ignore_dependencies=options.ignore_dependencies,
|
||||
- ignore_installed=True,
|
||||
- session=session,
|
||||
- wheel_download_dir=options.wheel_dir
|
||||
- )
|
||||
-
|
||||
- # make the wheelhouse
|
||||
- if not os.path.exists(options.wheel_dir):
|
||||
- os.makedirs(options.wheel_dir)
|
||||
-
|
||||
- #parse args and/or requirements files
|
||||
- for name in args:
|
||||
- requirement_set.add_requirement(
|
||||
- InstallRequirement.from_line(name, None))
|
||||
-
|
||||
- for filename in options.requirements:
|
||||
- for req in parse_requirements(
|
||||
- filename,
|
||||
- finder=finder,
|
||||
- options=options,
|
||||
- session=session):
|
||||
- if req.editable:
|
||||
- logger.notify("ignoring %s" % req.url)
|
||||
- continue
|
||||
- requirement_set.add_requirement(req)
|
||||
-
|
||||
- #fail if no requirements
|
||||
- if not requirement_set.has_requirements:
|
||||
- opts = {'name': self.name}
|
||||
- msg = ('You must give at least one requirement '
|
||||
- 'to %(name)s (see "pip help %(name)s")' % opts)
|
||||
- logger.error(msg)
|
||||
- return
|
||||
+ build_delete = (not (options.no_clean or options.build_dir))
|
||||
+ with BuildDirectory(options.build_dir, delete=build_delete) as build_dir:
|
||||
+ requirement_set = RequirementSet(
|
||||
+ build_dir=build_dir,
|
||||
+ src_dir=None,
|
||||
+ download_dir=None,
|
||||
+ download_cache=options.download_cache,
|
||||
+ ignore_dependencies=options.ignore_dependencies,
|
||||
+ ignore_installed=True,
|
||||
+ session=session,
|
||||
+ wheel_download_dir=options.wheel_dir
|
||||
+ )
|
||||
|
||||
- try:
|
||||
- #build wheels
|
||||
- wb = WheelBuilder(
|
||||
- requirement_set,
|
||||
- finder,
|
||||
- options.wheel_dir,
|
||||
- build_options = options.build_options or [],
|
||||
- global_options = options.global_options or []
|
||||
- )
|
||||
- wb.build()
|
||||
- except PreviousBuildDirError:
|
||||
- options.no_clean = True
|
||||
- raise
|
||||
- finally:
|
||||
- if not options.no_clean:
|
||||
- requirement_set.cleanup_files()
|
||||
+ # make the wheelhouse
|
||||
+ if not os.path.exists(options.wheel_dir):
|
||||
+ os.makedirs(options.wheel_dir)
|
||||
+
|
||||
+ #parse args and/or requirements files
|
||||
+ for name in args:
|
||||
+ requirement_set.add_requirement(
|
||||
+ InstallRequirement.from_line(name, None))
|
||||
+
|
||||
+ for filename in options.requirements:
|
||||
+ for req in parse_requirements(
|
||||
+ filename,
|
||||
+ finder=finder,
|
||||
+ options=options,
|
||||
+ session=session):
|
||||
+ if req.editable:
|
||||
+ logger.notify("ignoring %s" % req.url)
|
||||
+ continue
|
||||
+ requirement_set.add_requirement(req)
|
||||
+
|
||||
+ #fail if no requirements
|
||||
+ if not requirement_set.has_requirements:
|
||||
+ opts = {'name': self.name}
|
||||
+ msg = ('You must give at least one requirement '
|
||||
+ 'to %(name)s (see "pip help %(name)s")' % opts)
|
||||
+ logger.error(msg)
|
||||
+ return
|
||||
+
|
||||
+ try:
|
||||
+ #build wheels
|
||||
+ wb = WheelBuilder(
|
||||
+ requirement_set,
|
||||
+ finder,
|
||||
+ options.wheel_dir,
|
||||
+ build_options = options.build_options or [],
|
||||
+ global_options = options.global_options or []
|
||||
+ )
|
||||
+ wb.build()
|
||||
+ except PreviousBuildDirError:
|
||||
+ options.no_clean = True
|
||||
+ raise
|
||||
+ finally:
|
||||
+ if not options.no_clean:
|
||||
+ requirement_set.cleanup_files()
|
||||
diff --git a/pip/util.py b/pip/util.py
|
||||
index f459bb2..f5edeeb 100644
|
||||
--- a/pip/util.py
|
||||
+++ b/pip/util.py
|
||||
@@ -8,6 +8,7 @@ import zipfile
|
||||
import tarfile
|
||||
import subprocess
|
||||
import textwrap
|
||||
+import tempfile
|
||||
|
||||
from pip.exceptions import InstallationError, BadCommand, PipError
|
||||
from pip.backwardcompat import(WindowsError, string_types, raw_input,
|
||||
@@ -718,3 +719,35 @@ def is_prerelease(vers):
|
||||
|
||||
parsed = version._normalized_key(normalized)
|
||||
return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed])
|
||||
+
|
||||
+
|
||||
+class BuildDirectory(object):
|
||||
+
|
||||
+ def __init__(self, name=None, delete=None):
|
||||
+ # If we were not given an explicit directory, and we were not given an
|
||||
+ # explicit delete option, then we'll default to deleting.
|
||||
+ if name is None and delete is None:
|
||||
+ delete = True
|
||||
+
|
||||
+ if name is None:
|
||||
+ name = tempfile.mkdtemp(prefix="pip-build-")
|
||||
+ # If we were not given an explicit directory, and we were not given
|
||||
+ # an explicit delete option, then we'll default to deleting.
|
||||
+ if delete is None:
|
||||
+ delete = True
|
||||
+
|
||||
+ self.name = name
|
||||
+ self.delete = delete
|
||||
+
|
||||
+ def __repr__(self):
|
||||
+ return "<{} {!r}>".format(self.__class__.__name__, self.name)
|
||||
+
|
||||
+ def __enter__(self):
|
||||
+ return self.name
|
||||
+
|
||||
+ def __exit__(self, exc, value, tb):
|
||||
+ self.cleanup()
|
||||
+
|
||||
+ def cleanup(self):
|
||||
+ if self.delete:
|
||||
+ rmtree(self.name)
|
@ -1,683 +0,0 @@
|
||||
From 621800d5c65aea36c6a1d9b685ff88f35cfce476 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Orsava <torsava@redhat.com>
|
||||
Date: Fri, 15 Nov 2019 19:44:54 +0100
|
||||
Subject: [PATCH] Mark 6 tests as network tests
|
||||
|
||||
=================================== FAILURES ===================================
|
||||
_______________________________ test_freeze_path _______________________________
|
||||
tmpdir = Path('/tmp/pytest-of-mockbuild/pytest-0/test_freeze_path0')
|
||||
script = <tests.lib.PipTestEnvironment object at 0x7fe950a4caf0>
|
||||
data = <tests.lib.TestData object at 0x7fe950a4cc10>
|
||||
def test_freeze_path(tmpdir, script, data):
|
||||
"""
|
||||
Test freeze with --path.
|
||||
"""
|
||||
> script.pip('install', '--find-links', data.find_links,
|
||||
'--target', tmpdir, 'simple==2.0')
|
||||
tests/functional/test_freeze.py:712:
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
tests/lib/__init__.py:593: in run
|
||||
_check_stderr(
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
stderr = "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'N...t at 0x7fe6435ef280>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/\n"
|
||||
allow_stderr_warning = False, allow_stderr_error = False
|
||||
def _check_stderr(
|
||||
stderr, allow_stderr_warning, allow_stderr_error,
|
||||
):
|
||||
"""
|
||||
Check the given stderr for logged warnings and errors.
|
||||
|
||||
:param stderr: stderr output as a string.
|
||||
:param allow_stderr_warning: whether a logged warning (or deprecation
|
||||
message) is allowed. Must be True if allow_stderr_error is True.
|
||||
:param allow_stderr_error: whether a logged error is allowed.
|
||||
"""
|
||||
assert not (allow_stderr_error and not allow_stderr_warning)
|
||||
|
||||
lines = stderr.splitlines()
|
||||
for line in lines:
|
||||
# First check for logging errors, which we don't allow during
|
||||
# tests even if allow_stderr_error=True (since a logging error
|
||||
# would signal a bug in pip's code).
|
||||
# Unlike errors logged with logger.error(), these errors are
|
||||
# sent directly to stderr and so bypass any configured log formatter.
|
||||
# The "--- Logging error ---" string is used in Python 3.4+, and
|
||||
# "Logged from file " is used in Python 2.
|
||||
if (line.startswith('--- Logging error ---') or
|
||||
line.startswith('Logged from file ')):
|
||||
reason = 'stderr has a logging error, which is never allowed'
|
||||
msg = make_check_stderr_message(stderr, line=line, reason=reason)
|
||||
raise RuntimeError(msg)
|
||||
if allow_stderr_error:
|
||||
continue
|
||||
|
||||
if line.startswith('ERROR: '):
|
||||
reason = (
|
||||
'stderr has an unexpected error '
|
||||
'(pass allow_stderr_error=True to permit this)'
|
||||
)
|
||||
msg = make_check_stderr_message(stderr, line=line, reason=reason)
|
||||
raise RuntimeError(msg)
|
||||
if allow_stderr_warning:
|
||||
continue
|
||||
|
||||
if (line.startswith('WARNING: ') or
|
||||
line.startswith(DEPRECATION_MSG_PREFIX)):
|
||||
reason = (
|
||||
'stderr has an unexpected warning '
|
||||
'(pass allow_stderr_warning=True to permit this)'
|
||||
)
|
||||
msg = make_check_stderr_message(stderr, line=line, reason=reason)
|
||||
> raise RuntimeError(msg)
|
||||
E RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this):
|
||||
E Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe64364c850>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/"
|
||||
E Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe64364c850>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
|
||||
E WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe64364cdc0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
|
||||
E WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe64364cf70>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
|
||||
E WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe6435ef130>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
|
||||
E WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe6435ef280>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
|
||||
tests/lib/__init__.py:404: RuntimeError
|
||||
________________________ test_freeze_path_exclude_user _________________________
|
||||
tmpdir = Path('/tmp/pytest-of-mockbuild/pytest-0/test_freeze_path_exclude_user0')
|
||||
script = <tests.lib.PipTestEnvironment object at 0x7fe950ec8fa0>
|
||||
data = <tests.lib.TestData object at 0x7fe950ec8a30>
|
||||
def test_freeze_path_exclude_user(tmpdir, script, data):
|
||||
"""
|
||||
Test freeze with --path and make sure packages from --user are not picked
|
||||
up.
|
||||
"""
|
||||
script.pip_install_local('--find-links', data.find_links,
|
||||
'--user', 'simple2')
|
||||
> script.pip('install', '--find-links', data.find_links,
|
||||
'--target', tmpdir, 'simple==1.0')
|
||||
tests/functional/test_freeze.py:728:
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
tests/lib/__init__.py:593: in run
|
||||
_check_stderr(
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
stderr = "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'N...t at 0x7f87ae751310>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/\n"
|
||||
allow_stderr_warning = False, allow_stderr_error = False
|
||||
def _check_stderr(
|
||||
stderr, allow_stderr_warning, allow_stderr_error,
|
||||
):
|
||||
"""
|
||||
Check the given stderr for logged warnings and errors.
|
||||
|
||||
:param stderr: stderr output as a string.
|
||||
:param allow_stderr_warning: whether a logged warning (or deprecation
|
||||
message) is allowed. Must be True if allow_stderr_error is True.
|
||||
:param allow_stderr_error: whether a logged error is allowed.
|
||||
"""
|
||||
assert not (allow_stderr_error and not allow_stderr_warning)
|
||||
|
||||
lines = stderr.splitlines()
|
||||
for line in lines:
|
||||
# First check for logging errors, which we don't allow during
|
||||
# tests even if allow_stderr_error=True (since a logging error
|
||||
# would signal a bug in pip's code).
|
||||
# Unlike errors logged with logger.error(), these errors are
|
||||
# sent directly to stderr and so bypass any configured log formatter.
|
||||
# The "--- Logging error ---" string is used in Python 3.4+, and
|
||||
# "Logged from file " is used in Python 2.
|
||||
if (line.startswith('--- Logging error ---') or
|
||||
line.startswith('Logged from file ')):
|
||||
reason = 'stderr has a logging error, which is never allowed'
|
||||
msg = make_check_stderr_message(stderr, line=line, reason=reason)
|
||||
raise RuntimeError(msg)
|
||||
if allow_stderr_error:
|
||||
continue
|
||||
|
||||
if line.startswith('ERROR: '):
|
||||
reason = (
|
||||
'stderr has an unexpected error '
|
||||
'(pass allow_stderr_error=True to permit this)'
|
||||
)
|
||||
msg = make_check_stderr_message(stderr, line=line, reason=reason)
|
||||
raise RuntimeError(msg)
|
||||
if allow_stderr_warning:
|
||||
continue
|
||||
|
||||
if (line.startswith('WARNING: ') or
|
||||
line.startswith(DEPRECATION_MSG_PREFIX)):
|
||||
reason = (
|
||||
'stderr has an unexpected warning '
|
||||
'(pass allow_stderr_warning=True to permit this)'
|
||||
)
|
||||
msg = make_check_stderr_message(stderr, line=line, reason=reason)
|
||||
> raise RuntimeError(msg)
|
||||
E RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this):
|
||||
E Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f87ae7aa8e0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/"
|
||||
E Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f87ae7aa8e0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
|
||||
E WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f87ae7aae50>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
|
||||
E WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f87ae751040>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
|
||||
E WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f87ae7511c0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
|
||||
E WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f87ae751310>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
|
||||
tests/lib/__init__.py:404: RuntimeError
|
||||
__________________________ test_freeze_path_multiple ___________________________
|
||||
tmpdir = Path('/tmp/pytest-of-mockbuild/pytest-0/test_freeze_path_multiple0')
|
||||
script = <tests.lib.PipTestEnvironment object at 0x7fe950b43fd0>
|
||||
data = <tests.lib.TestData object at 0x7fe950b43df0>
|
||||
def test_freeze_path_multiple(tmpdir, script, data):
|
||||
"""
|
||||
Test freeze with multiple --path arguments.
|
||||
"""
|
||||
path1 = tmpdir / "path1"
|
||||
os.mkdir(path1)
|
||||
path2 = tmpdir / "path2"
|
||||
os.mkdir(path2)
|
||||
> script.pip('install', '--find-links', data.find_links,
|
||||
'--target', path1, 'simple==2.0')
|
||||
tests/functional/test_freeze.py:750:
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
tests/lib/__init__.py:593: in run
|
||||
_check_stderr(
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
stderr = "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'N...t at 0x7f07e6253280>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/\n"
|
||||
allow_stderr_warning = False, allow_stderr_error = False
|
||||
def _check_stderr(
|
||||
stderr, allow_stderr_warning, allow_stderr_error,
|
||||
):
|
||||
"""
|
||||
Check the given stderr for logged warnings and errors.
|
||||
|
||||
:param stderr: stderr output as a string.
|
||||
:param allow_stderr_warning: whether a logged warning (or deprecation
|
||||
message) is allowed. Must be True if allow_stderr_error is True.
|
||||
:param allow_stderr_error: whether a logged error is allowed.
|
||||
"""
|
||||
assert not (allow_stderr_error and not allow_stderr_warning)
|
||||
|
||||
lines = stderr.splitlines()
|
||||
for line in lines:
|
||||
# First check for logging errors, which we don't allow during
|
||||
# tests even if allow_stderr_error=True (since a logging error
|
||||
# would signal a bug in pip's code).
|
||||
# Unlike errors logged with logger.error(), these errors are
|
||||
# sent directly to stderr and so bypass any configured log formatter.
|
||||
# The "--- Logging error ---" string is used in Python 3.4+, and
|
||||
# "Logged from file " is used in Python 2.
|
||||
if (line.startswith('--- Logging error ---') or
|
||||
line.startswith('Logged from file ')):
|
||||
reason = 'stderr has a logging error, which is never allowed'
|
||||
msg = make_check_stderr_message(stderr, line=line, reason=reason)
|
||||
raise RuntimeError(msg)
|
||||
if allow_stderr_error:
|
||||
continue
|
||||
|
||||
if line.startswith('ERROR: '):
|
||||
reason = (
|
||||
'stderr has an unexpected error '
|
||||
'(pass allow_stderr_error=True to permit this)'
|
||||
)
|
||||
msg = make_check_stderr_message(stderr, line=line, reason=reason)
|
||||
raise RuntimeError(msg)
|
||||
if allow_stderr_warning:
|
||||
continue
|
||||
|
||||
if (line.startswith('WARNING: ') or
|
||||
line.startswith(DEPRECATION_MSG_PREFIX)):
|
||||
reason = (
|
||||
'stderr has an unexpected warning '
|
||||
'(pass allow_stderr_warning=True to permit this)'
|
||||
)
|
||||
msg = make_check_stderr_message(stderr, line=line, reason=reason)
|
||||
> raise RuntimeError(msg)
|
||||
E RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this):
|
||||
E Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f07e62ae850>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/"
|
||||
E Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f07e62ae850>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
|
||||
E WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f07e62aedc0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
|
||||
E WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f07e62aef70>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
|
||||
E WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f07e6253130>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
|
||||
E WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f07e6253280>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
|
||||
tests/lib/__init__.py:404: RuntimeError
|
||||
_________________ test_install_no_binary_builds_pep_517_wheel __________________
|
||||
script = <tests.lib.PipTestEnvironment object at 0x7fe9509f4e20>
|
||||
data = <tests.lib.TestData object at 0x7fe9509f4640>, with_wheel = None
|
||||
def test_install_no_binary_builds_pep_517_wheel(script, data, with_wheel):
|
||||
to_install = data.packages.joinpath('pep517_setup_and_pyproject')
|
||||
> res = script.pip(
|
||||
'install', '--no-binary=:all:', '-f', data.find_links, to_install
|
||||
)
|
||||
tests/functional/test_install.py:1279:
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
self = <tests.lib.PipTestEnvironment object at 0x7fe9509f4e20>
|
||||
args = ('python', '-m', 'pip', 'install', '--no-binary=:all:', '-f', ...)
|
||||
kw = {'expect_stderr': True}
|
||||
cwd = Path('/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/scratch')
|
||||
run_from = None, allow_stderr_error = False, allow_stderr_warning = False
|
||||
expect_error = None
|
||||
def run(self, *args, **kw):
|
||||
"""
|
||||
:param allow_stderr_error: whether a logged error is allowed in
|
||||
stderr. Passing True for this argument implies
|
||||
`allow_stderr_warning` since warnings are weaker than errors.
|
||||
:param allow_stderr_warning: whether a logged warning (or
|
||||
deprecation message) is allowed in stderr.
|
||||
:param expect_error: if False (the default), asserts that the command
|
||||
exits with 0. Otherwise, asserts that the command exits with a
|
||||
non-zero exit code. Passing True also implies allow_stderr_error
|
||||
and allow_stderr_warning.
|
||||
:param expect_stderr: whether to allow warnings in stderr (equivalent
|
||||
to `allow_stderr_warning`). This argument is an abbreviated
|
||||
version of `allow_stderr_warning` and is also kept for backwards
|
||||
compatibility.
|
||||
"""
|
||||
if self.verbose:
|
||||
print('>> running %s %s' % (args, kw))
|
||||
|
||||
cwd = kw.pop('cwd', None)
|
||||
run_from = kw.pop('run_from', None)
|
||||
assert not cwd or not run_from, "Don't use run_from; it's going away"
|
||||
cwd = cwd or run_from or self.cwd
|
||||
if sys.platform == 'win32':
|
||||
# Partial fix for ScriptTest.run using `shell=True` on Windows.
|
||||
args = [str(a).replace('^', '^^').replace('&', '^&') for a in args]
|
||||
|
||||
# Remove `allow_stderr_error` and `allow_stderr_warning` before
|
||||
# calling run() because PipTestEnvironment doesn't support them.
|
||||
allow_stderr_error = kw.pop('allow_stderr_error', None)
|
||||
allow_stderr_warning = kw.pop('allow_stderr_warning', None)
|
||||
|
||||
# Propagate default values.
|
||||
expect_error = kw.get('expect_error')
|
||||
if expect_error:
|
||||
# Then default to allowing logged errors.
|
||||
if allow_stderr_error is not None and not allow_stderr_error:
|
||||
raise RuntimeError(
|
||||
'cannot pass allow_stderr_error=False with '
|
||||
'expect_error=True'
|
||||
)
|
||||
allow_stderr_error = True
|
||||
|
||||
elif kw.get('expect_stderr'):
|
||||
# Then default to allowing logged warnings.
|
||||
if allow_stderr_warning is not None and not allow_stderr_warning:
|
||||
raise RuntimeError(
|
||||
'cannot pass allow_stderr_warning=False with '
|
||||
'expect_stderr=True'
|
||||
)
|
||||
allow_stderr_warning = True
|
||||
|
||||
if allow_stderr_error:
|
||||
if allow_stderr_warning is not None and not allow_stderr_warning:
|
||||
raise RuntimeError(
|
||||
'cannot pass allow_stderr_warning=False with '
|
||||
'allow_stderr_error=True'
|
||||
)
|
||||
|
||||
# Default values if not set.
|
||||
if allow_stderr_error is None:
|
||||
allow_stderr_error = False
|
||||
if allow_stderr_warning is None:
|
||||
allow_stderr_warning = allow_stderr_error
|
||||
|
||||
# Pass expect_stderr=True to allow any stderr. We do this because
|
||||
# we do our checking of stderr further on in check_stderr().
|
||||
kw['expect_stderr'] = True
|
||||
> result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
|
||||
E AssertionError: Script returned code: 1
|
||||
tests/lib/__init__.py:586: AssertionError
|
||||
----------------------------- Captured stdout call -----------------------------
|
||||
Script result: python -m pip install --no-binary=:all: -f file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages/pep517_setup_and_pyproject
|
||||
return code: 1
|
||||
-- stderr: --------------------
|
||||
ERROR: Command errored out with exit status 1:
|
||||
command: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/venv/bin/python /builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-build-env-ntp1m4dh/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --find-links file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages -- setuptools
|
||||
cwd: None
|
||||
Complete output (28 lines):
|
||||
Looking in links: file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages
|
||||
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7234ef1e50>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
|
||||
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7234e92040>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
|
||||
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7234e921c0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
|
||||
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7234e92340>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
|
||||
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7234e924c0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
|
||||
Processing /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages/setuptools-0.9.6.tar.gz
|
||||
ERROR: Command errored out with exit status 1:
|
||||
command: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setup.py'"'"'; __file__='"'"'/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/pip-egg-info
|
||||
cwd: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/
|
||||
Complete output (15 lines):
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/__init__.py", line 2, in <module>
|
||||
from setuptools.extension import Extension, Library
|
||||
File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/extension.py", line 5, in <module>
|
||||
from setuptools.dist import _get_unpatched
|
||||
File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/dist.py", line 7, in <module>
|
||||
from setuptools.command.install import install
|
||||
File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/command/__init__.py", line 8, in <module>
|
||||
from setuptools.command import install_scripts
|
||||
File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/command/install_scripts.py", line 3, in <module>
|
||||
from pkg_resources import Distribution, PathMetadata, ensure_directory
|
||||
File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/pkg_resources.py", line 1545, in <module>
|
||||
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
|
||||
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
|
||||
----------------------------------------
|
||||
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
|
||||
----------------------------------------
|
||||
ERROR: Command errored out with exit status 1: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/venv/bin/python /builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-build-env-ntp1m4dh/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --find-links file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages -- setuptools Check the logs for full command output.
|
||||
-- stdout: --------------------
|
||||
Looking in links: file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages
|
||||
Processing /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages/pep517_setup_and_pyproject
|
||||
Installing build dependencies: started
|
||||
Installing build dependencies: finished with status 'error'
|
||||
_______________________ test_config_file_override_stack ________________________
|
||||
script = <tests.lib.PipTestEnvironment object at 0x7fe950d9b7f0>
|
||||
virtualenv = <VirtualEnvironment /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/venv>
|
||||
def test_config_file_override_stack(script, virtualenv):
|
||||
"""
|
||||
Test config files (global, overriding a global config with a
|
||||
local, overriding all with a command line flag).
|
||||
|
||||
"""
|
||||
fd, config_file = tempfile.mkstemp('-pip.cfg', 'test-')
|
||||
try:
|
||||
> _test_config_file_override_stack(script, virtualenv, config_file)
|
||||
tests/functional/test_install_config.py:144:
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
tests/functional/test_install_config.py:172: in _test_config_file_override_stack
|
||||
result = script.pip(
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
self = <tests.lib.PipTestEnvironment object at 0x7fe950d9b7f0>
|
||||
args = ('python', '-m', 'pip', 'install', '-vvv', '--index-url', ...)
|
||||
kw = {'expect_stderr': True}
|
||||
cwd = Path('/tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/scratch')
|
||||
run_from = None, allow_stderr_error = False, allow_stderr_warning = False
|
||||
expect_error = None
|
||||
def run(self, *args, **kw):
|
||||
"""
|
||||
:param allow_stderr_error: whether a logged error is allowed in
|
||||
stderr. Passing True for this argument implies
|
||||
`allow_stderr_warning` since warnings are weaker than errors.
|
||||
:param allow_stderr_warning: whether a logged warning (or
|
||||
deprecation message) is allowed in stderr.
|
||||
:param expect_error: if False (the default), asserts that the command
|
||||
exits with 0. Otherwise, asserts that the command exits with a
|
||||
non-zero exit code. Passing True also implies allow_stderr_error
|
||||
and allow_stderr_warning.
|
||||
:param expect_stderr: whether to allow warnings in stderr (equivalent
|
||||
to `allow_stderr_warning`). This argument is an abbreviated
|
||||
version of `allow_stderr_warning` and is also kept for backwards
|
||||
compatibility.
|
||||
"""
|
||||
if self.verbose:
|
||||
print('>> running %s %s' % (args, kw))
|
||||
|
||||
cwd = kw.pop('cwd', None)
|
||||
run_from = kw.pop('run_from', None)
|
||||
assert not cwd or not run_from, "Don't use run_from; it's going away"
|
||||
cwd = cwd or run_from or self.cwd
|
||||
if sys.platform == 'win32':
|
||||
# Partial fix for ScriptTest.run using `shell=True` on Windows.
|
||||
args = [str(a).replace('^', '^^').replace('&', '^&') for a in args]
|
||||
|
||||
# Remove `allow_stderr_error` and `allow_stderr_warning` before
|
||||
# calling run() because PipTestEnvironment doesn't support them.
|
||||
allow_stderr_error = kw.pop('allow_stderr_error', None)
|
||||
allow_stderr_warning = kw.pop('allow_stderr_warning', None)
|
||||
|
||||
# Propagate default values.
|
||||
expect_error = kw.get('expect_error')
|
||||
if expect_error:
|
||||
# Then default to allowing logged errors.
|
||||
if allow_stderr_error is not None and not allow_stderr_error:
|
||||
raise RuntimeError(
|
||||
'cannot pass allow_stderr_error=False with '
|
||||
'expect_error=True'
|
||||
)
|
||||
allow_stderr_error = True
|
||||
|
||||
elif kw.get('expect_stderr'):
|
||||
# Then default to allowing logged warnings.
|
||||
if allow_stderr_warning is not None and not allow_stderr_warning:
|
||||
raise RuntimeError(
|
||||
'cannot pass allow_stderr_warning=False with '
|
||||
'expect_stderr=True'
|
||||
)
|
||||
allow_stderr_warning = True
|
||||
|
||||
if allow_stderr_error:
|
||||
if allow_stderr_warning is not None and not allow_stderr_warning:
|
||||
raise RuntimeError(
|
||||
'cannot pass allow_stderr_warning=False with '
|
||||
'allow_stderr_error=True'
|
||||
)
|
||||
|
||||
# Default values if not set.
|
||||
if allow_stderr_error is None:
|
||||
allow_stderr_error = False
|
||||
if allow_stderr_warning is None:
|
||||
allow_stderr_warning = allow_stderr_error
|
||||
|
||||
# Pass expect_stderr=True to allow any stderr. We do this because
|
||||
# we do our checking of stderr further on in check_stderr().
|
||||
kw['expect_stderr'] = True
|
||||
> result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
|
||||
E AssertionError: Script returned code: 1
|
||||
tests/lib/__init__.py:586: AssertionError
|
||||
----------------------------- Captured stdout call -----------------------------
|
||||
Script result: python -m pip install -vvv --index-url https://pypi.org/simple/ INITools
|
||||
return code: 1
|
||||
-- stderr: --------------------
|
||||
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9669c3d8b0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
|
||||
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9669c3da60>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
|
||||
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9669c3dbe0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
|
||||
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9669c3dd60>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
|
||||
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f966900f490>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
|
||||
ERROR: Could not find a version that satisfies the requirement INITools (from versions: none)
|
||||
ERROR: No matching distribution found for INITools
|
||||
-- stdout: --------------------
|
||||
Created temporary directory: /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-ephem-wheel-cache-6gj33ens
|
||||
Created temporary directory: /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-req-tracker-s7_2cwgc
|
||||
Created requirements tracker '/tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-req-tracker-s7_2cwgc'
|
||||
Created temporary directory: /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-install-_91mh3df
|
||||
Looking in indexes: https://pypi.org/simple/
|
||||
1 location(s) to search for versions of INITools:
|
||||
* https://pypi.org/simple/initools/
|
||||
Getting page https://pypi.org/simple/initools/
|
||||
Found index url https://pypi.org/simple/
|
||||
Looking up "https://pypi.org/simple/initools/" in the cache
|
||||
Request header has "max_age" as 0, cache bypassed
|
||||
Starting new HTTPS connection (1): pypi.org:443
|
||||
Incremented Retry for (url='/simple/initools/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
|
||||
Starting new HTTPS connection (2): pypi.org:443
|
||||
Incremented Retry for (url='/simple/initools/'): Retry(total=3, connect=None, read=None, redirect=None, status=None)
|
||||
Starting new HTTPS connection (3): pypi.org:443
|
||||
Incremented Retry for (url='/simple/initools/'): Retry(total=2, connect=None, read=None, redirect=None, status=None)
|
||||
Starting new HTTPS connection (4): pypi.org:443
|
||||
Incremented Retry for (url='/simple/initools/'): Retry(total=1, connect=None, read=None, redirect=None, status=None)
|
||||
Starting new HTTPS connection (5): pypi.org:443
|
||||
Incremented Retry for (url='/simple/initools/'): Retry(total=0, connect=None, read=None, redirect=None, status=None)
|
||||
Starting new HTTPS connection (6): pypi.org:443
|
||||
Could not fetch URL https://pypi.org/simple/initools/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/initools/ (Caused by NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9669c15b50>: Failed to establish a new connection: [Errno -2] Name or service not known')) - skipping
|
||||
Given no hashes to check 0 links for project 'INITools': discarding no candidates
|
||||
Cleaning up...
|
||||
Removed build tracker '/tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-req-tracker-s7_2cwgc'
|
||||
Exception information:
|
||||
Traceback (most recent call last):
|
||||
File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 153, in _main
|
||||
status = self.run(options, args)
|
||||
File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 401, in run
|
||||
resolver.resolve(requirement_set)
|
||||
File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 202, in resolve
|
||||
self._resolve_one(requirement_set, req)
|
||||
File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 368, in _resolve_one
|
||||
abstract_dist = self._get_abstract_dist_for(req_to_install)
|
||||
File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 314, in _get_abstract_dist_for
|
||||
req.populate_link(self.finder, upgrade_allowed, self.require_hashes)
|
||||
File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 226, in populate_link
|
||||
self.link = finder.find_requirement(self, upgrade)
|
||||
File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/index.py", line 905, in find_requirement
|
||||
raise DistributionNotFound(
|
||||
pip._internal.exceptions.DistributionNotFound: No matching distribution found for INITools
|
||||
_______________________ test_no_upgrade_unless_requested _______________________
|
||||
script = <tests.lib.PipTestEnvironment object at 0x7fe950d86070>
|
||||
def test_no_upgrade_unless_requested(script):
|
||||
"""
|
||||
No upgrade if not specifically requested.
|
||||
|
||||
"""
|
||||
> script.pip('install', 'INITools==0.1')
|
||||
tests/functional/test_install_upgrade.py:16:
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
self = <tests.lib.PipTestEnvironment object at 0x7fe950d86070>
|
||||
args = ('python', '-m', 'pip', 'install', 'INITools==0.1')
|
||||
kw = {'expect_stderr': True}
|
||||
cwd = Path('/tmp/pytest-of-mockbuild/pytest-0/test_no_upgrade_unless_request0/workspace/scratch')
|
||||
run_from = None, allow_stderr_error = False, allow_stderr_warning = False
|
||||
expect_error = None
|
||||
def run(self, *args, **kw):
|
||||
"""
|
||||
:param allow_stderr_error: whether a logged error is allowed in
|
||||
stderr. Passing True for this argument implies
|
||||
`allow_stderr_warning` since warnings are weaker than errors.
|
||||
:param allow_stderr_warning: whether a logged warning (or
|
||||
deprecation message) is allowed in stderr.
|
||||
:param expect_error: if False (the default), asserts that the command
|
||||
exits with 0. Otherwise, asserts that the command exits with a
|
||||
non-zero exit code. Passing True also implies allow_stderr_error
|
||||
and allow_stderr_warning.
|
||||
:param expect_stderr: whether to allow warnings in stderr (equivalent
|
||||
to `allow_stderr_warning`). This argument is an abbreviated
|
||||
version of `allow_stderr_warning` and is also kept for backwards
|
||||
compatibility.
|
||||
"""
|
||||
if self.verbose:
|
||||
print('>> running %s %s' % (args, kw))
|
||||
|
||||
cwd = kw.pop('cwd', None)
|
||||
run_from = kw.pop('run_from', None)
|
||||
assert not cwd or not run_from, "Don't use run_from; it's going away"
|
||||
cwd = cwd or run_from or self.cwd
|
||||
if sys.platform == 'win32':
|
||||
# Partial fix for ScriptTest.run using `shell=True` on Windows.
|
||||
args = [str(a).replace('^', '^^').replace('&', '^&') for a in args]
|
||||
|
||||
# Remove `allow_stderr_error` and `allow_stderr_warning` before
|
||||
# calling run() because PipTestEnvironment doesn't support them.
|
||||
allow_stderr_error = kw.pop('allow_stderr_error', None)
|
||||
allow_stderr_warning = kw.pop('allow_stderr_warning', None)
|
||||
|
||||
# Propagate default values.
|
||||
expect_error = kw.get('expect_error')
|
||||
if expect_error:
|
||||
# Then default to allowing logged errors.
|
||||
if allow_stderr_error is not None and not allow_stderr_error:
|
||||
raise RuntimeError(
|
||||
'cannot pass allow_stderr_error=False with '
|
||||
'expect_error=True'
|
||||
)
|
||||
allow_stderr_error = True
|
||||
|
||||
elif kw.get('expect_stderr'):
|
||||
# Then default to allowing logged warnings.
|
||||
if allow_stderr_warning is not None and not allow_stderr_warning:
|
||||
raise RuntimeError(
|
||||
'cannot pass allow_stderr_warning=False with '
|
||||
'expect_stderr=True'
|
||||
)
|
||||
allow_stderr_warning = True
|
||||
|
||||
if allow_stderr_error:
|
||||
if allow_stderr_warning is not None and not allow_stderr_warning:
|
||||
raise RuntimeError(
|
||||
'cannot pass allow_stderr_warning=False with '
|
||||
'allow_stderr_error=True'
|
||||
)
|
||||
|
||||
# Default values if not set.
|
||||
if allow_stderr_error is None:
|
||||
allow_stderr_error = False
|
||||
if allow_stderr_warning is None:
|
||||
allow_stderr_warning = allow_stderr_error
|
||||
|
||||
# Pass expect_stderr=True to allow any stderr. We do this because
|
||||
# we do our checking of stderr further on in check_stderr().
|
||||
kw['expect_stderr'] = True
|
||||
> result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
|
||||
E AssertionError: Script returned code: 1
|
||||
tests/lib/__init__.py:586: AssertionError
|
||||
----------------------------- Captured stdout call -----------------------------
|
||||
Script result: python -m pip install INITools==0.1
|
||||
return code: 1
|
||||
-- stderr: --------------------
|
||||
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd66cc36700>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
|
||||
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd66cc36c40>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
|
||||
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd66cc36dc0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
|
||||
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd66cc36f40>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
|
||||
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd66be48100>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
|
||||
ERROR: Could not find a version that satisfies the requirement INITools==0.1 (from versions: none)
|
||||
ERROR: No matching distribution found for INITools==0.1
|
||||
---
|
||||
tests/functional/test_freeze.py | 3 +++
|
||||
tests/functional/test_install.py | 1 +
|
||||
tests/functional/test_install_config.py | 1 +
|
||||
tests/functional/test_install_upgrade.py | 1 +
|
||||
4 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/tests/functional/test_freeze.py b/tests/functional/test_freeze.py
|
||||
index 546a482..aabb0ca 100644
|
||||
--- a/tests/functional/test_freeze.py
|
||||
+++ b/tests/functional/test_freeze.py
|
||||
@@ -705,6 +705,7 @@ def test_freeze_user(script, virtualenv, data):
|
||||
assert 'simple2' not in result.stdout
|
||||
|
||||
|
||||
+@pytest.mark.network
|
||||
def test_freeze_path(tmpdir, script, data):
|
||||
"""
|
||||
Test freeze with --path.
|
||||
@@ -718,6 +719,7 @@ def test_freeze_path(tmpdir, script, data):
|
||||
_check_output(result.stdout, expected)
|
||||
|
||||
|
||||
+@pytest.mark.network
|
||||
def test_freeze_path_exclude_user(tmpdir, script, data):
|
||||
"""
|
||||
Test freeze with --path and make sure packages from --user are not picked
|
||||
@@ -739,6 +741,7 @@ def test_freeze_path_exclude_user(tmpdir, script, data):
|
||||
_check_output(result.stdout, expected)
|
||||
|
||||
|
||||
+@pytest.mark.network
|
||||
def test_freeze_path_multiple(tmpdir, script, data):
|
||||
"""
|
||||
Test freeze with multiple --path arguments.
|
||||
diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py
|
||||
index 0bea054..b816df6 100644
|
||||
--- a/tests/functional/test_install.py
|
||||
+++ b/tests/functional/test_install.py
|
||||
@@ -1274,6 +1274,7 @@ def test_install_no_binary_disables_building_wheels(script, data, with_wheel):
|
||||
assert "Running setup.py install for upper" in str(res), str(res)
|
||||
|
||||
|
||||
+@pytest.mark.network
|
||||
def test_install_no_binary_builds_pep_517_wheel(script, data, with_wheel):
|
||||
to_install = data.packages.joinpath('pep517_setup_and_pyproject')
|
||||
res = script.pip(
|
||||
diff --git a/tests/functional/test_install_config.py b/tests/functional/test_install_config.py
|
||||
index bcf83f1..c9c60a2 100644
|
||||
--- a/tests/functional/test_install_config.py
|
||||
+++ b/tests/functional/test_install_config.py
|
||||
@@ -133,6 +133,7 @@ def test_command_line_appends_correctly(script, data):
|
||||
), 'stdout: {}'.format(result.stdout)
|
||||
|
||||
|
||||
+@pytest.mark.network
|
||||
def test_config_file_override_stack(script, virtualenv):
|
||||
"""
|
||||
Test config files (global, overriding a global config with a
|
||||
diff --git a/tests/functional/test_install_upgrade.py b/tests/functional/test_install_upgrade.py
|
||||
index 36b518b..c34a961 100644
|
||||
--- a/tests/functional/test_install_upgrade.py
|
||||
+++ b/tests/functional/test_install_upgrade.py
|
||||
@@ -8,6 +8,7 @@ from tests.lib import assert_all_changes, pyversion
|
||||
from tests.lib.local_repos import local_checkout
|
||||
|
||||
|
||||
+@pytest.mark.network
|
||||
def test_no_upgrade_unless_requested(script):
|
||||
"""
|
||||
No upgrade if not specifically requested.
|
||||
--
|
||||
2.20.1
|
||||
|
Loading…
Reference in New Issue
Block a user