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

Lazy-load function patches #298

Open
pschanely opened this issue Aug 13, 2024 · 0 comments
Open

Lazy-load function patches #298

pschanely opened this issue Aug 13, 2024 · 0 comments

Comments

@pschanely
Copy link
Owner

Importing CrossHair transitively imports a ~majority of the standard library, because we register patches for it all. It would be better to register patches only for the currently loaded modules and load other patches just-in-time via some sort of import hook.

This also will fix a failure mode where re-importing a module will break the existing patches. (see heapqlib_test.test_heapify for an example)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant