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: 3.4rc2 MSI uninstallation leaves behind ensurepip _uninstall .pyc
Type: Stage:
Components: Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: loewis, python-dev
Priority: release blocker Keywords:

Created on 2014-02-23 18:17 by loewis, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg212014 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2014-02-23 18:17
The installer currently leaves behind a single pyc file, namely 

Lib\ensurepip\__pycache__\_uninstall.cpython-34.pyc

I believe that the problem is that installer computes the list of files to be removed in the script generation phase, finding out what files match __pycache__\*.*. The _uninstall .pyc is not there yet. Then, during script execution, first pip uninstallation is run, creating the pyc file, then the (precomputed) list of files is removed.

In rc1, this was not a problem because PIP removal happened in the UI phase (i.e. before script execution); this was changed to support elevated privileges in #20641.

The simplest work-around could be to run pip uninstallation with -B. I just edited the MSI with orca, and that seems to work fine.

If anybody can suggest how installer could be instructed to remove the .pyc regularly through the RemoveFiles action, I'd appreciate any help.
msg212572 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-03-02 18:29
New changeset 7b3c40510a08 by Martin v. Löwis in branch 'default':
Issue #20748: Uninstalling pip does not leave behind the pyc of
http://hg.python.org/cpython/rev/7b3c40510a08
msg212574 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2014-03-02 18:31
cherry-picking in Issue20831
msg213821 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-03-17 06:31
New changeset b018a33c7db4 by Martin v. Löwis in branch '3.4':
Issue #20748: Uninstalling pip does not leave behind the pyc of
http://hg.python.org/cpython/rev/b018a33c7db4
History
Date User Action Args
2022-04-11 14:57:59adminsetgithub: 64947
2014-03-17 06:31:01python-devsetmessages: + msg213821
2014-03-02 18:31:13loewissetstatus: open -> closed
resolution: fixed
messages: + msg212574
2014-03-02 18:29:58python-devsetnosy: + python-dev
messages: + msg212572
2014-02-23 18:17:01loewiscreate