Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_venv fails with --without-threads #69553

Closed
Arfrever mannequin opened this issue Oct 10, 2015 · 3 comments
Closed

test_venv fails with --without-threads #69553

Arfrever mannequin opened this issue Oct 10, 2015 · 3 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@Arfrever
Copy link
Mannequin

Arfrever mannequin commented Oct 10, 2015

BPO 25366
Nosy @vsajip, @ncoghlan, @berkerpeksag, @dstufft

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2016-01-19.00:03:51.747>
created_at = <Date 2015-10-10.16:26:58.545>
labels = ['type-bug', 'tests']
title = 'test_venv fails with --without-threads'
updated_at = <Date 2016-01-19.00:03:51.745>
user = 'https://bugs.python.org/Arfrever'

bugs.python.org fields:

activity = <Date 2016-01-19.00:03:51.745>
actor = 'berker.peksag'
assignee = 'none'
closed = True
closed_date = <Date 2016-01-19.00:03:51.747>
closer = 'berker.peksag'
components = ['Tests']
creation = <Date 2015-10-10.16:26:58.545>
creator = 'Arfrever'
dependencies = []
files = []
hgrepos = []
issue_num = 25366
keywords = []
message_count = 3.0
messages = ['252725', '258562', '258563']
nosy_count = 6.0
nosy_names = ['vinay.sajip', 'ncoghlan', 'Arfrever', 'python-dev', 'berker.peksag', 'dstufft']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue25366'
versions = ['Python 3.5', 'Python 3.6']

@Arfrever
Copy link
Mannequin Author

Arfrever mannequin commented Oct 10, 2015

test.test_venv.EnsurePipTest.test_with_pip() fails with --without-threads, because some dependencies of PIP (cachecontrol, lockfile) unconditionally import threading module.

======================================================================
FAIL: test_with_pip (test.test_venv.EnsurePipTest)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/tmp/cpython/Lib/test/test_venv.py", line 356, in test_with_pip
    with_pip=True)
subprocess.CalledProcessError: Command '['/tmp/tmpgt_wdmiq/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/cpython/Lib/test/test_venv.py", line 362, in test_with_pip
    self.fail(msg.format(exc, details))
AssertionError: Command '['/tmp/tmpgt_wdmiq/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1

**Subprocess Output**
Traceback (most recent call last):
  File "/tmp/cpython/Lib/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/tmp/cpython/Lib/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmp/cpython/Lib/ensurepip/__main__.py", line 4, in <module>
    ensurepip._main()
  File "/tmp/cpython/Lib/ensurepip/__init__.py", line 209, in _main
    default_pip=args.default_pip,
  File "/tmp/cpython/Lib/ensurepip/__init__.py", line 116, in bootstrap
    _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/tmp/cpython/Lib/ensurepip/__init__.py", line 40, in _run_pip
    import pip
  File "/tmp/tmp1bl0s_61/pip-7.1.2-py2.py3-none-any.whl/pip/__init__.py", line 15, in <module>
  File "/tmp/tmp1bl0s_61/pip-7.1.2-py2.py3-none-any.whl/pip/vcs/mercurial.py", line 10, in <module>
  File "/tmp/tmp1bl0s_61/pip-7.1.2-py2.py3-none-any.whl/pip/download.py", line 44, in <module>
  File "/tmp/tmp1bl0s_61/pip-7.1.2-py2.py3-none-any.whl/pip/_vendor/cachecontrol/__init__.py", line 9, in <module>
  File "/tmp/tmp1bl0s_61/pip-7.1.2-py2.py3-none-any.whl/pip/_vendor/cachecontrol/wrapper.py", line 1, in <module>
  File "/tmp/tmp1bl0s_61/pip-7.1.2-py2.py3-none-any.whl/pip/_vendor/cachecontrol/adapter.py", line 5, in <module>
  File "/tmp/tmp1bl0s_61/pip-7.1.2-py2.py3-none-any.whl/pip/_vendor/cachecontrol/controller.py", line 11, in <module>
  File "/tmp/tmp1bl0s_61/pip-7.1.2-py2.py3-none-any.whl/pip/_vendor/cachecontrol/cache.py", line 5, in <module>
  File "/tmp/cpython/Lib/threading.py", line 4, in <module>
    import _thread
ImportError: No module named '_thread'

@Arfrever Arfrever mannequin added the tests Tests in the Lib/test dir label Oct 10, 2015
@python-dev
Copy link
Mannequin

python-dev mannequin commented Jan 19, 2016

New changeset 2a201272daed by Berker Peksag in branch '3.5':
Issue bpo-25366: Skip test_with_pip when threading module is not available
https://hg.python.org/cpython/rev/2a201272daed

New changeset 27d4f06c3720 by Berker Peksag in branch 'default':
Issue bpo-25366: Skip test_with_pip when threading module is not available
https://hg.python.org/cpython/rev/27d4f06c3720

@berkerpeksag
Copy link
Member

Fixed. Thanks for the report, Arfrever

@berkerpeksag berkerpeksag added the type-bug An unexpected behavior, bug, or error label Jan 19, 2016
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant