[issue41954] [mock] Recursion on mocking inspect.isfunction

2020-10-20 Thread Stanislav Levin
Stanislav Levin added the comment: I see, thank you for your time. -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___

[issue41954] [mock] Recursion on mocking inspect.isfunction

2020-10-19 Thread Lisa Roach
Lisa Roach added the comment: Oof yeah, sorry my commit broke this but it is pretty hard to avoid. Mario is right in that it would be messy and challenging to ensure anything mocked from the stdlib doesn't also break mock itself. I want to mark this as `wont fix`, unless there is a

[issue41954] [mock] Recursion on mocking inspect.isfunction

2020-10-06 Thread Mario Corchero
Mario Corchero added the comment: Oh, well spotted. We could add some guards around the code in mock to still work when key stdlib functionality is mocked out, but this might make the mock code quite messy. Specially as we will have to make sure that not only the function we call are safe

[issue41954] [mock] Recursion on mocking inspect.isfunction

2020-10-06 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +cjw296, lisroach, mariocj89, michael.foord, xtreak ___ Python tracker ___ ___

[issue41954] [mock] Recursion on mocking inspect.isfunction

2020-10-06 Thread Stanislav Levin
New submission from Stanislav Levin : With Python 3.8 the mocking of `inspect.isfunction` results in recursion. Please, consider a code snippet: ```python from unittest import TestCase from unittest.mock import patch import inspect class TestClass(TestCase): def setUp(self):