[Webkit-unassigned] [Bug 36599] test-webkitpy: Should remove *.pyc files in webkitpy/ prior to importing from webkitpy/

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 25 14:16:09 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=36599





--- Comment #4 from Chris Jerdonek <cjerdonek at webkit.org>  2010-03-25 14:16:09 PST ---
(In reply to comment #2)
> One alternative might be to delete any .pyc file that doesn't have a
> corresponding .py, but I don't think that covers all the cases we want to deal
> with.

After thinking about this, the above may be the correct alternative.  This
should address the main case I had in mind which was moving .py files in source
control and leaving behind orphaned .pyc files that were still being referenced
by import statements.  (This has occasionally caused problems in practice.)  
If there are untracked .py files still being referenced, though, I'm not sure
how much we can really do about that (or in practice need to) since in problem
scenarios those would get recompiled anyways.

> Or maybe delete any *.pyc file that doesn't correspond to a
> source-controlled (tracked) *.py file, but I'm also not sure that covers all
> the scenarios.


(In reply to comment #3)
> We can certainly try it.  I wonder how it will interact with things like the
> commit-queue which are written in python and run test-webkitpy before
> committing. :)

A related issue to consider is that we may want other scripts (e.g.
update-webkit) to trigger a *.pyc "clean" action ("clean" in the sense of the
first alternative above).  This way if there are orphaned *.pyc files in
someone's webkitpy, the Python scripts will never pick up the wrong ones (e.g.
if import finds multiple potential matches in sys.path).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list