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)
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)