Noticed a few potential issues while working on neighbour code:
__exit__ only restores pickle.load but hook.run_hook() patched more APIs than that and they won't be restored.
- Could the internal hook clash with a pre-existing ML global hook? Same with
__exit__?
wrapped_load is dead code, so support for max_acceptable_severity likely never worked here.
Noticed a few potential issues while working on neighbour code:
__exit__only restorespickle.loadbuthook.run_hook()patched more APIs than that and they won't be restored.__exit__?wrapped_loadis dead code, so support formax_acceptable_severitylikely never worked here.