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

Sean Dague sean at dague.net
Fri Sep 12 16:13:00 UTC 2014


On 09/12/2014 12:07 PM, Mike Bayer wrote:
> 
> On Sep 12, 2014, at 12:03 PM, Sean Dague <sean at dague.net> wrote:
> 
>> On 09/12/2014 11:33 AM, Mike Bayer wrote:
>>>
>>> On Sep 12, 2014, at 11:24 AM, Sean Dague <sean at dague.net> wrote:
>>>
>>>> On 09/12/2014 11:21 AM, Mike Bayer wrote:
>>>>>
>>>>> On Sep 12, 2014, at 7:39 AM, Sean Dague <sean at dague.net> wrote:
>>>>>
>>>>>> I assume you, gentle OpenStack developers, often find yourself in a hair
>>>>>> tearing out moment of frustration about why local unit tests are doing
>>>>>> completely insane things. The code that it is stack tracing on is no
>>>>>> where to be found, and yet it fails.
>>>>>>
>>>>>> And then you realize.... that part of oslo doesn't exist any more....
>>>>>> except there are still pyc files laying around. Gah!
>>>>>>
>>>>>> I've proposed the following to Nova and Python novaclient -
>>>>>> https://review.openstack.org/#/c/121044/
>>>>>>
>>>>>> Which sets PYTHONDONTWRITEBYTECODE=true in the unit tests.
>>>>>
>>>>> my VPN was down and I didn’t get this thread just now, but I am strongly -1 on this as added to tox.ini, my response is http://lists.openstack.org/pipermail/openstack-dev/2014-September/045873.html.
>>>>>
>>>>> Short answer: if you want this feature, put PYTHONDONTWRITEBYTECODE into *your* environment.  Don’t force it on our automated tests or on my environment.   .pyc files make a difference in behavior, and if we banish them from all testing, then our code is never tested within the environment that it will normally be run in after shipment.
>>>>>
>>>>> I’d far prefer a simple script added to tox.ini which deletes orphaned .pyc files only, if a change to tox.ini must be made.
>>>>
>>>> Your example in the other thread includes the random seed behavior,
>>>> which is already addressed in new tox. So I don't see that as an issue.
>>>
>>> Will these patches all be accompanied by corresponding PYTHONHASHSEED settings?   Also why don’t you want to place PYTHONDONTWRITEBYTECODE into your own environment?    I don’t want this flag on my machine.
>>
>> This was the set of tox changes that went in in August.
> 
> corresponding to PYTHONHASHSEED, right?  That whole thing is Python 3 only.

It very much is not only python 3. We have to pin in on a bunch of our
python 2 tests now until we clean them up. There was a giant cross
project effort on this all through July & August to bring this in.

	-Sean

-- 
Sean Dague
http://dague.net



More information about the OpenStack-dev mailing list