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

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


On Fri, Sep 12, 2014 at 12:03:38PM -0400, Sean Dague wrote:
> On 09/12/2014 11:52 AM, Doug Hellmann wrote:
> > 
> > On Sep 12, 2014, at 11:21 AM, Mike Bayer <mbayer at redhat.com> wrote:
> > 
> > I have to agree with Mike here. Cleaning up our dev environments using a little automation is better than disabling a feature of the interpreter that may have unforeseen consequences in behavior or performance. The more we introduce unusual settings like this into our environments and tools, the more edge cases and weirdness we’re going to find in those tools that keep us from doing the work we really want to be doing.
> > 
> > We could use a git hook (see my earlier message in this thread) or we could add a command to tox to remove them before starting the tests. Neither of those solutions would affect the runtime behavior in a way that makes our dev environments fundamentally different from a devstack or production deployment.
> 
> You believe that unit tests are going to change in the way they run so
> dramatically with this change that it invalidates their use?
> 
> Do we have examples of what changes if you do and don't have pyc files
> there?
> 
> Remember, we're not changing integration testing with this. This is
> solely unit testing.
> 
> The reason I don't like "just fix it in your local env" is you are then
> exporting the complexity to developers. For something that they should
> really not have to get bitten by... a lot.

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.

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