Open
Description
Environment
- pip version: bf0da0f
- Python version: 3.8.1 (Framework build as installed from python.org)
- OS: macOS 10.15.3
Description
Running the test suite on a clean checkout (tox
with TOXENV=python
), 16 tests fail consistently.
Expected behavior
Test suite should pass on popular operating systems.
Output
pip master $ tox
GLOB sdist-make: /Users/jaraco/code/public/pypa/pip/setup.py
python inst-nodeps: /Users/jaraco/code/public/pypa/pip/.tox/.tmp/package/1/pip-20.1.dev0.zip
python installed: apipkg==1.5,atomicwrites==1.3.0,attrs==19.3.0,cffi==1.14.0,coverage==5.0.3,cryptography==2.8,csv23==0.1.6,execnet==1.7.1,freezegun==0.3.15,mock==4.0.1,more-itertools==8.2.0,pip==20.1.dev0,pluggy==0.13.1,pretend==1.0.9,py==1.8.1,pycparser==2.19,pytest==3.8.2,pytest-cov==2.8.1,pytest-forked==1.1.3,pytest-rerunfailures==6.0,pytest-timeout==1.3.4,pytest-xdist==1.27.0,python-dateutil==2.8.1,PyYAML==5.3,scripttest==1.3,setuptools==41.2.0,six==1.14.0,virtualenv==16.7.10,Werkzeug==0.16.0,wheel==0.34.2
python run-test-pre: PYTHONHASHSEED='1967842165'
python run-test-pre: commands[0] | python -c 'import shutil, sys; shutil.rmtree(sys.argv[1], ignore_errors=True)' /Users/jaraco/code/public/pypa/pip/tests/data/common_wheels
python run-test-pre: commands[1] | python /Users/jaraco/code/public/pypa/pip/tools/tox_pip.py wheel -w /Users/jaraco/code/public/pypa/pip/tests/data/common_wheels -r /Users/jaraco/code/public/pypa/pip/tools/requirements/tests-common_wheels.txt
Collecting setuptools>=40.8.0
Using cached setuptools-45.2.0-py3-none-any.whl (584 kB)
Saved ./tests/data/common_wheels/setuptools-45.2.0-py3-none-any.whl
Collecting wheel
Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
Saved ./tests/data/common_wheels/wheel-0.34.2-py2.py3-none-any.whl
Skipping setuptools, due to already being wheel.
Skipping wheel, due to already being wheel.
python run-test: commands[0] | pytest --timeout 300
========================================================================== test session starts ===========================================================================
platform darwin -- Python 3.8.1, pytest-3.8.2, py-1.8.1, pluggy-0.13.1
rootdir: /Users/jaraco/code/public/pypa/pip, inifile: setup.cfg
plugins: timeout-1.3.4, rerunfailures-6.0, forked-1.1.3, cov-2.8.1, xdist-1.27.0
timeout: 300.0s
timeout method: signal
timeout func_only: False
collected 1833 items
tests/functional/test_broken_stdout.py ... [ 0%]
tests/functional/test_check.py .......... [ 0%]
tests/functional/test_cli.py ... [ 0%]
tests/functional/test_completion.py ..................... [ 2%]
tests/functional/test_configuration.py .s... [ 2%]
tests/functional/test_debug.py ............. [ 3%]
tests/functional/test_download.py ...................................... [ 5%]
tests/functional/test_freeze.py .....Fx................. [ 6%]
tests/functional/test_hash.py ... [ 6%]
tests/functional/test_help.py ....... [ 6%]
tests/functional/test_install.py .......................F........................s.............................................................F........ [ 13%]
tests/functional/test_install_check.py .. [ 13%]
tests/functional/test_install_cleanup.py ......... [ 14%]
tests/functional/test_install_compat.py .. [ 14%]
tests/functional/test_install_config.py ........ [ 14%]
tests/functional/test_install_extras.py ....... [ 14%]
tests/functional/test_install_force_reinstall.py .. [ 15%]
tests/functional/test_install_index.py .... [ 15%]
tests/functional/test_install_reqs.py ........F..........................x... [ 17%]
tests/functional/test_install_upgrade.py ................... [ 18%]
tests/functional/test_install_user.py .FF.FFFF. [ 18%]
tests/functional/test_install_vcs_git.py ........................ [ 20%]
tests/functional/test_install_wheel.py .............F................ [ 21%]
tests/functional/test_list.py ............................ [ 23%]
tests/functional/test_no_color.py s [ 23%]
tests/functional/test_pep517.py ............. [ 24%]
tests/functional/test_requests.py s [ 24%]
tests/functional/test_search.py ...s....... [ 24%]
tests/functional/test_show.py .................... [ 25%]
tests/functional/test_uninstall.py .............F.F........ [ 27%]
tests/functional/test_uninstall_user.py FFF [ 27%]
tests/functional/test_vcs_bazaar.py s.. [ 27%]
tests/functional/test_vcs_git.py ........... [ 28%]
tests/functional/test_vcs_mercurial.py . [ 28%]
tests/functional/test_warning.py ....ss [ 28%]
tests/functional/test_wheel.py .................... [ 29%]
tests/functional/test_yaml.py xx...........x [ 30%]
tests/lib/test_lib.py .................... [ 31%]
tests/lib/test_wheel.py ................. [ 32%]
tests/unit/test_appdirs.py ................. [ 33%]
tests/unit/test_base_command.py ............ [ 33%]
tests/unit/test_build_env.py ..... [ 34%]
tests/unit/test_cache.py ...... [ 34%]
tests/unit/test_check.py .. [ 34%]
tests/unit/test_cmdoptions.py ........... [ 35%]
tests/unit/test_collector.py ...........................................s............s.s................... [ 39%]
tests/unit/test_command_install.py ............... [ 40%]
tests/unit/test_commands.py .................................. [ 42%]
tests/unit/test_compat.py .................. [ 43%]
tests/unit/test_configuration.py ...................... [ 44%]
tests/unit/test_finder.py ............................... [ 46%]
tests/unit/test_format_control.py ......... [ 46%]
tests/unit/test_index.py .................................................................................................... [ 52%]
tests/unit/test_link.py .................................. [ 53%]
tests/unit/test_locations.py .ss [ 54%]
tests/unit/test_logging.py ............. [ 54%]
tests/unit/test_models.py ..... [ 55%]
tests/unit/test_models_wheel.py ................. [ 55%]
tests/unit/test_network_auth.py ................... [ 57%]
tests/unit/test_network_cache.py ..... [ 57%]
tests/unit/test_network_download.py ................... [ 58%]
tests/unit/test_network_session.py ............................. [ 59%]
tests/unit/test_operations_prepare.py ........... [ 60%]
tests/unit/test_options.py ........................................................... [ 63%]
tests/unit/test_packaging.py .... [ 63%]
tests/unit/test_pep425tags.py ........... [ 64%]
tests/unit/test_pep517.py ....... [ 64%]
tests/unit/test_req.py .................................................sss....... [ 68%]
tests/unit/test_req_file.py ............................................................. [ 71%]
tests/unit/test_req_install.py ..... [ 71%]
tests/unit/test_req_uninstall.py ............. [ 72%]
tests/unit/test_resolution_legacy_resolver.py ....... [ 72%]
tests/unit/test_search_scope.py .. [ 72%]
tests/unit/test_self_check_outdated.py ................ [ 73%]
tests/unit/test_target_python.py ................... [ 74%]
tests/unit/test_urls.py .....s........s [ 75%]
tests/unit/test_utils.py ......................................................................................................................................... [ 83%]
........... [ 83%]
tests/unit/test_utils_distutils_args.py ................. [ 84%]
tests/unit/test_utils_filesystem.py ....... [ 85%]
tests/unit/test_utils_pkg_resources.py .. [ 85%]
tests/unit/test_utils_subprocess.py ......ss............. [ 86%]
tests/unit/test_utils_temp_dir.py ..................................... [ 88%]
tests/unit/test_utils_unpacking.py ........... [ 88%]
tests/unit/test_utils_virtualenv.py ..................... [ 90%]
tests/unit/test_utils_wheel.py ............ [ 90%]
tests/unit/test_vcs.py s................................................................................................. [ 96%]
tests/unit/test_vcs_mercurial.py . [ 96%]
tests/unit/test_wheel.py ....................................... [ 98%]
tests/unit/test_wheel_builder.py ................................ [100%]
================================================================================ FAILURES ================================================================================
____________________________________________________________________________ test_freeze_svn _____________________________________________________________________________
script = <tests.lib.PipTestEnvironment object at 0x110f42af0>
tmpdir = Path('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_freeze_svn0')
@need_svn
def test_freeze_svn(script, tmpdir):
"""Test freezing a svn checkout"""
> checkout_path = _create_test_package(script, vcs='svn')
tests/functional/test_freeze.py:178:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/lib/__init__.py:869: in _create_test_package
return _vcs_add(script, version_pkg_path, vcs)
tests/lib/__init__.py:771: in _vcs_add
repo_url = _create_svn_repo(script, version_pkg_path)
tests/lib/__init__.py:875: in _create_svn_repo
script.run(
tests/lib/__init__.py:591: in run
result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:854: in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <subprocess.Popen object at 0x110f616d0>, args = ['svnadmin', 'create', 'pip-test-package-repo'], executable = b'svnadmin', preexec_fn = None, close_fds = True
pass_fds = (), cwd = Path('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_freeze_svn0/workspace/scratch')
env = {'GIT_AUTHOR_EMAIL': '[email protected]', 'GIT_AUTHOR_NAME': 'pip', 'GIT_CONFIG_NOSYSTEM': '1', 'HOME': '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_freeze_svn0/home', ...}
startupinfo = None, creationflags = 0, shell = False, p2cread = 9, p2cwrite = 12, c2pread = 13, c2pwrite = 14, errread = 15, errwrite = 16, restore_signals = True
start_new_session = False
def _execute_child(self, args, executable, preexec_fn, close_fds,
pass_fds, cwd, env,
startupinfo, creationflags, shell,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite,
restore_signals, start_new_session):
"""Execute program (POSIX version)"""
if isinstance(args, (str, bytes)):
args = [args]
elif isinstance(args, os.PathLike):
if shell:
raise TypeError('path-like args is not allowed when '
'shell is true')
args = [args]
else:
args = list(args)
if shell:
# On Android the default shell is at '/system/bin/sh'.
unix_shell = ('/system/bin/sh' if
hasattr(sys, 'getandroidapilevel') else '/bin/sh')
args = [unix_shell, "-c"] + args
if executable:
args[0] = executable
if executable is None:
executable = args[0]
sys.audit("subprocess.Popen", executable, args, cwd, env)
if (_USE_POSIX_SPAWN
and os.path.dirname(executable)
and preexec_fn is None
and not close_fds
and not pass_fds
and cwd is None
and (p2cread == -1 or p2cread > 2)
and (c2pwrite == -1 or c2pwrite > 2)
and (errwrite == -1 or errwrite > 2)
and not start_new_session):
self._posix_spawn(args, executable, env, restore_signals,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite)
return
orig_executable = executable
# For transferring possible exec failure from child to parent.
# Data format: "exception name:hex errno:description"
# Pickle is not used; it is complex and involves memory allocation.
errpipe_read, errpipe_write = os.pipe()
# errpipe_write must not be in the standard io 0, 1, or 2 fd range.
low_fds_to_close = []
while errpipe_write < 3:
low_fds_to_close.append(errpipe_write)
errpipe_write = os.dup(errpipe_write)
for low_fd in low_fds_to_close:
os.close(low_fd)
try:
try:
# We must avoid complex work that could involve
# malloc or free in the child process to avoid
# potential deadlocks, thus we do all this here.
# and pass it to fork_exec()
if env is not None:
env_list = []
for k, v in env.items():
k = os.fsencode(k)
if b'=' in k:
raise ValueError("illegal environment variable name")
env_list.append(k + b'=' + os.fsencode(v))
else:
env_list = None # Use execv instead of execve.
executable = os.fsencode(executable)
if os.path.dirname(executable):
executable_list = (executable,)
else:
# This matches the behavior of os._execvpe().
executable_list = tuple(
os.path.join(os.fsencode(dir), executable)
for dir in os.get_exec_path(env))
fds_to_keep = set(pass_fds)
fds_to_keep.add(errpipe_write)
self.pid = _posixsubprocess.fork_exec(
args, executable_list,
close_fds, tuple(sorted(map(int, fds_to_keep))),
cwd, env_list,
p2cread, p2cwrite, c2pread, c2pwrite,
errread, errwrite,
errpipe_read, errpipe_write,
restore_signals, start_new_session, preexec_fn)
self._child_created = True
finally:
# be sure the FD is closed no matter what
os.close(errpipe_write)
self._close_pipe_fds(p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite)
# Wait for exec to fail or succeed; possibly raising an
# exception (limited in size)
errpipe_data = bytearray()
while True:
part = os.read(errpipe_read, 50000)
errpipe_data += part
if not part or len(errpipe_data) > 50000:
break
finally:
# be sure the FD is closed no matter what
os.close(errpipe_read)
if errpipe_data:
try:
pid, sts = os.waitpid(self.pid, 0)
if pid == self.pid:
self._handle_exitstatus(sts)
else:
self.returncode = sys.maxsize
except ChildProcessError:
pass
try:
exception_name, hex_errno, err_msg = (
errpipe_data.split(b':', 2))
# The encoding here should match the encoding
# written in by the subprocess implementations
# like _posixsubprocess
err_msg = err_msg.decode()
except ValueError:
exception_name = b'SubprocessError'
hex_errno = b'0'
err_msg = 'Bad exception data from child: {!r}'.format(
bytes(errpipe_data))
child_exception_type = getattr(
builtins, exception_name.decode('ascii'),
SubprocessError)
if issubclass(child_exception_type, OSError) and hex_errno:
errno_num = int(hex_errno, 16)
child_exec_never_called = (err_msg == "noexec")
if child_exec_never_called:
err_msg = ""
# The error must be from chdir(cwd).
err_filename = cwd
else:
err_filename = orig_executable
if errno_num != 0:
err_msg = os.strerror(errno_num)
> raise child_exception_type(errno_num, err_msg, err_filename)
E FileNotFoundError: [Errno 2] No such file or directory: 'svnadmin'
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:1702: FileNotFoundError
__________________________________________________________________ test_basic_install_editable_from_svn __________________________________________________________________
script = <tests.lib.PipTestEnvironment object at 0x110a24c70>
@need_svn
def test_basic_install_editable_from_svn(script):
"""
Test checking out from svn.
"""
checkout_path = _create_test_package(script)
> repo_url = _create_svn_repo(script, checkout_path)
tests/functional/test_install.py:273:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/lib/__init__.py:875: in _create_svn_repo
script.run(
tests/lib/__init__.py:591: in run
result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:854: in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <subprocess.Popen object at 0x110c11f40>, args = ['svnadmin', 'create', 'pip-test-package-repo'], executable = b'svnadmin', preexec_fn = None, close_fds = True
pass_fds = (), cwd = Path('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_basic_install_editable_fr0/workspace/scratch')
env = {'GIT_AUTHOR_EMAIL': '[email protected]', 'GIT_AUTHOR_NAME': 'pip', 'GIT_CONFIG_NOSYSTEM': '1', 'HOME': '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_basic_install_editable_fr0/home', ...}
startupinfo = None, creationflags = 0, shell = False, p2cread = 9, p2cwrite = 12, c2pread = 13, c2pwrite = 14, errread = 15, errwrite = 16, restore_signals = True
start_new_session = False
def _execute_child(self, args, executable, preexec_fn, close_fds,
pass_fds, cwd, env,
startupinfo, creationflags, shell,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite,
restore_signals, start_new_session):
"""Execute program (POSIX version)"""
if isinstance(args, (str, bytes)):
args = [args]
elif isinstance(args, os.PathLike):
if shell:
raise TypeError('path-like args is not allowed when '
'shell is true')
args = [args]
else:
args = list(args)
if shell:
# On Android the default shell is at '/system/bin/sh'.
unix_shell = ('/system/bin/sh' if
hasattr(sys, 'getandroidapilevel') else '/bin/sh')
args = [unix_shell, "-c"] + args
if executable:
args[0] = executable
if executable is None:
executable = args[0]
sys.audit("subprocess.Popen", executable, args, cwd, env)
if (_USE_POSIX_SPAWN
and os.path.dirname(executable)
and preexec_fn is None
and not close_fds
and not pass_fds
and cwd is None
and (p2cread == -1 or p2cread > 2)
and (c2pwrite == -1 or c2pwrite > 2)
and (errwrite == -1 or errwrite > 2)
and not start_new_session):
self._posix_spawn(args, executable, env, restore_signals,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite)
return
orig_executable = executable
# For transferring possible exec failure from child to parent.
# Data format: "exception name:hex errno:description"
# Pickle is not used; it is complex and involves memory allocation.
errpipe_read, errpipe_write = os.pipe()
# errpipe_write must not be in the standard io 0, 1, or 2 fd range.
low_fds_to_close = []
while errpipe_write < 3:
low_fds_to_close.append(errpipe_write)
errpipe_write = os.dup(errpipe_write)
for low_fd in low_fds_to_close:
os.close(low_fd)
try:
try:
# We must avoid complex work that could involve
# malloc or free in the child process to avoid
# potential deadlocks, thus we do all this here.
# and pass it to fork_exec()
if env is not None:
env_list = []
for k, v in env.items():
k = os.fsencode(k)
if b'=' in k:
raise ValueError("illegal environment variable name")
env_list.append(k + b'=' + os.fsencode(v))
else:
env_list = None # Use execv instead of execve.
executable = os.fsencode(executable)
if os.path.dirname(executable):
executable_list = (executable,)
else:
# This matches the behavior of os._execvpe().
executable_list = tuple(
os.path.join(os.fsencode(dir), executable)
for dir in os.get_exec_path(env))
fds_to_keep = set(pass_fds)
fds_to_keep.add(errpipe_write)
self.pid = _posixsubprocess.fork_exec(
args, executable_list,
close_fds, tuple(sorted(map(int, fds_to_keep))),
cwd, env_list,
p2cread, p2cwrite, c2pread, c2pwrite,
errread, errwrite,
errpipe_read, errpipe_write,
restore_signals, start_new_session, preexec_fn)
self._child_created = True
finally:
# be sure the FD is closed no matter what
os.close(errpipe_write)
self._close_pipe_fds(p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite)
# Wait for exec to fail or succeed; possibly raising an
# exception (limited in size)
errpipe_data = bytearray()
while True:
part = os.read(errpipe_read, 50000)
errpipe_data += part
if not part or len(errpipe_data) > 50000:
break
finally:
# be sure the FD is closed no matter what
os.close(errpipe_read)
if errpipe_data:
try:
pid, sts = os.waitpid(self.pid, 0)
if pid == self.pid:
self._handle_exitstatus(sts)
else:
self.returncode = sys.maxsize
except ChildProcessError:
pass
try:
exception_name, hex_errno, err_msg = (
errpipe_data.split(b':', 2))
# The encoding here should match the encoding
# written in by the subprocess implementations
# like _posixsubprocess
err_msg = err_msg.decode()
except ValueError:
exception_name = b'SubprocessError'
hex_errno = b'0'
err_msg = 'Bad exception data from child: {!r}'.format(
bytes(errpipe_data))
child_exception_type = getattr(
builtins, exception_name.decode('ascii'),
SubprocessError)
if issubclass(child_exception_type, OSError) and hex_errno:
errno_num = int(hex_errno, 16)
child_exec_never_called = (err_msg == "noexec")
if child_exec_never_called:
err_msg = ""
# The error must be from chdir(cwd).
err_filename = cwd
else:
err_filename = orig_executable
if errno_num != 0:
err_msg = os.strerror(errno_num)
> raise child_exception_type(errno_num, err_msg, err_filename)
E FileNotFoundError: [Errno 2] No such file or directory: 'svnadmin'
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:1702: FileNotFoundError
_______________________________________________________________________ test_user_config_accepted ________________________________________________________________________
script = <tests.lib.PipTestEnvironment object at 0x110cd5850>
@pytest.mark.incompatible_with_test_venv
def test_user_config_accepted(script):
# user set in the config file is parsed as 0/1 instead of True/False.
# Check that this doesn't cause a problem.
config_file = script.scratch_path / 'pip.conf'
script.environ['PIP_CONFIG_FILE'] = str(config_file)
config_file.write_text("[install]\nuser = true")
result = script.pip_install_local('simplewheel')
assert "Successfully installed simplewheel" in result.stdout
relative_user = os.path.relpath(script.user_site_path, script.base_path)
> assert join(relative_user, 'simplewheel') in result.files_created
E AssertionError: assert 'venv/user/lib/python/site-packages/simplewheel' in {'venv/user/lib/python3.8': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest...pytest-19/test_user_config_accepted0/workspace:venv/user/lib/python3.8/site-packages/simplewheel-2.0-1.dist-info>, ...}
E + where 'venv/user/lib/python/site-packages/simplewheel' = join('venv/user/lib/python/site-packages', 'simplewheel')
E + and {'venv/user/lib/python3.8': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest...pytest-19/test_user_config_accepted0/workspace:venv/user/lib/python3.8/site-packages/simplewheel-2.0-1.dist-info>, ...} = <tests.lib.TestPipResult object at 0x110c1f820>.files_created
tests/functional/test_install.py:1692: AssertionError
____________________________________________________________________ test_multiple_requirements_files ____________________________________________________________________
script = <tests.lib.PipTestEnvironment object at 0x110d4d550>
tmpdir = Path('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_multiple_requirements_fil0')
@pytest.mark.network
@need_svn
def test_multiple_requirements_files(script, tmpdir):
"""
Test installing from multiple nested requirements files.
"""
other_lib_name, other_lib_version = 'anyjson', '0.3'
script.scratch_path.joinpath("initools-req.txt").write_text(
textwrap.dedent("""
-e %s@10#egg=INITools
-r %s-req.txt
""") %
(
> local_checkout('svn+http://svn.colorstudy.com/INITools', tmpdir),
other_lib_name
),
)
tests/functional/test_install_reqs.py:127:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/lib/local_repos.py:63: in local_checkout
_create_svn_initools_repo(repo_url_path)
tests/lib/local_repos.py:22: in _create_svn_initools_repo
subprocess.check_call('svnadmin create INITools'.split(), cwd=directory)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:359: in check_call
retcode = call(*popenargs, **kwargs)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:340: in call
with Popen(*popenargs, **kwargs) as p:
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:854: in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <subprocess.Popen object at 0x110d4d4c0>, args = ['svnadmin', 'create', 'INITools'], executable = b'svnadmin', preexec_fn = None, close_fds = True, pass_fds = ()
cwd = '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_multiple_requirements_fil0/cache', env = None, startupinfo = None
creationflags = 0, shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False
def _execute_child(self, args, executable, preexec_fn, close_fds,
pass_fds, cwd, env,
startupinfo, creationflags, shell,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite,
restore_signals, start_new_session):
"""Execute program (POSIX version)"""
if isinstance(args, (str, bytes)):
args = [args]
elif isinstance(args, os.PathLike):
if shell:
raise TypeError('path-like args is not allowed when '
'shell is true')
args = [args]
else:
args = list(args)
if shell:
# On Android the default shell is at '/system/bin/sh'.
unix_shell = ('/system/bin/sh' if
hasattr(sys, 'getandroidapilevel') else '/bin/sh')
args = [unix_shell, "-c"] + args
if executable:
args[0] = executable
if executable is None:
executable = args[0]
sys.audit("subprocess.Popen", executable, args, cwd, env)
if (_USE_POSIX_SPAWN
and os.path.dirname(executable)
and preexec_fn is None
and not close_fds
and not pass_fds
and cwd is None
and (p2cread == -1 or p2cread > 2)
and (c2pwrite == -1 or c2pwrite > 2)
and (errwrite == -1 or errwrite > 2)
and not start_new_session):
self._posix_spawn(args, executable, env, restore_signals,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite)
return
orig_executable = executable
# For transferring possible exec failure from child to parent.
# Data format: "exception name:hex errno:description"
# Pickle is not used; it is complex and involves memory allocation.
errpipe_read, errpipe_write = os.pipe()
# errpipe_write must not be in the standard io 0, 1, or 2 fd range.
low_fds_to_close = []
while errpipe_write < 3:
low_fds_to_close.append(errpipe_write)
errpipe_write = os.dup(errpipe_write)
for low_fd in low_fds_to_close:
os.close(low_fd)
try:
try:
# We must avoid complex work that could involve
# malloc or free in the child process to avoid
# potential deadlocks, thus we do all this here.
# and pass it to fork_exec()
if env is not None:
env_list = []
for k, v in env.items():
k = os.fsencode(k)
if b'=' in k:
raise ValueError("illegal environment variable name")
env_list.append(k + b'=' + os.fsencode(v))
else:
env_list = None # Use execv instead of execve.
executable = os.fsencode(executable)
if os.path.dirname(executable):
executable_list = (executable,)
else:
# This matches the behavior of os._execvpe().
executable_list = tuple(
os.path.join(os.fsencode(dir), executable)
for dir in os.get_exec_path(env))
fds_to_keep = set(pass_fds)
fds_to_keep.add(errpipe_write)
self.pid = _posixsubprocess.fork_exec(
args, executable_list,
close_fds, tuple(sorted(map(int, fds_to_keep))),
cwd, env_list,
p2cread, p2cwrite, c2pread, c2pwrite,
errread, errwrite,
errpipe_read, errpipe_write,
restore_signals, start_new_session, preexec_fn)
self._child_created = True
finally:
# be sure the FD is closed no matter what
os.close(errpipe_write)
self._close_pipe_fds(p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite)
# Wait for exec to fail or succeed; possibly raising an
# exception (limited in size)
errpipe_data = bytearray()
while True:
part = os.read(errpipe_read, 50000)
errpipe_data += part
if not part or len(errpipe_data) > 50000:
break
finally:
# be sure the FD is closed no matter what
os.close(errpipe_read)
if errpipe_data:
try:
pid, sts = os.waitpid(self.pid, 0)
if pid == self.pid:
self._handle_exitstatus(sts)
else:
self.returncode = sys.maxsize
except ChildProcessError:
pass
try:
exception_name, hex_errno, err_msg = (
errpipe_data.split(b':', 2))
# The encoding here should match the encoding
# written in by the subprocess implementations
# like _posixsubprocess
err_msg = err_msg.decode()
except ValueError:
exception_name = b'SubprocessError'
hex_errno = b'0'
err_msg = 'Bad exception data from child: {!r}'.format(
bytes(errpipe_data))
child_exception_type = getattr(
builtins, exception_name.decode('ascii'),
SubprocessError)
if issubclass(child_exception_type, OSError) and hex_errno:
errno_num = int(hex_errno, 16)
child_exec_never_called = (err_msg == "noexec")
if child_exec_never_called:
err_msg = ""
# The error must be from chdir(cwd).
err_filename = cwd
else:
err_filename = orig_executable
if errno_num != 0:
err_msg = os.strerror(errno_num)
> raise child_exception_type(errno_num, err_msg, err_filename)
E FileNotFoundError: [Errno 2] No such file or directory: 'svnadmin'
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:1702: FileNotFoundError
________________________________________________ Tests_UserSite.test_install_subversion_usersite_editable_with_distribute ________________________________________________
self = <tests.functional.test_install_user.Tests_UserSite object at 0x111895610>, script = <tests.lib.PipTestEnvironment object at 0x1118892b0>
tmpdir = Path('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_subversion_usersi0')
@pytest.mark.network
@need_svn
@pytest.mark.incompatible_with_test_venv
def test_install_subversion_usersite_editable_with_distribute(
self, script, tmpdir):
"""
Test installing current directory ('.') into usersite after installing
distribute
"""
result = script.pip(
'install', '--user', '-e',
'%s#egg=initools' %
> local_checkout('svn+http://svn.colorstudy.com/INITools', tmpdir)
)
tests/functional/test_install_user.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/lib/local_repos.py:63: in local_checkout
_create_svn_initools_repo(repo_url_path)
tests/lib/local_repos.py:22: in _create_svn_initools_repo
subprocess.check_call('svnadmin create INITools'.split(), cwd=directory)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:359: in check_call
retcode = call(*popenargs, **kwargs)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:340: in call
with Popen(*popenargs, **kwargs) as p:
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:854: in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <subprocess.Popen object at 0x111889550>, args = ['svnadmin', 'create', 'INITools'], executable = b'svnadmin', preexec_fn = None, close_fds = True, pass_fds = ()
cwd = '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_subversion_usersi0/cache', env = None, startupinfo = None
creationflags = 0, shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False
def _execute_child(self, args, executable, preexec_fn, close_fds,
pass_fds, cwd, env,
startupinfo, creationflags, shell,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite,
restore_signals, start_new_session):
"""Execute program (POSIX version)"""
if isinstance(args, (str, bytes)):
args = [args]
elif isinstance(args, os.PathLike):
if shell:
raise TypeError('path-like args is not allowed when '
'shell is true')
args = [args]
else:
args = list(args)
if shell:
# On Android the default shell is at '/system/bin/sh'.
unix_shell = ('/system/bin/sh' if
hasattr(sys, 'getandroidapilevel') else '/bin/sh')
args = [unix_shell, "-c"] + args
if executable:
args[0] = executable
if executable is None:
executable = args[0]
sys.audit("subprocess.Popen", executable, args, cwd, env)
if (_USE_POSIX_SPAWN
and os.path.dirname(executable)
and preexec_fn is None
and not close_fds
and not pass_fds
and cwd is None
and (p2cread == -1 or p2cread > 2)
and (c2pwrite == -1 or c2pwrite > 2)
and (errwrite == -1 or errwrite > 2)
and not start_new_session):
self._posix_spawn(args, executable, env, restore_signals,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite)
return
orig_executable = executable
# For transferring possible exec failure from child to parent.
# Data format: "exception name:hex errno:description"
# Pickle is not used; it is complex and involves memory allocation.
errpipe_read, errpipe_write = os.pipe()
# errpipe_write must not be in the standard io 0, 1, or 2 fd range.
low_fds_to_close = []
while errpipe_write < 3:
low_fds_to_close.append(errpipe_write)
errpipe_write = os.dup(errpipe_write)
for low_fd in low_fds_to_close:
os.close(low_fd)
try:
try:
# We must avoid complex work that could involve
# malloc or free in the child process to avoid
# potential deadlocks, thus we do all this here.
# and pass it to fork_exec()
if env is not None:
env_list = []
for k, v in env.items():
k = os.fsencode(k)
if b'=' in k:
raise ValueError("illegal environment variable name")
env_list.append(k + b'=' + os.fsencode(v))
else:
env_list = None # Use execv instead of execve.
executable = os.fsencode(executable)
if os.path.dirname(executable):
executable_list = (executable,)
else:
# This matches the behavior of os._execvpe().
executable_list = tuple(
os.path.join(os.fsencode(dir), executable)
for dir in os.get_exec_path(env))
fds_to_keep = set(pass_fds)
fds_to_keep.add(errpipe_write)
self.pid = _posixsubprocess.fork_exec(
args, executable_list,
close_fds, tuple(sorted(map(int, fds_to_keep))),
cwd, env_list,
p2cread, p2cwrite, c2pread, c2pwrite,
errread, errwrite,
errpipe_read, errpipe_write,
restore_signals, start_new_session, preexec_fn)
self._child_created = True
finally:
# be sure the FD is closed no matter what
os.close(errpipe_write)
self._close_pipe_fds(p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite)
# Wait for exec to fail or succeed; possibly raising an
# exception (limited in size)
errpipe_data = bytearray()
while True:
part = os.read(errpipe_read, 50000)
errpipe_data += part
if not part or len(errpipe_data) > 50000:
break
finally:
# be sure the FD is closed no matter what
os.close(errpipe_read)
if errpipe_data:
try:
pid, sts = os.waitpid(self.pid, 0)
if pid == self.pid:
self._handle_exitstatus(sts)
else:
self.returncode = sys.maxsize
except ChildProcessError:
pass
try:
exception_name, hex_errno, err_msg = (
errpipe_data.split(b':', 2))
# The encoding here should match the encoding
# written in by the subprocess implementations
# like _posixsubprocess
err_msg = err_msg.decode()
except ValueError:
exception_name = b'SubprocessError'
hex_errno = b'0'
err_msg = 'Bad exception data from child: {!r}'.format(
bytes(errpipe_data))
child_exception_type = getattr(
builtins, exception_name.decode('ascii'),
SubprocessError)
if issubclass(child_exception_type, OSError) and hex_errno:
errno_num = int(hex_errno, 16)
child_exec_never_called = (err_msg == "noexec")
if child_exec_never_called:
err_msg = ""
# The error must be from chdir(cwd).
err_filename = cwd
else:
err_filename = orig_executable
if errno_num != 0:
err_msg = os.strerror(errno_num)
> raise child_exception_type(errno_num, err_msg, err_filename)
E FileNotFoundError: [Errno 2] No such file or directory: 'svnadmin'
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:1702: FileNotFoundError
____________________________________________________ Tests_UserSite.test_install_from_current_directory_into_usersite ____________________________________________________
self = <tests.functional.test_install_user.Tests_UserSite object at 0x1118e1280>, script = <tests.lib.PipTestEnvironment object at 0x1118b1280>
data = <tests.lib.TestData object at 0x1118b11f0>, with_wheel = None
@pytest.mark.incompatible_with_test_venv
def test_install_from_current_directory_into_usersite(
self, script, data, with_wheel):
"""
Test installing current directory ('.') into usersite
"""
run_from = data.packages.joinpath("FSPkg")
result = script.pip(
'install', '-vvv', '--user', curdir,
cwd=run_from,
)
fspkg_folder = script.user_site / 'fspkg'
> assert fspkg_folder in result.files_created, result.stdout
E AssertionError: User install by explicit request
E Created temporary directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-ephem-wheel-cache-hs30cvxo
E Created temporary directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-tracker-ykkzr6k1
E Initialized build tracking at /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-tracker-ykkzr6k1
E Created build tracker: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-tracker-ykkzr6k1
E Entered build tracker: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-tracker-ykkzr6k1
E Created temporary directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-install-3m98e45c
E Processing /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/data/packages/FSPkg
E Created temporary directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-build-drdhrnvi
E Added file:///private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/data/packages/FSPkg to build tracker '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-tracker-ykkzr6k1'
E Running setup.py (path:/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-build-drdhrnvi/setup.py) egg_info for package from file:///private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/data/packages/FSPkg
E Source in /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-build-drdhrnvi has version 0.1.dev0, which satisfies requirement FSPkg==0.1.dev0 from file:///private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/data/packages/FSPkg
E Removed FSPkg==0.1.dev0 from file:///private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/data/packages/FSPkg from build tracker '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-tracker-ykkzr6k1'
E Building wheels for collected packages: FSPkg
E Created temporary directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-wheel-fdhu41pb
E Building wheel for FSPkg (setup.py): started
E Destination directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-wheel-fdhu41pb
E Building wheel for FSPkg (setup.py): finished with status 'done'
E Created wheel for FSPkg: filename=FSPkg-0.1.dev0-py3-none-any.whl size=1459 sha256=b00fac4a46c4d0b8b2520a000f01c47face626108721389b43724ab12804676f
E Stored in directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-ephem-wheel-cache-hs30cvxo/wheels/91/3c/19/511ea121c22cba8261806be6173df523435d3646b9832c2d81
E Successfully built FSPkg
E Installing collected packages: FSPkg
E Created temporary directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-unpacked-wheel-yaqpheoo
E
E Successfully installed FSPkg-0.1.dev0
E Removed build tracker: '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-tracker-ykkzr6k1'
E
E assert Path('venv/user/lib/python/site-packages/fspkg') in {'venv/user/lib/python3.8': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest...st_install_from_current_dire0/workspace:venv/user/lib/python3.8/site-packages/FSPkg-0.1.dev0.dist-info/INSTALLER>, ...}
E + where {'venv/user/lib/python3.8': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest...st_install_from_current_dire0/workspace:venv/user/lib/python3.8/site-packages/FSPkg-0.1.dev0.dist-info/INSTALLER>, ...} = <tests.lib.TestPipResult object at 0x1118e1190>.files_created
tests/functional/test_install_user.py:73: AssertionError
_________________________________________________________ Tests_UserSite.test_install_user_conflict_in_usersite __________________________________________________________
self = <tests.functional.test_install_user.Tests_UserSite object at 0x1118dcf70>, script = <tests.lib.PipTestEnvironment object at 0x1118dcbe0>
@pytest.mark.network
@pytest.mark.incompatible_with_test_venv
def test_install_user_conflict_in_usersite(self, script):
"""
Test user install with conflict in usersite updates usersite.
"""
script.pip('install', '--user', 'INITools==0.3', '--no-binary=:all:')
result2 = script.pip(
'install', '--user', 'INITools==0.1', '--no-binary=:all:')
# usersite has 0.1
egg_info_folder = (
script.user_site / 'INITools-0.1-py%s.egg-info' % pyversion
)
initools_v3_file = (
# file only in 0.3
script.base_path / script.user_site / 'initools' /
'configparser.py'
)
> assert egg_info_folder in result2.files_created, str(result2)
E AssertionError: Script result: python -m pip install --user INITools==0.1 --no-binary=:all:
E -- stdout: --------------------
E Collecting INITools==0.1
E Downloading INITools-0.1.tar.gz (16 kB)
E Could not build wheels for INITools,since package 'wheel' is not installed.
E Installing collected packages: INITools
E Attempting uninstall: INITools
E Found existing installation: INITools 0.3
E Uninstalling INITools-0.3:
E Successfully uninstalled INITools-0.3
E Running setup.py install for INITools: started
E Running setup.py install for INITools: finished with status 'done'
E Successfully installed INITools-0.1
E
E -- created: -------------------
E venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info
E PKG-INFO (532 bytes)
E SOURCES.txt (332 bytes)
E dependency_links.txt (1 bytes)
E installed-files.txt (593 bytes)
E top_level.txt (9 bytes)
E zip-safe (1 bytes)
E -- deleted: -------------------
E venv/user/lib/python3.8/site-packages/INITools-0.3-py3.8.egg-info
E PKG-INFO (721 bytes)
E SOURCES.txt (688 bytes)
E dependency_links.txt (1 bytes)
E installed-files.txt (747 bytes)
E top_level.txt (9 bytes)
E zip-safe (1 bytes)
E initools/_setmixin.py (2488 bytes)
E configparser.py (34600 bytes)
E -- updated: -------------------
E venv/user/lib/python3.8/site-packages
E initools
E __init__.py (2 bytes)
E configwrapper.py (8346 bytes)
E iniparser.py (7948 bytes)
E inischema.py (13365 bytes)
E lazyiniparser.py (5274 bytes)
E lazyloader.py (8381 bytes)
E nested.py (5262 bytes)
E assert 'venv/user/lib/python/site-packages/INITools-0.1-py3.8.egg-info' in {'venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2...r_conflict_in_0/workspace:venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info/dependency_links.txt>, ...}
E + where {'venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2...r_conflict_in_0/workspace:venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info/dependency_links.txt>, ...} = <tests.lib.TestPipResult object at 0x11186f6a0>.files_created
tests/functional/test_install_user.py:120: AssertionError
________________________________________________________ Tests_UserSite.test_install_user_conflict_in_globalsite _________________________________________________________
self = <tests.functional.test_install_user.Tests_UserSite object at 0x110ea29a0>
virtualenv = <VirtualEnvironment /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_user_conflict_in_0/workspace/venv>
script = <tests.lib.PipTestEnvironment object at 0x110db7bb0>
@pytest.mark.network
@pytest.mark.incompatible_with_test_venv
def test_install_user_conflict_in_globalsite(self, virtualenv, script):
"""
Test user install with conflict in global site ignores site and
installs to usersite
"""
_patch_dist_in_site_packages(virtualenv)
script.pip('install', 'INITools==0.2', '--no-binary=:all:')
result2 = script.pip(
'install', '--user', 'INITools==0.1', '--no-binary=:all:')
# usersite has 0.1
egg_info_folder = (
script.user_site / 'INITools-0.1-py%s.egg-info' % pyversion
)
initools_folder = script.user_site / 'initools'
> assert egg_info_folder in result2.files_created, str(result2)
E AssertionError: Script result: python -m pip install --user INITools==0.1 --no-binary=:all:
E -- stdout: --------------------
E Collecting INITools==0.1
E Downloading INITools-0.1.tar.gz (16 kB)
E Could not build wheels for INITools,since package 'wheel' is not installed.
E Installing collected packages: INITools
E Running setup.py install for INITools: started
E Running setup.py install for INITools: finished with status 'done'
E Successfully installed INITools-0.1
E
E -- created: -------------------
E venv/user/lib/python3.8
E site-packages
E INITools-0.1-py3.8.egg-info
E PKG-INFO (532 bytes)
E SOURCES.txt (332 bytes)
E dependency_links.txt (1 bytes)
E installed-files.txt (593 bytes)
E top_level.txt (9 bytes)
E zip-safe (1 bytes)
E initools
E __init__.py (2 bytes)
E configwrapper.py (8346 bytes)
E iniparser.py (7948 bytes)
E inischema.py (13365 bytes)
E lazyiniparser.py (5274 bytes)
E lazyloader.py (8381 bytes)
E nested.py (5262 bytes)
E -- updated: -------------------
E venv/user/lib
E assert 'venv/user/lib/python/site-packages/INITools-0.1-py3.8.egg-info' in {'venv/user/lib/python3.8': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest..._install_user_conflict_in_0/workspace:venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info/PKG-INFO>, ...}
E + where {'venv/user/lib/python3.8': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest..._install_user_conflict_in_0/workspace:venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info/PKG-INFO>, ...} = <tests.lib.TestPipResult object at 0x110ec8f40>.files_created
tests/functional/test_install_user.py:142: AssertionError
________________________________________________________ Tests_UserSite.test_upgrade_user_conflict_in_globalsite _________________________________________________________
self = <tests.functional.test_install_user.Tests_UserSite object at 0x1118dcf40>
virtualenv = <VirtualEnvironment /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_upgrade_user_conflict_in_0/workspace/venv>
script = <tests.lib.PipTestEnvironment object at 0x110ed8670>
@pytest.mark.network
@pytest.mark.incompatible_with_test_venv
def test_upgrade_user_conflict_in_globalsite(self, virtualenv, script):
"""
Test user install/upgrade with conflict in global site ignores site and
installs to usersite
"""
_patch_dist_in_site_packages(virtualenv)
script.pip('install', 'INITools==0.2', '--no-binary=:all:')
result2 = script.pip(
'install', '--user', '--upgrade', 'INITools', '--no-binary=:all:')
# usersite has 0.3.1
egg_info_folder = (
script.user_site / 'INITools-0.3.1-py%s.egg-info' % pyversion
)
initools_folder = script.user_site / 'initools'
> assert egg_info_folder in result2.files_created, str(result2)
E AssertionError: Script result: python -m pip install --user --upgrade INITools --no-binary=:all:
E -- stdout: --------------------
E Collecting INITools
E Downloading INITools-0.3.1.tar.gz (21 kB)
E Could not build wheels for INITools,since package 'wheel' is not installed.
E Installing collected packages: INITools
E Running setup.py install for INITools: started
E Running setup.py install for INITools: finished with status 'done'
E Successfully installed INITools-0.3.1
E
E -- created: -------------------
E venv/user/lib/python3.8
E site-packages
E INITools-0.3.1-py3.8.egg-info
E PKG-INFO (874 bytes)
E SOURCES.txt (379 bytes)
E dependency_links.txt (1 bytes)
E installed-files.txt (747 bytes)
E top_level.txt (9 bytes)
E zip-safe (1 bytes)
E initools
E __init__.py (2 bytes)
E _setmixin.py (2488 bytes)
E configparser.py (34580 bytes)
E configwrapper.py (8550 bytes)
E iniparser.py (8097 bytes)
E inischema.py (13460 bytes)
E lazyiniparser.py (5274 bytes)
E lazyloader.py (8574 bytes)
E nested.py (5451 bytes)
E -- updated: -------------------
E venv/user/lib
E assert 'venv/user/lib/python/site-packages/INITools-0.3.1-py3.8.egg-info' in {'venv/user/lib/python3.8': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest...pgrade_user_conflict_in_0/workspace:venv/user/lib/python3.8/site-packages/INITools-0.3.1-py3.8.egg-info/PKG-INFO>, ...}
E + where {'venv/user/lib/python3.8': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest...pgrade_user_conflict_in_0/workspace:venv/user/lib/python3.8/site-packages/INITools-0.3.1-py3.8.egg-info/PKG-INFO>, ...} = <tests.lib.TestPipResult object at 0x1118cb700>.files_created
tests/functional/test_install_user.py:172: AssertionError
__________________________________________________ Tests_UserSite.test_install_user_conflict_in_globalsite_and_usersite __________________________________________________
self = <tests.functional.test_install_user.Tests_UserSite object at 0x1118ae2b0>
virtualenv = <VirtualEnvironment /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_user_conflict_in_0/workspace/venv>
script = <tests.lib.PipTestEnvironment object at 0x1118bf520>
@pytest.mark.network
@pytest.mark.incompatible_with_test_venv
def test_install_user_conflict_in_globalsite_and_usersite(
self, virtualenv, script):
"""
Test user install with conflict in globalsite and usersite ignores
global site and updates usersite.
"""
_patch_dist_in_site_packages(virtualenv)
script.pip('install', 'INITools==0.2', '--no-binary=:all:')
script.pip('install', '--user', 'INITools==0.3', '--no-binary=:all:')
result3 = script.pip(
'install', '--user', 'INITools==0.1', '--no-binary=:all:')
# usersite has 0.1
egg_info_folder = (
script.user_site / 'INITools-0.1-py%s.egg-info' % pyversion
)
initools_v3_file = (
# file only in 0.3
script.base_path / script.user_site / 'initools' /
'configparser.py'
)
> assert egg_info_folder in result3.files_created, str(result3)
E AssertionError: Script result: python -m pip install --user INITools==0.1 --no-binary=:all:
E -- stdout: --------------------
E Collecting INITools==0.1
E Downloading INITools-0.1.tar.gz (16 kB)
E Could not build wheels for INITools,since package 'wheel' is not installed.
E Installing collected packages: INITools
E Attempting uninstall: INITools
E Found existing installation: INITools 0.3
E Uninstalling INITools-0.3:
E Successfully uninstalled INITools-0.3
E Running setup.py install for INITools: started
E Running setup.py install for INITools: finished with status 'done'
E Successfully installed INITools-0.1
E
E -- created: -------------------
E venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info
E PKG-INFO (532 bytes)
E SOURCES.txt (332 bytes)
E dependency_links.txt (1 bytes)
E installed-files.txt (593 bytes)
E top_level.txt (9 bytes)
E zip-safe (1 bytes)
E -- deleted: -------------------
E venv/user/lib/python3.8/site-packages/INITools-0.3-py3.8.egg-info
E PKG-INFO (721 bytes)
E SOURCES.txt (688 bytes)
E dependency_links.txt (1 bytes)
E installed-files.txt (747 bytes)
E top_level.txt (9 bytes)
E zip-safe (1 bytes)
E initools/_setmixin.py (2488 bytes)
E configparser.py (34600 bytes)
E -- updated: -------------------
E venv/user/lib/python3.8/site-packages
E initools
E __init__.py (2 bytes)
E configwrapper.py (8346 bytes)
E iniparser.py (7948 bytes)
E inischema.py (13365 bytes)
E lazyiniparser.py (5274 bytes)
E lazyloader.py (8381 bytes)
E nested.py (5262 bytes)
E assert 'venv/user/lib/python/site-packages/INITools-0.1-py3.8.egg-info' in {'venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2...r_conflict_in_0/workspace:venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info/dependency_links.txt>, ...}
E + where {'venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2...r_conflict_in_0/workspace:venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info/dependency_links.txt>, ...} = <tests.lib.TestPipResult object at 0x1118aedc0>.files_created
tests/functional/test_install_user.py:209: AssertionError
________________________________________________________________________ test_install_user_wheel _________________________________________________________________________
script = <tests.lib.PipTestEnvironment object at 0x110effeb0>, shared_data = <tests.lib.TestData object at 0x1110fd0d0>, with_wheel = None
tmpdir = Path('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_user_wheel0')
@pytest.mark.incompatible_with_test_venv
def test_install_user_wheel(script, shared_data, with_wheel, tmpdir):
"""
Test user install from wheel (that has a script)
"""
shutil.copy(
shared_data.packages / "has.script-1.0-py2.py3-none-any.whl", tmpdir
)
result = script.pip(
'install', 'has.script==1.0', '--user', '--no-index',
'--find-links', tmpdir,
)
egg_info_folder = script.user_site / 'has.script-1.0.dist-info'
> assert egg_info_folder in result.files_created, str(result)
E AssertionError: Script result: python -m pip install has.script==1.0 --user --no-index --find-links /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_user_wheel0
E -- stdout: --------------------
E Looking in links: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_user_wheel0
E Processing /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_user_wheel0/has.script-1.0-py2.py3-none-any.whl
E Installing collected packages: has.script
E Successfully installed has.script-1.0
E
E -- created: -------------------
E venv/user/bin
E script.py (8 bytes)
E lib/python3.8
E site-packages
E has.script-1.0.dist-info
E DESCRIPTION.rst (10 bytes)
E INSTALLER (4 bytes)
E METADATA (172 bytes)
E RECORD (710 bytes)
E WHEEL (103 bytes)
E pydist.json (180 bytes)
E top_level.txt (1 bytes)
E -- updated: -------------------
E venv/user
E lib
E assert Path('venv/user/lib/python/site-packages/has.script-1.0.dist-info') in {'venv/user/bin': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_i...c6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_user_wheel0/workspace:venv/user/lib/python3.8/site-packages>, ...}
E + where {'venv/user/bin': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_i...c6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_user_wheel0/workspace:venv/user/lib/python3.8/site-packages>, ...} = <tests.lib.TestPipResult object at 0x110db7d00>.files_created
tests/functional/test_install_wheel.py:285: AssertionError
____________________________________________________________________ test_uninstall_editable_from_svn ____________________________________________________________________
script = <tests.lib.PipTestEnvironment object at 0x1118618b0>
tmpdir = Path('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_s0')
@pytest.mark.network
@need_svn
def test_uninstall_editable_from_svn(script, tmpdir):
"""
Test uninstalling an editable installation from svn.
"""
result = script.pip(
'install', '-e',
'%s#egg=initools' % (
> local_checkout('svn+http://svn.colorstudy.com/INITools', tmpdir)
),
)
tests/functional/test_uninstall.py:332:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/lib/local_repos.py:63: in local_checkout
_create_svn_initools_repo(repo_url_path)
tests/lib/local_repos.py:22: in _create_svn_initools_repo
subprocess.check_call('svnadmin create INITools'.split(), cwd=directory)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:359: in check_call
retcode = call(*popenargs, **kwargs)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:340: in call
with Popen(*popenargs, **kwargs) as p:
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:854: in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <subprocess.Popen object at 0x1118616a0>, args = ['svnadmin', 'create', 'INITools'], executable = b'svnadmin', preexec_fn = None, close_fds = True, pass_fds = ()
cwd = '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_s0/cache', env = None, startupinfo = None
creationflags = 0, shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False
def _execute_child(self, args, executable, preexec_fn, close_fds,
pass_fds, cwd, env,
startupinfo, creationflags, shell,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite,
restore_signals, start_new_session):
"""Execute program (POSIX version)"""
if isinstance(args, (str, bytes)):
args = [args]
elif isinstance(args, os.PathLike):
if shell:
raise TypeError('path-like args is not allowed when '
'shell is true')
args = [args]
else:
args = list(args)
if shell:
# On Android the default shell is at '/system/bin/sh'.
unix_shell = ('/system/bin/sh' if
hasattr(sys, 'getandroidapilevel') else '/bin/sh')
args = [unix_shell, "-c"] + args
if executable:
args[0] = executable
if executable is None:
executable = args[0]
sys.audit("subprocess.Popen", executable, args, cwd, env)
if (_USE_POSIX_SPAWN
and os.path.dirname(executable)
and preexec_fn is None
and not close_fds
and not pass_fds
and cwd is None
and (p2cread == -1 or p2cread > 2)
and (c2pwrite == -1 or c2pwrite > 2)
and (errwrite == -1 or errwrite > 2)
and not start_new_session):
self._posix_spawn(args, executable, env, restore_signals,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite)
return
orig_executable = executable
# For transferring possible exec failure from child to parent.
# Data format: "exception name:hex errno:description"
# Pickle is not used; it is complex and involves memory allocation.
errpipe_read, errpipe_write = os.pipe()
# errpipe_write must not be in the standard io 0, 1, or 2 fd range.
low_fds_to_close = []
while errpipe_write < 3:
low_fds_to_close.append(errpipe_write)
errpipe_write = os.dup(errpipe_write)
for low_fd in low_fds_to_close:
os.close(low_fd)
try:
try:
# We must avoid complex work that could involve
# malloc or free in the child process to avoid
# potential deadlocks, thus we do all this here.
# and pass it to fork_exec()
if env is not None:
env_list = []
for k, v in env.items():
k = os.fsencode(k)
if b'=' in k:
raise ValueError("illegal environment variable name")
env_list.append(k + b'=' + os.fsencode(v))
else:
env_list = None # Use execv instead of execve.
executable = os.fsencode(executable)
if os.path.dirname(executable):
executable_list = (executable,)
else:
# This matches the behavior of os._execvpe().
executable_list = tuple(
os.path.join(os.fsencode(dir), executable)
for dir in os.get_exec_path(env))
fds_to_keep = set(pass_fds)
fds_to_keep.add(errpipe_write)
self.pid = _posixsubprocess.fork_exec(
args, executable_list,
close_fds, tuple(sorted(map(int, fds_to_keep))),
cwd, env_list,
p2cread, p2cwrite, c2pread, c2pwrite,
errread, errwrite,
errpipe_read, errpipe_write,
restore_signals, start_new_session, preexec_fn)
self._child_created = True
finally:
# be sure the FD is closed no matter what
os.close(errpipe_write)
self._close_pipe_fds(p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite)
# Wait for exec to fail or succeed; possibly raising an
# exception (limited in size)
errpipe_data = bytearray()
while True:
part = os.read(errpipe_read, 50000)
errpipe_data += part
if not part or len(errpipe_data) > 50000:
break
finally:
# be sure the FD is closed no matter what
os.close(errpipe_read)
if errpipe_data:
try:
pid, sts = os.waitpid(self.pid, 0)
if pid == self.pid:
self._handle_exitstatus(sts)
else:
self.returncode = sys.maxsize
except ChildProcessError:
pass
try:
exception_name, hex_errno, err_msg = (
errpipe_data.split(b':', 2))
# The encoding here should match the encoding
# written in by the subprocess implementations
# like _posixsubprocess
err_msg = err_msg.decode()
except ValueError:
exception_name = b'SubprocessError'
hex_errno = b'0'
err_msg = 'Bad exception data from child: {!r}'.format(
bytes(errpipe_data))
child_exception_type = getattr(
builtins, exception_name.decode('ascii'),
SubprocessError)
if issubclass(child_exception_type, OSError) and hex_errno:
errno_num = int(hex_errno, 16)
child_exec_never_called = (err_msg == "noexec")
if child_exec_never_called:
err_msg = ""
# The error must be from chdir(cwd).
err_filename = cwd
else:
err_filename = orig_executable
if errno_num != 0:
err_msg = os.strerror(errno_num)
> raise child_exception_type(errno_num, err_msg, err_filename)
E FileNotFoundError: [Errno 2] No such file or directory: 'svnadmin'
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:1702: FileNotFoundError
_____________________________________________________________________ test_uninstall_from_reqs_file ______________________________________________________________________
script = <tests.lib.PipTestEnvironment object at 0x1118490a0>
tmpdir = Path('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_from_reqs_file0')
@pytest.mark.network
@need_svn
def test_uninstall_from_reqs_file(script, tmpdir):
"""
Test uninstall from a requirements file.
"""
> local_svn_url = local_checkout(
'svn+http://svn.colorstudy.com/INITools', tmpdir,
)
tests/functional/test_uninstall.py:394:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/lib/local_repos.py:63: in local_checkout
_create_svn_initools_repo(repo_url_path)
tests/lib/local_repos.py:22: in _create_svn_initools_repo
subprocess.check_call('svnadmin create INITools'.split(), cwd=directory)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:359: in check_call
retcode = call(*popenargs, **kwargs)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:340: in call
with Popen(*popenargs, **kwargs) as p:
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:854: in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <subprocess.Popen object at 0x111849e50>, args = ['svnadmin', 'create', 'INITools'], executable = b'svnadmin', preexec_fn = None, close_fds = True, pass_fds = ()
cwd = '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_from_reqs_file0/cache', env = None, startupinfo = None
creationflags = 0, shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False
def _execute_child(self, args, executable, preexec_fn, close_fds,
pass_fds, cwd, env,
startupinfo, creationflags, shell,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite,
restore_signals, start_new_session):
"""Execute program (POSIX version)"""
if isinstance(args, (str, bytes)):
args = [args]
elif isinstance(args, os.PathLike):
if shell:
raise TypeError('path-like args is not allowed when '
'shell is true')
args = [args]
else:
args = list(args)
if shell:
# On Android the default shell is at '/system/bin/sh'.
unix_shell = ('/system/bin/sh' if
hasattr(sys, 'getandroidapilevel') else '/bin/sh')
args = [unix_shell, "-c"] + args
if executable:
args[0] = executable
if executable is None:
executable = args[0]
sys.audit("subprocess.Popen", executable, args, cwd, env)
if (_USE_POSIX_SPAWN
and os.path.dirname(executable)
and preexec_fn is None
and not close_fds
and not pass_fds
and cwd is None
and (p2cread == -1 or p2cread > 2)
and (c2pwrite == -1 or c2pwrite > 2)
and (errwrite == -1 or errwrite > 2)
and not start_new_session):
self._posix_spawn(args, executable, env, restore_signals,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite)
return
orig_executable = executable
# For transferring possible exec failure from child to parent.
# Data format: "exception name:hex errno:description"
# Pickle is not used; it is complex and involves memory allocation.
errpipe_read, errpipe_write = os.pipe()
# errpipe_write must not be in the standard io 0, 1, or 2 fd range.
low_fds_to_close = []
while errpipe_write < 3:
low_fds_to_close.append(errpipe_write)
errpipe_write = os.dup(errpipe_write)
for low_fd in low_fds_to_close:
os.close(low_fd)
try:
try:
# We must avoid complex work that could involve
# malloc or free in the child process to avoid
# potential deadlocks, thus we do all this here.
# and pass it to fork_exec()
if env is not None:
env_list = []
for k, v in env.items():
k = os.fsencode(k)
if b'=' in k:
raise ValueError("illegal environment variable name")
env_list.append(k + b'=' + os.fsencode(v))
else:
env_list = None # Use execv instead of execve.
executable = os.fsencode(executable)
if os.path.dirname(executable):
executable_list = (executable,)
else:
# This matches the behavior of os._execvpe().
executable_list = tuple(
os.path.join(os.fsencode(dir), executable)
for dir in os.get_exec_path(env))
fds_to_keep = set(pass_fds)
fds_to_keep.add(errpipe_write)
self.pid = _posixsubprocess.fork_exec(
args, executable_list,
close_fds, tuple(sorted(map(int, fds_to_keep))),
cwd, env_list,
p2cread, p2cwrite, c2pread, c2pwrite,
errread, errwrite,
errpipe_read, errpipe_write,
restore_signals, start_new_session, preexec_fn)
self._child_created = True
finally:
# be sure the FD is closed no matter what
os.close(errpipe_write)
self._close_pipe_fds(p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite)
# Wait for exec to fail or succeed; possibly raising an
# exception (limited in size)
errpipe_data = bytearray()
while True:
part = os.read(errpipe_read, 50000)
errpipe_data += part
if not part or len(errpipe_data) > 50000:
break
finally:
# be sure the FD is closed no matter what
os.close(errpipe_read)
if errpipe_data:
try:
pid, sts = os.waitpid(self.pid, 0)
if pid == self.pid:
self._handle_exitstatus(sts)
else:
self.returncode = sys.maxsize
except ChildProcessError:
pass
try:
exception_name, hex_errno, err_msg = (
errpipe_data.split(b':', 2))
# The encoding here should match the encoding
# written in by the subprocess implementations
# like _posixsubprocess
err_msg = err_msg.decode()
except ValueError:
exception_name = b'SubprocessError'
hex_errno = b'0'
err_msg = 'Bad exception data from child: {!r}'.format(
bytes(errpipe_data))
child_exception_type = getattr(
builtins, exception_name.decode('ascii'),
SubprocessError)
if issubclass(child_exception_type, OSError) and hex_errno:
errno_num = int(hex_errno, 16)
child_exec_never_called = (err_msg == "noexec")
if child_exec_never_called:
err_msg = ""
# The error must be from chdir(cwd).
err_filename = cwd
else:
err_filename = orig_executable
if errno_num != 0:
err_msg = os.strerror(errno_num)
> raise child_exception_type(errno_num, err_msg, err_filename)
E FileNotFoundError: [Errno 2] No such file or directory: 'svnadmin'
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:1702: FileNotFoundError
__________________________________________________________ Tests_UninstallUserSite.test_uninstall_from_usersite __________________________________________________________
self = <tests.functional.test_uninstall_user.Tests_UninstallUserSite object at 0x1118dc100>, script = <tests.lib.PipTestEnvironment object at 0x111895460>
@pytest.mark.network
def test_uninstall_from_usersite(self, script):
"""
Test uninstall from usersite
"""
result1 = script.pip('install', '--user', 'INITools==0.3')
result2 = script.pip('uninstall', '-y', 'INITools')
> assert_all_changes(result1, result2, [script.venv / 'build', 'cache'])
E tests.lib.TestFailure: Unexpected changes:
E deleted:
E created: venv/user/lib/python3.8/site-packages, venv/user/lib/python3.8
E updated:
tests/functional/test_uninstall_user.py:22: TestFailure
_____________________________________________ Tests_UninstallUserSite.test_uninstall_from_usersite_with_dist_in_global_site ______________________________________________
self = <tests.functional.test_uninstall_user.Tests_UninstallUserSite object at 0x1119462e0>
virtualenv = <VirtualEnvironment /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_from_usersite_w0/workspace/venv>
script = <tests.lib.PipTestEnvironment object at 0x111946a30>
def test_uninstall_from_usersite_with_dist_in_global_site(
self, virtualenv, script):
"""
Test uninstall from usersite (with same dist in global site)
"""
_patch_dist_in_site_packages(virtualenv)
script.pip_install_local('pip-test-package==0.1', '--no-binary=:all:')
result2 = script.pip_install_local(
'--user', 'pip-test-package==0.1.1', '--no-binary=:all:')
result3 = script.pip('uninstall', '-vy', 'pip-test-package')
# uninstall console is mentioning user scripts, but not global scripts
assert normcase(script.user_bin_path) in result3.stdout, str(result3)
assert normcase(script.bin_path) not in result3.stdout, str(result3)
# uninstall worked
> assert_all_changes(result2, result3, [script.venv / 'build', 'cache'])
E tests.lib.TestFailure: Unexpected changes:
E deleted:
E created: venv/user/lib/python3.8/site-packages, venv/user/lib/python3.8
E updated:
tests/functional/test_uninstall_user.py:42: TestFailure
_____________________________________________________ Tests_UninstallUserSite.test_uninstall_editable_from_usersite ______________________________________________________
self = <tests.functional.test_uninstall_user.Tests_UninstallUserSite object at 0x111a4c2b0>, script = <tests.lib.PipTestEnvironment object at 0x111a484f0>
data = <tests.lib.TestData object at 0x111a48d60>
def test_uninstall_editable_from_usersite(self, script, data):
"""
Test uninstall editable local user install
"""
assert script.user_site_path.exists()
# install
to_install = data.packages.joinpath("FSPkg")
> result1 = script.pip(
'install', '--user', '-e', to_install
)
tests/functional/test_uninstall_user.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tests.lib.PipTestEnvironment object at 0x111a484f0>, args = ('python', '-m', 'pip', 'install', '--user', '-e', ...), kw = {'expect_stderr': True}
cwd = Path('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/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:591: AssertionError
-------------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------------
Script result: python -m pip install --user -e /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/data/packages/FSPkg
return code: 1
-- stderr: --------------------
ERROR: Command errored out with exit status 1:
command: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/workspace/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/data/packages/FSPkg/setup.py'"'"'; __file__='"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/data/packages/FSPkg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix=
cwd: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/data/packages/FSPkg/
Complete output (19 lines):
running develop
/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/setuptools0/install/setuptools/dist.py:473: UserWarning: Normalizing '0.1dev' to '0.1.dev0'
warnings.warn(
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 2] No such file or directory: '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/workspace/venv/user/lib/python3.8/site-packages/test-easy-install-1256.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/workspace/venv/user/lib/python3.8/site-packages
This directory does not currently exist. Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).
----------------------------------------
ERROR: Command errored out with exit status 1: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/workspace/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/data/packages/FSPkg/setup.py'"'"'; __file__='"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/data/packages/FSPkg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix= Check the logs for full command output.
-- stdout: --------------------
Obtaining file:///private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/data/packages/FSPkg
Could not build wheels for FSPkg,since package 'wheel' is not installed.
Installing collected packages: FSPkg
Running setup.py develop for FSPkg
======================================================================== short test summary info =========================================================================
FAIL tests/functional/test_freeze.py::test_freeze_svn
FAIL tests/functional/test_install.py::test_basic_install_editable_from_svn
FAIL tests/functional/test_install.py::test_user_config_accepted
FAIL tests/functional/test_install_reqs.py::test_multiple_requirements_files
FAIL tests/functional/test_install_user.py::Tests_UserSite::()::test_install_subversion_usersite_editable_with_distribute
FAIL tests/functional/test_install_user.py::Tests_UserSite::()::test_install_from_current_directory_into_usersite
FAIL tests/functional/test_install_user.py::Tests_UserSite::()::test_install_user_conflict_in_usersite
FAIL tests/functional/test_install_user.py::Tests_UserSite::()::test_install_user_conflict_in_globalsite
FAIL tests/functional/test_install_user.py::Tests_UserSite::()::test_upgrade_user_conflict_in_globalsite
FAIL tests/functional/test_install_user.py::Tests_UserSite::()::test_install_user_conflict_in_globalsite_and_usersite
FAIL tests/functional/test_install_wheel.py::test_install_user_wheel
FAIL tests/functional/test_uninstall.py::test_uninstall_editable_from_svn
FAIL tests/functional/test_uninstall.py::test_uninstall_from_reqs_file
FAIL tests/functional/test_uninstall_user.py::Tests_UninstallUserSite::()::test_uninstall_from_usersite
FAIL tests/functional/test_uninstall_user.py::Tests_UninstallUserSite::()::test_uninstall_from_usersite_with_dist_in_global_site
FAIL tests/functional/test_uninstall_user.py::Tests_UninstallUserSite::()::test_uninstall_editable_from_usersite
SKIP [1] tests/functional/test_configuration.py:19: Can't modify underlying file for any mode
SKIP [1] tests/functional/test_install.py:630: Python 2 only
SKIP [1] /Users/jaraco/code/public/pypa/pip/tests/functional/test_no_color.py:34: Unable to capture output using script: script --flush --quiet --return /tmp/pip-test-no-color.txt --command "pip uninstall noSuchPackage"
SKIP [1] tests/functional/test_requests.py:4: <Skipped instance>
SKIP [1] tests/functional/test_search.py:81: Warehouse search behavior is different and no longer returns multiple results. See https://github.com/pypa/warehouse/issues/3717 for more information.
SKIP [1] tests/functional/test_vcs_bazaar.py:20: Bazaar is only required under Travis
SKIP [1] tests/functional/test_warning.py:52: Python 2 only
SKIP [1] tests/functional/test_warning.py:62: Python 2 only
SKIP [1] tests/unit/test_collector.py:235: condition: sys.platform != 'win32'
SKIP [2] tests/unit/test_collector.py:258: condition: sys.platform != 'win32'
SKIP [1] tests/unit/test_locations.py:94: Incompatible with venv
SKIP [1] tests/unit/test_locations.py:112: Incompatible with venv
SKIP [3] tests/unit/test_req.py:673: Test only available on Windows
SKIP [1] tests/unit/test_urls.py:27: condition: sys.platform != 'win32'
SKIP [1] tests/unit/test_urls.py:59: condition: sys.platform != 'win32'
SKIP [2] tests/unit/test_utils_subprocess.py:105: condition: sys.version_info >= (3,)
SKIP [1] tests/unit/test_vcs.py:24: Subversion is only required under Travis
XFAIL tests/functional/test_freeze.py::test_freeze_exclude_editable
XFAIL tests/functional/test_install_reqs.py::test_install_distribution_union_conflicting_extras
XFAIL tests/functional/test_yaml.py::test_yaml_based[install/conflicting_triangle]
XFAIL tests/functional/test_yaml.py::test_yaml_based[install/conflicting_diamond]
XFAIL tests/functional/test_yaml.py::test_yaml_based[install/extras-2]
============================================================================ warnings summary ============================================================================
/Users/jaraco/code/public/pypa/pip/.tox/python/lib/python3.8/site-packages/pip/_internal/req/req_file.py:209: UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
cmdoptions.check_install_build_global(options, line.opts)
-- Docs: https://docs.pytest.org/en/latest/warnings.html
============================================== 16 failed, 1791 passed, 21 skipped, 5 xfailed, 1 warnings in 609.03 seconds ===============================================
ERROR: InvocationError for command /Users/jaraco/code/public/pypa/pip/.tox/python/bin/pytest --timeout 300 (exited with code 1)
________________________________________________________________________________ summary _________________________________________________________________________________
ERROR: python: commands failed