saltstack/salt — pull request #11872 by s0undt3ch (2014-04-09 10:47:22+00:00)
Title: Delete references to imported pip module so `reload(site)` works.

When an older `pip` library is installed on the system, even if on a
state we upgrade it and reload modules, since we we're not removing all
references, the new module is not loaded and the old one is still used
instead.

Alternatively we could try and find out which modules were imported by a
module and explicitly remove them from `sys.modules` thus forcing a
reload, however, this can also cause bad behaviours, what if we
explicitly unload `salt`?

For now this works and it's simple.