<div dir="ltr">haha :) <div><br></div><div>-- dims</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 19, 2015 at 7:59 PM, Sylvain Bauza <span dir="ltr"><<a href="mailto:sbauza@redhat.com" target="_blank">sbauza@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
Le 19/08/2015 16:51, Sylvain Bauza a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I was writing some tests so I added a contextlib.nested to a checked TestCase [1]. Unfortunately, contextlib.nested is no longer available in Python3 and there is no clear solution on how to provide a compatible import for both python2 and python3:<br>
- either providing a python3 compatible behaviour by using contextlib.ExitStack but that class is not available in Python 2<br>
- or provide contextlib2 for python2 (and thus adding it to the requirements)<br>
<br>
That sounds really disruptive and blocking as we are close to the FeatureFreeze. Many other users of contextlib.nested are not impacted by the job because it excludes all of them but since the test I'm changing is part of the existing validated tests, that leaves Jenkins -1'ing my change.<br>
<br>
Of course, a 3rd solution would consist of excluding my updated test from the python3 check but I can hear others yelling at that :-)<br>
<br>
Ideas appreciated.<br>
<br>
</blockquote>
<br></span>
So, I just saw there is actually already a solution for that here:<br>
<a href="https://github.com/openstack/nova/blob/master/nova/test.py#L72-L78" rel="noreferrer" target="_blank">https://github.com/openstack/nova/blob/master/nova/test.py#L72-L78</a><br>
<br>
beer_count['dims']++<br>
<br>
Thanks,<div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-Sylvain<br>
<br>
[1] <a href="https://review.openstack.org/#/c/199205/18/nova/tests/unit/scheduler/test_rpcapi.py,cm" rel="noreferrer" target="_blank">https://review.openstack.org/#/c/199205/18/nova/tests/unit/scheduler/test_rpcapi.py,cm</a><br>
<br>
<br>
__________________________________________________________________________ <br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote>
<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Davanum Srinivas :: <a href="https://twitter.com/dims" target="_blank">https://twitter.com/dims</a></div>
</div>