def load_installed_version(self):
        installed_packages = get_installed_pypackages()
        if self.package in installed_packages:
            self.version = "=={}".format(
                installed_packages[self.package].version)
def ignoring_sigint(cls):
        """A contextmanager which disables handling sigint in the current signal handler. This
        allows threads that are not the main thread to ignore sigint.

        NB: Only use this if you can't use ExceptionSink.trapped_signals().

        Class state:
        - Toggles `self._ignore_sigint` in `cls._signal_handler`.
        """
        with cls._signal_handler._ignoring_sigint():
            yield