def _check_gevent(expect_msg): from _pydevd_bundle.pydevd_utils import notify_about_gevent_if_needed assert not notify_about_gevent_if_needed() import gevent assert not notify_about_gevent_if_needed() import gevent.monkey assert not notify_about_gevent_if_needed() gevent.monkey.patch_all() assert notify_about_gevent_if_needed() == expect_msg
def __init__(self, py_db, target_and_args=None): ''' :param target_and_args: tuple(func, args, kwargs) if this should be a function and args to run. -- Note: use through run_as_pydevd_daemon_thread(). ''' threading.Thread.__init__(self) notify_about_gevent_if_needed() self._py_db = weakref.ref(py_db) self._kill_received = False mark_as_pydevd_daemon_thread(self) self._target_and_args = target_and_args