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

Mike Bayer mbayer at redhat.com
Fri Sep 12 18:10:48 UTC 2014


On Sep 12, 2014, at 12:29 PM, Daniel P. Berrange <berrange at redhat.com> wrote:

> 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.

if we’re going to start diluting the test environment to suit developer environments, then the CI builds should use a different tox target that does *not* specify this environment variable.





More information about the OpenStack-dev mailing list