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.TestEnsurePip fails mysteriously when /tmp is too small #71713

Open
bitdancer opened this issue Jul 16, 2016 · 1 comment
Open

test_venv.TestEnsurePip fails mysteriously when /tmp is too small #71713

bitdancer opened this issue Jul 16, 2016 · 1 comment
Labels
tests Tests in the Lib/test dir topic-ensurepip type-bug An unexpected behavior, bug, or error

Comments

@bitdancer
Copy link
Member

BPO 27526
Nosy @bitdancer, @dstufft, @tirkarthi

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 = None
created_at = <Date 2016-07-16.02:09:05.361>
labels = ['type-bug']
title = 'test_venv.TestEnsurePip fails mysteriously when /tmp is too small'
updated_at = <Date 2018-09-25.14:54:10.797>
user = 'https://github.com/bitdancer'

bugs.python.org fields:

activity = <Date 2018-09-25.14:54:10.797>
actor = 'xtreak'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = []
creation = <Date 2016-07-16.02:09:05.361>
creator = 'r.david.murray'
dependencies = []
files = []
hgrepos = []
issue_num = 27526
keywords = []
message_count = 1.0
messages = ['270532']
nosy_count = 3.0
nosy_names = ['r.david.murray', 'dstufft', 'xtreak']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue27526'
versions = []

@bitdancer
Copy link
Member Author

I've been having a failure in test_venv when running the tests suite for some months now. Since the buildbots aren't, I was guessing it was a local problem. I finally got around to looking at it today, and I had no clue what was wrong here, after setting maxDiff to None:

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

Traceback (most recent call last):
  File "/home/rdmurray/python/p35/Lib/test/test_venv.py", line 381, in test_with_pip
    self.assertEqual(err, "")
AssertionError: 'Traceback (most recent call last):\n  Fil[741 chars]\'\n' != ''
- Traceback (most recent call last):
-   File "/home/rdmurray/python/p35/Lib/runpy.py", line 174, in _run_module_as_main
-     mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
-   File "/home/rdmurray/python/p35/Lib/runpy.py", line 133, in _get_module_details
-     return _get_module_details(pkg_main_name, error)
-   File "/home/rdmurray/python/p35/Lib/runpy.py", line 109, in _get_module_details
-     __import__(pkg_name)
-   File "/tmp/tmpcpx0dj2o/lib/python3.5/site-packages/pip/__init__.py", line 14, in <module>
-     from pip.utils import get_installed_distributions, get_prog
-   File "/tmp/tmpcpx0dj2o/lib/python3.5/site-packages/pip/utils/__init__.py", line 27, in <module>
-     from pip._vendor import pkg_resources
- ImportError: cannot import name 'pkg_resources'

It turns out that the problem was that the virtual machine I was running this in had a /tmp that was too small for pip to operate. I've had this problem often with pip on my VMs.

I'm reporting this because it seems to me reasonably likely that ensurepip will fail mysteriously if /tmp is too small. I'm OK with this issue getting closed as won't fix, since my setup is rather odd and it may be that no one else will run in to this. But it may be that someone else will, and at least there will be a bug report to find.

@bitdancer bitdancer added the type-bug An unexpected behavior, bug, or error label Jul 16, 2016
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@iritkatriel iritkatriel added the tests Tests in the Lib/test dir label Nov 23, 2023
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 topic-ensurepip type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants