[openstack-dev] [all] PYTHONDONTWRITEBYTECODE=true in tox.ini

Daniel P. Berrange berrange at redhat.com
Fri Sep 12 16:29:00 UTC 2014


On Fri, Sep 12, 2014 at 04:23:09PM +0000, Jeremy Stanley wrote:
> On 2014-09-12 17:16:11 +0100 (+0100), Daniel P. Berrange wrote:
> [...]
> > Agreed, the problem with stale .pyc files is that it never occurs to
> > developers that .pyc files are causing the problem until after you've
> > wasted (potentially hours of) time debugging the problem. Avoiding
> > this pain for all developers out of the box is a clear win overall
> > and makes openstack development less painful.
> 
> I've been bitten by similar issues often enough that I regularly git
> clean -dfx my checkouts or at least pass -r to tox so that it will
> recreate its virtualenvs from scratch. Yes it does add some extra
> time to the next test run, but you can iterate fairly tightly after
> that as long as you're not actively moving stuff around while you
> troubleshoot (and coupled with a git hook like Doug described for
> cleaning on topic branch changes would be a huge boon as well).

I'm not debating whether there are ways to clean up your env to avoid
the problem /after/ it occurs. The point is to stop the problem occuring
in the first place to avoid placing this uneccessary clean up burden
on devs.  Intentionally leaving things setup so that contributors hit
bugs like stale .pyc files is just user hostile.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



More information about the OpenStack-dev mailing list