Issue 13123: bdist_wininst uninstaller does not remove pycache directories (original) (raw)

Created on 2011-10-07 15:22 by paul.moore, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
bdist_wininst-pycache-removal.diff eric.araujo,2012-02-11 04:44 review
Messages (12)
msg145090 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2011-10-07 15:22
When uninstalling a package installed using a bdist_wininst installer, the uninstall reports "XXX files and directories could not be removed". The problem appears to be the __pycache__ directories introduced in Python 3.2, which are not removed properly.
msg145097 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-10-07 16:21
Thanks for the report. Are you familiar with the bdist_wininst code? I am not (yet), so if you could make a patch it would help a lot. See also #11254 (which I will commit shortly).
msg145124 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2011-10-07 18:55
Not really (tbh, not at all). If I get some spare time, I can have a look at producing a patch, but I have little time available for coding at the moment (and I'm switching constantly between 3 PCs, so never have a working development environment when I need one :-() If I get anything workable before you do, I'll post it here.
msg145208 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-10-09 03:21
I don’t have a Windows VM set up yet, but I can try to write a patch in the coming weeks and ask you to test it. Deal?
msg145235 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2011-10-09 07:44
On 9 October 2011 04:21, Éric Araujo <report@bugs.python.org> wrote: > > Éric Araujo <merwok@netwok.org> added the comment: > > I don’t have a Windows VM set up yet, but I can try to write a patch in the coming weeks and ask you to test it.  Deal? No problem there!
msg152964 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2012-02-09 16:47
Have you had a chance to look at this yet?
msg153009 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-02-10 03:42
No, I worked on other things in my Python time. I did get a Windows image, but failed to configure the VM*. I’ve found some doc and will try again, or go back to the idea of giving you a patch to test. * (It gives a BSOD at boot, so one could argue that it counts as “working” for Windows :)
msg153090 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-02-11 04:44
So I had a quick look at the code and found the lines in need of a fix. The problem comes as usual from our friend “path + optimize and 'o' or 'c'”. I can read some C, so I tried to replace that with imp.cache_from_source, but a real C programmer should take it from here, especially if they find themselves on Windows so that they can recompile the wininst*.exe file and test the fix :)
msg153117 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2012-02-11 09:55
I'll try to take a look over the next couple of days.
msg224348 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-30 21:46
Just a gentle reminder.
msg224350 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2014-07-30 21:56
I'm not sure how relevant this is any more, as pip is the preferred installer these days and it cleanly uninstalls projects. At least for my usage, I no longer use wininst installers at all. I won't close this myself, though, as the issue still exists. But I won't object if it is closed as "wontfix".
msg384816 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-01-11 12:50
The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802.
History
Date User Action Args
2022-04-11 14:57:22 admin set github: 57332
2021-01-11 12:50:57 vstinner set status: open -> closednosy: + vstinnermessages: + resolution: wont fixstage: needs patch -> resolved
2019-04-26 20:15:24 BreamoreBoy set nosy: - BreamoreBoy
2014-07-30 21:56:08 paul.moore set messages: +
2014-07-30 21:46:32 BreamoreBoy set nosy: + BreamoreBoymessages: + versions: + Python 3.4, Python 3.5, - Python 3.3
2013-06-01 06:14:17 Matt.Wilkie set nosy: + Matt.Wilkie
2012-02-11 09:55:34 paul.moore set messages: +
2012-02-11 04:44:19 eric.araujo set files: + bdist_wininst-pycache-removal.diffnosy: + mhammondmessages: + keywords: + patch
2012-02-10 03:42:04 eric.araujo set assignee: tarek -> eric.araujomessages: +
2012-02-09 16:47:58 paul.moore set messages: +
2011-10-09 07:44:59 paul.moore set messages: +
2011-10-09 03:21:20 eric.araujo set messages: + stage: needs patch
2011-10-07 18:55:34 paul.moore set messages: +
2011-10-07 16:21:28 eric.araujo set messages: +
2011-10-07 15:22:39 paul.moore create