Searches the PyPi repository for the given `term` and returns a
        dictionary of results.

        New in 2.1.5: returns a dictionary instead of list of tuples

def search(self, term):
        """
        Searches the PyPi repository for the given `term` and returns a
        dictionary of results.

        New in 2.1.5: returns a dictionary instead of list of tuples
        """
        packages = {}
        results = self._execute_pip(['search', term], log=False)  # Don't want to log searches
        for result in results.split(linesep):
            try:
                name, description = result.split(six.u(' - '), 1)
            except ValueError:
                # '-' not in result so unable to split into tuple;
                # this could be from a multi-line description
                continue
            else:
                name = name.strip()
                if len(name) == 0:
                    continue
                packages[name] = description.split(six.u('<br'), 1)[0].strip()
        return packages