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: stale .pyc files aren't cleaned out
Type: behavior Stage:
Components: Interpreter Core, Windows Versions:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Steve.Thompson, amaury.forgeotdarc, brett.cannon, eric.araujo, r.david.murray
Priority: normal Keywords:

Created on 2010-09-03 19:33 by Steve.Thompson, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (9)
msg115488 - (view) Author: Steve Thompson (Steve.Thompson) Date: 2010-09-03 19:33
I'm running pythong 2.6.1 on Windows XP SP3.

On many occasions I have ran into cases where I've installed a new package via the package's setup.py (pylint, logilab-common, etc) and new .pyc files don't get generated when I attempt to run the tools/packages.  I'm not sure if this should be considered a package issue or an interpreter issue.  I'd like to see the interpreter regenerate the .pyc file as expected so my colleagues and I don't burn time on "broken" packages we know nothing about only to find out it was due to some stale .pyc files.  A quick fix would be to make the packages in question clean out their installation directories or regenerate all the pyc files manually.

How should this issue be handled?
msg115494 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2010-09-03 19:57
So are you installing new versions of a package you already have installed using ``python setup.py install``? Exactly what command are you using to do the install?
msg115496 - (view) Author: Steve Thompson (Steve.Thompson) Date: 2010-09-03 20:00
"Setup.py install". We've also seen this happen when checking our python
files out of our version control system.  Also seen a .pyc get used when the
.py no longer exists, but I could see that being intentional behavior.

On Sep 3, 2010 2:57 PM, "Brett Cannon" <report@bugs.python.org> wrote:

Brett Cannon <brett@python.org> added the comment:

So are you installing new versions of a package you already have installed
using ``python setup.py install``? Exactly what command are you using to do
the install?

----------
nosy: +brett.cannon

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python...
msg115498 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2010-09-03 20:16
Does your version control system let the files read-only by default?
In this case, see issue6074.
msg115499 - (view) Author: Steve Thompson (Steve.Thompson) Date: 2010-09-03 20:22
Hmmm... this definitely sounds like the issue for version controlled files,
but does not explain the issue when installing packages from source.

On Sep 3, 2010 3:16 PM, "Amaury Forgeot d&apos;Arc" <report@bugs.python.org>
wrote:

Amaury Forgeot d'Arc <amauryfa@gmail.com> added the comment:

Does your version control system let the files read-only by default?
In this case, see issue6074.

----------
nosy: +amaury.forgeotdarc

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python...
msg115509 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2010-09-03 21:06
This could still be an issue with the .pyc files being set with permissions that prevent them from being re-generated. Double-check the .pyc files are read-write and have the proper owners to allow them to be overwritten.
msg115664 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-09-05 18:15
Can you reproduce the bug with a newer Python? 2.6 only gets security fixes now, bug fixes go into stable (2.7 and 3.1) and active (3.2) versions.

(Minor remarks: Could you set up your email client not to send HTML email to the tracker? It creates unnamed files which are useless and distracting. Also, kindly strip email quotes before sending. Top-posting hinders readability. Thanks in advance, and thanks for the bug report.)
msg115746 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-09-07 10:22
Note that issue 6074 may be relevant to your problem.
msg175778 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2012-11-17 17:10
Never heard back from OP.
History
Date User Action Args
2022-04-11 14:57:06adminsetgithub: 53970
2012-11-17 17:10:59brett.cannonsetstatus: open -> closed
resolution: out of date
messages: + msg175778
2010-09-07 10:22:13r.david.murraysetnosy: + r.david.murray
messages: + msg115746
2010-09-05 18:15:28eric.araujosetversions: - Python 2.6
2010-09-05 18:15:03eric.araujosetnosy: + eric.araujo
messages: + msg115664
2010-09-05 18:11:04eric.araujosetfiles: - unnamed
2010-09-05 18:11:02eric.araujosetfiles: - unnamed
2010-09-03 21:06:57brett.cannonsetmessages: + msg115509
2010-09-03 20:22:49Steve.Thompsonsetfiles: + unnamed

messages: + msg115499
2010-09-03 20:16:57amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg115498
2010-09-03 20:00:26Steve.Thompsonsetfiles: + unnamed

messages: + msg115496
2010-09-03 19:57:23brett.cannonsetnosy: + brett.cannon
messages: + msg115494
2010-09-03 19:33:03Steve.Thompsoncreate