Sat, 27 Apr 2019 19:27:50 +0200
Pip, PipPackagesWidget, VirtualenvManager: fixed an issue causing environments for remote debugging being shown in the selection list.
--- a/eric6/PipInterface/Pip.py Mon Apr 22 15:16:38 2019 +0200 +++ b/eric6/PipInterface/Pip.py Sat Apr 27 19:27:50 2019 +0200 @@ -207,15 +207,19 @@ return interpreter - def getVirtualenvNames(self): + def getVirtualenvNames(self, noRemote=False): """ Public method to get a sorted list of virtual environment names. + @param noRemote flag indicating to exclude environments for remote + debugging + @type bool @return sorted list of virtual environment names @rtype list of str """ return sorted( - e5App().getObject("VirtualEnvManager").getVirtualenvNames()) + e5App().getObject("VirtualEnvManager").getVirtualenvNames( + noRemote=noRemote)) def installPip(self, venvName, userSite=False): """
--- a/eric6/PipInterface/PipPackagesWidget.py Mon Apr 22 15:16:38 2019 +0200 +++ b/eric6/PipInterface/PipPackagesWidget.py Sat Apr 27 19:27:50 2019 +0200 @@ -133,7 +133,8 @@ projectVenv = self.__pip.getProjectEnvironmentString() if projectVenv: self.environmentsComboBox.addItem(projectVenv) - self.environmentsComboBox.addItems(self.__pip.getVirtualenvNames()) + self.environmentsComboBox.addItems( + self.__pip.getVirtualenvNames(noRemote=True)) def __isPipAvailable(self): """
--- a/eric6/VirtualEnv/VirtualenvManager.py Mon Apr 22 15:16:38 2019 +0200 +++ b/eric6/VirtualEnv/VirtualenvManager.py Sat Apr 27 19:27:50 2019 +0200 @@ -515,14 +515,22 @@ else: return "" - def getVirtualenvNames(self): + def getVirtualenvNames(self, noRemote=False): """ Public method to get a list of defined virtual environments. + @param noRemote flag indicating to exclude environments for remote + debugging + @type bool @return list of defined virtual environments @rtype list of str """ - return list(self.__virtualEnvironments.keys()) + environments = list(self.__virtualEnvironments.keys()) + if noRemote: + environments = [name for name in environments + if not self.isRemoteEnvironment(name)] + + return environments def getVirtualenvNamesForVariant(self, variant): """