Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pydev_saved_modules: clone first-level module content #248

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rohanjoyce
Copy link

Some functions provided by the modules exposed in pydev_saved_modules are used internally by pydev and can cause problems if a target mocks them out. For each module provided _pydev_imps._pydev_saved_modules, this patch naively creates an new module, then assigns all attributes from the module it's meant to be a clone of, then attaches that module to the expected name.

This was motivated by a mock of 'time.sleep' causing pydev to continually escalate memory usage (even when stopped at a breakpoint). The underlying cause seemed to be the time.sleep in _do_wait_suspend - it was calling the mock, spinning pretty fast and creating a record per-call.

Some functions provided by the modules exposed in pydev_saved_modules
are used internally by pydev and can cause problems if a target mocks
them out.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant