execnet==1.2.0
pytest==2.6.1
py==1.4.23
pytest-xdist==1.10

but our tests don't use gevent


On 4 September 2014 10:10, Srinath <[email protected]> wrote:

> which execnet version do you use? 1.1 or 1.2? with 1.2 py.test -n <int>
> doesn't even run.
>
>
> [image: Srinath GS on about.me]
>
> Srinath GS
> about.me/srinathgs
>   <http://about.me/srinathgs>http://srinath.im
> I write code @ Alamut
> Srinath G S
>
>
> On Thu, Sep 4, 2014 at 1:34 PM, Anatoly Bubenkov <[email protected]>
> wrote:
>
>> so that might very well be the issue - gevent does the patching of the
>> threading module which is in use of the execnet...
>> try to NOT use gevent patching but just use it directly (by importing and
>> using it's attributes), eg avoild .patch_all
>>
>>
>> On 4 September 2014 10:02, Srinath <[email protected]> wrote:
>>
>>> 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.
>>>
>>>
>>> [image: Srinath GS on about.me]
>>>
>>> Srinath GS
>>> about.me/srinathgs
>>>   <http://about.me/srinathgs>http://srinath.im
>>> I write code @ Alamut
>>> Srinath G S
>>>
>>>
>>> On Thu, Sep 4, 2014 at 12:52 PM, Anatoly Bubenkov <[email protected]>
>>> wrote:
>>>
>>>> I mean the mode of the execnet, do you use threads there?
>>>>
>>>>
>>>> On 4 September 2014 09:10, Srinath <[email protected]> wrote:
>>>>
>>>>> Hi Anatoly,
>>>>>
>>>>> 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.
>>>>>
>>>>>
>>>>> [image: Srinath GS on about.me]
>>>>>
>>>>> Srinath GS
>>>>> about.me/srinathgs
>>>>>   <http://about.me/srinathgs>http://srinath.im
>>>>> I write code @ Alamut
>>>>> Srinath G S
>>>>>
>>>>>
>>>>> On Thu, Sep 4, 2014 at 12:27 PM, Anatoly Bubenkov <[email protected]
>>>>> > wrote:
>>>>>
>>>>>> we use all 4 at latest versions: pytest, pytest-xdist, execnet, py
>>>>>> and it works
>>>>>> my suggestion is to try not using greenlets and instead use default -
>>>>>> threading
>>>>>>
>>>>>>
>>>>>> On 4 September 2014 08:45, Srinath <[email protected]> wrote:
>>>>>>
>>>>>>>  Hi list,
>>>>>>>
>>>>>>>
>>>>>>> *23:01:51* Traceback (most recent call last):*23:01:51*   File 
>>>>>>> "<string>", line 1, in <module>*23:01:51*   File "<string>", line 6, in 
>>>>>>> <module>*23:01:51*   File 
>>>>>>> "/home/epsilon/shiningpanda/jobs/9783e24d/virtualenvs/83eb871d/local/lib/python2.7/site-packages/execnet/gateway_base.py",
>>>>>>>  line 1215, in serve*23:01:51*     SlaveGateway(io=io, id=id, 
>>>>>>> _startcount=2).serve()*23:01:51*   File 
>>>>>>> "/home/epsilon/shiningpanda/jobs/9783e24d/virtualenvs/83eb871d/local/lib/python2.7/site-packages/execnet/gateway_base.py",
>>>>>>>  line 777, in serve*23:01:51*     self.join()*23:01:51*   File 
>>>>>>> "/home/epsilon/shiningpanda/jobs/9783e24d/virtualenvs/83eb871d/local/lib/python2.7/site-packages/execnet/gateway_base.py",
>>>>>>>  line 735, in join*23:01:51*     
>>>>>>> self._receiverthread.join(timeout)*23:01:51*   File 
>>>>>>> "/usr/lib/python2.7/threading.py", line 668, in join*23:01:51*     
>>>>>>> self.__block.wait()*23:01:51*   File "/usr/lib/python2.7/threading.py", 
>>>>>>> line 244, in wait*23:01:51*     waiter.acquire()*23:01:51*   File 
>>>>>>> "_semaphore.pyx", line 112, in gevent._semaphore.Semaphore.acquire 
>>>>>>> (gevent/gevent._semaphore.c:3004)*23:01:51*   File 
>>>>>>> "/home/epsilon/shiningpanda/jobs/9783e24d/virtualenvs/83eb871d/local/lib/python2.7/site-packages/gevent/hub.py",
>>>>>>>  line 331, in switch*23:01:51*     return 
>>>>>>> greenlet.switch(self)*23:01:51* gevent.hub.LoopExit: This operation 
>>>>>>> would block forever
>>>>>>>
>>>>>>>
>>>>>>> We keep getting this error in our CI system which raises 
>>>>>>> `pytest.internal` error. Can anyone suggest a way to solve this?
>>>>>>>
>>>>>>>
>>>>>>> pytest version:
>>>>>>>
>>>>>>> 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
>>>>>>>
>>>>>>> execnet==1.1
>>>>>>>
>>>>>>>
>>>>>>> Please help.
>>>>>>>
>>>>>>>
>>>>>>> Also, can anyone tell which version of pytest works well with 
>>>>>>> execnet1.2? This is the version that has gevent support.
>>>>>>>
>>>>>>>
>>>>>>> [image: Srinath GS on about.me]
>>>>>>>
>>>>>>> Srinath GS
>>>>>>> about.me/srinathgs
>>>>>>>   <http://about.me/srinathgs>http://srinath.im
>>>>>>> I write code @ Alamut
>>>>>>> Srinath G S
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Pytest-dev mailing list
>>>>>>> [email protected]
>>>>>>> https://mail.python.org/mailman/listinfo/pytest-dev
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Anatoly Bubenkov
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Anatoly Bubenkov
>>>>
>>>
>>>
>>
>>
>> --
>> Anatoly Bubenkov
>>
>
>


-- 
Anatoly Bubenkov
_______________________________________________
Pytest-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-dev

Reply via email to