This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_venv.EnsurePipTest.test_with_pip triggers version check over network
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.6, Python 3.4, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: dstufft Nosy List: dstufft, larry, martin.panter, ncoghlan, ned.deily, paul.moore, python-dev
Priority: critical Keywords:

Created on 2015-05-23 06:40 by martin.panter, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (9)
msg243889 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-05-23 06:40
Recently when running the test suite on the code from the default Mercuiral branch, I have been seeing following failure. This only started happening in the last week or two.

$ ./python -bWall -m test -v test_venv
[. . .]
test_with_pip (test.test_venv.EnsurePipTest) ... FAIL

======================================================================
FAIL: test_with_pip (test.test_venv.EnsurePipTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/media/disk/home/proj/python/cpython/Lib/test/test_venv.py", line 390, in test_with_pip
    self.assertEqual(err, "")
AssertionError: "You are using pip version 6.1.1, however[102 chars]d.\n" != ''
- You are using pip version 6.1.1, however version 7.0.1 is available.
- You should consider upgrading via the 'pip install --upgrade pip' command.


----------------------------------------------------------------------
Ran 13 tests in 13.388s

FAILED (failures=1)
msg243898 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2015-05-23 08:24
There's two issues here:

1. The bundled pip should be upgraded to the recently released 7.0 (I believe we can do that after beta 1, due to the different-from-normal guidelines set up in PEP 453)

2. Neither the tests nor ensurepip itself should be touching the network by default, so we need to change the way we implicitly invoke pip to ensure the "up to date" check is disabled (it will still get triggered the first time a user invokes pip normally)
msg243900 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-05-23 08:30
Actually looks like I should have updated before I opened this bug. I just updated and I suspect revision 29b95625a07c (“Merge 3.4 into default, upgrading pip to 7.0.1”, a large binary change) fixed it for me.

But I did wonder why removing -unetwork didn’t affect the result, so perhaps we can leave this bug open to address that aspect. Feel free to clarify if I got the title wrong.
msg243912 - (view) Author: Donald Stufft (dstufft) * (Python committer) Date: 2015-05-23 13:12
Yea, I already upgraded pip. I did forget that we'll want to add --disable-pip-version-check to the pip invocation inside of ensurepip.
msg244654 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2015-06-02 06:00
All of the 3.x buildbots are broken again due to the pip 7.0.3 update.

======================================================================
FAIL: test_with_pip (test.test_venv.EnsurePipTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/buildbot/slaves/profile-opt-bot/3.5.gps-debian-profile-opt/build/Lib/test/test_venv.py", line 390, in test_with_pip
    self.assertEqual(err, "")
AssertionError: "You are using pip version 7.0.1, however[102 chars]d.\n" != ''
- You are using pip version 7.0.1, however version 7.0.3 is available.
- You should consider upgrading via the 'pip install --upgrade pip' command.
msg244660 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2015-06-02 09:49
Adding the "--disable-pip-version-check" option doesn't make the warning go away, and apparently the already passed "--no-index" flag is supposed to imply that one anyway:

==================
--disable-pip-version-check

    Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index.
==================

Filed https://github.com/pypa/pip/issues/2860, reassigning to Donald and adding Paul to the nosy list.
msg244669 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-06-02 14:37
New changeset aaa015dde686 by Donald Stufft in branch '3.4':
Closes #24267 - Does not check version on ensurepip uninstall
https://hg.python.org/cpython/rev/aaa015dde686
msg244670 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-06-02 14:38
New changeset f39e9bcd789b by Donald Stufft in branch '3.5':
Merge the fix for #24267
https://hg.python.org/cpython/rev/f39e9bcd789b

New changeset 6dffea6134ad by Donald Stufft in branch 'default':
Merge the fix for #24267
https://hg.python.org/cpython/rev/6dffea6134ad
msg244671 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-06-02 14:54
New changeset 02d214716367 by Donald Stufft in branch '2.7':
Issue #24267 - Ensure that pip version check is disabled on uninstall
https://hg.python.org/cpython/rev/02d214716367
History
Date User Action Args
2022-04-11 14:58:17adminsetgithub: 68455
2015-06-02 14:54:44python-devsetmessages: + msg244671
2015-06-02 14:38:33python-devsetmessages: + msg244670
2015-06-02 14:37:19python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg244669

resolution: fixed
stage: resolved
2015-06-02 09:49:59ncoghlansetassignee: ncoghlan -> dstufft

messages: + msg244660
nosy: + paul.moore
2015-06-02 08:41:32ncoghlansetassignee: ncoghlan
2015-06-02 06:04:09ned.deilylinkissue24308 superseder
2015-06-02 06:00:19ned.deilysetpriority: normal -> critical
versions: + Python 3.4, Python 3.6
nosy: + ned.deily

messages: + msg244654
2015-05-23 13:12:02dstufftsetmessages: + msg243912
2015-05-23 08:30:15martin.pantersetmessages: + msg243900
title: test_venv.EnsurePipTest.test_with_pip version conflict -> test_venv.EnsurePipTest.test_with_pip triggers version check over network
2015-05-23 08:24:03ncoghlansetnosy: + larry
messages: + msg243898
2015-05-23 06:49:49ned.deilysetnosy: + ncoghlan, dstufft
2015-05-23 06:40:02martin.pantercreate