You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is currently breaking github tests and is reproducable on my local. I don't know how it got merged without triggering the test. I'm going to revert the commits for now, they're pretty small and can go back in later.
As part of #183 we added a threading.Lock to the core send() function. This unfortunately appears to break if you have nested mockers, which i don't like but know that people do. Specifically this test:
An easy solution I found to the problem is to use an RLock instead, but it does raise the question are there other places this could be a problem, and maybe is there a better way to reliably monkeypatch the function without needing to Lock?
Hi @jamielennox: Thanks for bringing this to my attention. RLock sounds like it might work, but I can't remember the code well enough to say whether it might also lead to unexpected deadlocks. I'm keen to have the threading fixes added to the next release so I will have a look at this first thing tomorrow and see if I can come up with another fix if you haven't figured something out by then. (I'm on UTC+10 so it's too late for me to look at this tonight.)
This is currently breaking github tests and is reproducable on my local. I don't know how it got merged without triggering the test. I'm going to revert the commits for now, they're pretty small and can go back in later.
As part of #183 we added a
threading.Lock
to the coresend()
function. This unfortunately appears to break if you have nested mockers, which i don't like but know that people do. Specifically this test:requests-mock/tests/pytest/test_with_pytest.py
Lines 17 to 62 in 0aeaecd
An easy solution I found to the problem is to use an RLock instead, but it does raise the question are there other places this could be a problem, and maybe is there a better way to reliably monkeypatch the function without needing to Lock?
@phodge - thoughts?
The text was updated successfully, but these errors were encountered: