<div dir="ltr">so that might very well be the issue - gevent does the patching of the threading module which is in use of the execnet...<div>try to NOT use gevent patching but just use it directly (by importing and using it's attributes), eg avoild .patch_all</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 4 September 2014 10:02, Srinath <span dir="ltr"><<a href="mailto:g.s.srinath89@gmail.com" target="_blank">g.s.srinath89@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">We just run py.test -n <int>. pytest automatically picks up the tests and then run. some of the unit tests import code from components. Components do gevent monkey patch. so, execnet although uses threading, the locking stuff gets overridden by gevent. Hope this clarifies the use case.</div>
</div><div class="gmail_extra"><div class=""><br clear="all"><div><div dir="ltr"><a href="http://about.me/srinathgs" style="margin:0px;padding:0px;border:0px;outline:0px;font-size:14px;font-family:proxima-nova-1,proxima-nova-2,Tahoma,Helvetica,Verdana,sans-serif;vertical-align:baseline;color:rgb(58,169,233);text-decoration:none;line-height:18.200000762939453px" target="_blank"><table border="0" cellpadding="0" cellspacing="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;border-spacing:0px">
<tbody style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline">
<td colspan="3" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;height:30px"> </td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline">
<td align="left" valign="top" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:top;line-height:1"><div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline">
<img src="http://d3mod6n032mdiz.cloudfront.net/thumb2/s/r/i/srinathgs/srinathgs-105x70.jpg" alt="Srinath GS on about.me" width="105" height="70" style="margin:0px;padding:0px;border:1px solid rgb(238,238,238);outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;display:block"></div>
</td><td style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;width:10px"> </td><td align="left" valign="bottom" style="padding:0px 0px 3px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:bottom;line-height:1">
<div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:bold;font-style:inherit;font-size:18px;font-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline;line-height:1;color:rgb(51,51,51)">
Srinath GS</div><div style="margin:1px 0px 0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-size:12px;font-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline;color:rgb(43,130,173)">
about.me/srinathgs</div></td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><td colspan="3" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;height:20px">
</td></tr></tbody></table></a><a href="http://srinath.im" target="_blank">http://srinath.im</a><br>I write code @ Alamut<br>Srinath G S</div></div>
<br><br></div><div><div class="h5"><div class="gmail_quote">On Thu, Sep 4, 2014 at 12:52 PM, Anatoly Bubenkov <span dir="ltr"><<a href="mailto:bubenkoff@gmail.com" target="_blank">bubenkoff@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I mean the mode of the execnet, do you use threads there?</div><div class="gmail_extra"><div><div><br><br>
<div class="gmail_quote">On 4 September 2014 09:10, Srinath <span dir="ltr"><<a href="mailto:g.s.srinath89@gmail.com" target="_blank">g.s.srinath89@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Hi Anatoly,</div><div class="gmail_default" style="font-family:tahoma,sans-serif">
<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">We use a lot of greenlets in our code. Unit Tests import them. They get monkey patched. So, we really can't use only threading.</div></div><div class="gmail_extra">
<div><br clear="all"><div><div dir="ltr"><a href="http://about.me/srinathgs" style="margin:0px;padding:0px;border:0px;outline:0px;font-size:14px;font-family:proxima-nova-1,proxima-nova-2,Tahoma,Helvetica,Verdana,sans-serif;vertical-align:baseline;color:rgb(58,169,233);text-decoration:none;line-height:18.200000762939453px" target="_blank"><table border="0" cellpadding="0" cellspacing="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;border-spacing:0px">
<tbody style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline">
<td colspan="3" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;height:30px"> </td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline">
<td align="left" valign="top" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:top;line-height:1"><div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline">
<img src="http://d3mod6n032mdiz.cloudfront.net/thumb2/s/r/i/srinathgs/srinathgs-105x70.jpg" alt="Srinath GS on about.me" width="105" height="70" style="margin:0px;padding:0px;border:1px solid rgb(238,238,238);outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;display:block"></div>
</td><td style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;width:10px"> </td><td align="left" valign="bottom" style="padding:0px 0px 3px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:bottom;line-height:1">
<div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:bold;font-style:inherit;font-size:18px;font-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline;line-height:1;color:rgb(51,51,51)">
Srinath GS</div><div style="margin:1px 0px 0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-size:12px;font-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline;color:rgb(43,130,173)">
about.me/srinathgs</div></td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><td colspan="3" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;height:20px">
</td></tr></tbody></table></a><a href="http://srinath.im" target="_blank">http://srinath.im</a><br>I write code @ Alamut<br>Srinath G S</div></div>
<br><br></div><div><div><div class="gmail_quote">On Thu, Sep 4, 2014 at 12:27 PM, Anatoly Bubenkov <span dir="ltr"><<a href="mailto:bubenkoff@gmail.com" target="_blank">bubenkoff@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">we use all 4 at latest versions: pytest, pytest-xdist, execnet, py and it works<div>my suggestion is to try not using greenlets and instead use default - threading</div>
</div><div class="gmail_extra"><br><br>
<div class="gmail_quote"><div><div>On 4 September 2014 08:45, Srinath <span dir="ltr"><<a href="mailto:g.s.srinath89@gmail.com" target="_blank">g.s.srinath89@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div>
<div dir="ltr"><div class="gmail_default"><pre style="font-family:tahoma,sans-serif;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);font-size:11px;line-height:20px">Hi list,</pre>
<pre style="font-family:tahoma,sans-serif;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);font-size:11px;line-height:20px"><span><b><br></b></span></pre><pre style="font-family:tahoma,sans-serif;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);font-size:11px;line-height:20px">
<span><b>23:01:51</b> </span>Traceback (most recent call last):
<span><b>23:01:51</b> </span> File "<string>", line 1, in <module>
<span><b>23:01:51</b> </span> File "<string>", line 6, in <module>
<span><b>23:01:51</b> </span> File "/home/epsilon/shiningpanda/jobs/9783e24d/virtualenvs/83eb871d/local/lib/python2.7/site-packages/execnet/gateway_base.py", line 1215, in serve
<span><b>23:01:51</b> </span> SlaveGateway(io=io, id=id, _startcount=2).serve()
<span><b>23:01:51</b> </span> File "/home/epsilon/shiningpanda/jobs/9783e24d/virtualenvs/83eb871d/local/lib/python2.7/site-packages/execnet/gateway_base.py", line 777, in serve
<span><b>23:01:51</b> </span> self.join()
<span><b>23:01:51</b> </span> File "/home/epsilon/shiningpanda/jobs/9783e24d/virtualenvs/83eb871d/local/lib/python2.7/site-packages/execnet/gateway_base.py", line 735, in join
<span><b>23:01:51</b> </span> self._receiverthread.join(timeout)
<span><b>23:01:51</b> </span> File "/usr/lib/python2.7/threading.py", line 668, in join
<span><b>23:01:51</b> </span> self.__block.wait()
<span><b>23:01:51</b> </span> File "/usr/lib/python2.7/threading.py", line 244, in wait
<span><b>23:01:51</b> </span> waiter.acquire()
<span><b>23:01:51</b> </span> File "_semaphore.pyx", line 112, in gevent._semaphore.Semaphore.acquire (gevent/gevent._semaphore.c:3004)
<span><b>23:01:51</b> </span> File "/home/epsilon/shiningpanda/jobs/9783e24d/virtualenvs/83eb871d/local/lib/python2.7/site-packages/gevent/hub.py", line 331, in switch
<span><b>23:01:51</b> </span> return greenlet.switch(self)
<span><b>23:01:51</b> </span>gevent.hub.LoopExit: This operation would block forever</pre><pre style="font-family:tahoma,sans-serif;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);font-size:11px;line-height:20px">
<br></pre><pre style="font-family:tahoma,sans-serif;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);font-size:11px;line-height:20px">We keep getting this error in our CI system which raises `pytest.internal` error. Can anyone suggest a way to solve this?</pre>
<pre style="font-family:tahoma,sans-serif;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);font-size:11px;line-height:20px"><br></pre><pre style="font-family:tahoma,sans-serif;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);font-size:11px;line-height:20px">
pytest version: </pre><pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000"><span style="font-size:11px;line-height:20px;white-space:pre-wrap">pytest==2.5.2
pytest-cache==0.9
pytest-capturelog==0.7
pytest-cov==1.6
pytest-figleaf==1.0
pytest-growl==0.1
pytest-pep8==1.0.4
pytest-xdist==1.8</span></font></pre><pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px">execnet==1.1<br></pre><pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px"><br></pre><pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px">
Please help. </pre><pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px"><br></pre><pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px">Also, can anyone tell which version of pytest works well with execnet1.2? This is the version that has gevent support. </pre>
</div><div><div dir="ltr"><a href="http://about.me/srinathgs" style="margin:0px;padding:0px;border:0px;outline:0px;font-size:14px;font-family:proxima-nova-1,proxima-nova-2,Tahoma,Helvetica,Verdana,sans-serif;vertical-align:baseline;color:rgb(58,169,233);text-decoration:none;line-height:18.2000007629395px" target="_blank"><table border="0" cellpadding="0" cellspacing="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;border-spacing:0px">
<tbody style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline">
<td colspan="3" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;height:30px"> </td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline">
<td align="left" valign="top" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:top;line-height:1"><div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline">
<img src="http://d3mod6n032mdiz.cloudfront.net/thumb2/s/r/i/srinathgs/srinathgs-105x70.jpg" alt="Srinath GS on about.me" width="105" height="70" style="margin:0px;padding:0px;border:1px solid rgb(238,238,238);outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;display:block"></div>
</td><td style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;width:10px"> </td><td align="left" valign="bottom" style="padding:0px 0px 3px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:bottom;line-height:1">
<div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:bold;font-style:inherit;font-size:18px;font-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline;line-height:1;color:rgb(51,51,51)">
Srinath GS</div><div style="margin:1px 0px 0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-size:12px;font-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline;color:rgb(43,130,173)">
about.me/srinathgs</div></td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><td colspan="3" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;height:20px">
</td></tr></tbody></table></a><a href="http://srinath.im" target="_blank">http://srinath.im</a><br>I write code @ Alamut<br>Srinath G S</div></div>
</div>
<br></div></div>_______________________________________________<br>
Pytest-dev mailing list<br>
<a href="mailto:Pytest-dev@python.org" target="_blank">Pytest-dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/pytest-dev" target="_blank">https://mail.python.org/mailman/listinfo/pytest-dev</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Anatoly Bubenkov<br></div>
</font></span></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br><div dir="ltr">Anatoly Bubenkov<br></div>
</font></span></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Anatoly Bubenkov<br></div>
</div>