diff --git a/python/build/idea.properties b/python/build/idea.properties
index 60d25822ce71..5c76204e9b5a 100644
--- a/python/build/idea.properties
+++ b/python/build/idea.properties
@@ -53,6 +53,11 @@ idea.popup.weight=heavy
#----------------------------------------------------------------------
sun.java2d.noddraw=true
+#----------------------------------------------------------------------
+# Removing this property may lead to editor performance degradation under Windows.
+#----------------------------------------------------------------------
+sun.java2d.d3d=false
+
#-----------------------------------------------------------------------
# PyCharm copies library jars to prevent their locking. If copying is not desirable, specify "true"
#-----------------------------------------------------------------------
diff --git a/python/helpers/pydev/pydevd_frame.py b/python/helpers/pydev/pydevd_frame.py
index fc224500464a..6c7168d88f45 100644
--- a/python/helpers/pydev/pydevd_frame.py
+++ b/python/helpers/pydev/pydevd_frame.py
@@ -38,7 +38,7 @@ class PyDBFrame:
can_skip = False
- if len(always_exception_set):
+ if not always_exception_set:
if info.pydev_state == STATE_RUN:
#we can skip if:
#- we have no stop marked
diff --git a/python/src/META-INF/python-plugin-common.xml b/python/src/META-INF/python-plugin-common.xml
index 91c4bbbc2f32..ba0b3bab0b6d 100644
--- a/python/src/META-INF/python-plugin-common.xml
+++ b/python/src/META-INF/python-plugin-common.xml
@@ -480,6 +480,7 @@
+
diff --git a/python/src/com/jetbrains/python/sdk/PythonSdkFlavor.java b/python/src/com/jetbrains/python/sdk/PythonSdkFlavor.java
index 96e7b28db1ab..cd5417fdefbe 100644
--- a/python/src/com/jetbrains/python/sdk/PythonSdkFlavor.java
+++ b/python/src/com/jetbrains/python/sdk/PythonSdkFlavor.java
@@ -2,6 +2,7 @@ package com.jetbrains.python.sdk;
import com.intellij.execution.configurations.GeneralCommandLine;
import com.intellij.execution.process.ProcessOutput;
+import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.text.StringUtil;
@@ -16,6 +17,8 @@ import java.util.regex.Pattern;
* @author yole
*/
public abstract class PythonSdkFlavor {
+ private static final Logger LOG = Logger.getInstance(PythonSdkFlavor.class);
+
public static String appendSystemPythonPath(String pythonPath) {
String syspath = systemPythonPath();
if (syspath != null) {
@@ -73,16 +76,24 @@ public abstract class PythonSdkFlavor {
return file.isFile() && FileUtil.getNameWithoutExtension(file).toLowerCase().startsWith("python");
}
+ @Nullable
public String getVersionString(String sdkHome) {
return getVersionFromOutput(sdkHome, "-V", "(Python \\S+).*", false);
}
+ @Nullable
protected static String getVersionFromOutput(String sdkHome, String version_opt, String version_regexp, boolean stdout) {
Pattern pattern = Pattern.compile(version_regexp);
String run_dir = new File(sdkHome).getParent();
final ProcessOutput process_output = SdkUtil.getProcessOutput(run_dir, new String[]{sdkHome, version_opt});
if (process_output.getExitCode() != 0) {
- throw new RuntimeException(process_output.getStderr() + " (exit code " + process_output.getExitCode() + ")");
+ String err = process_output.getStderr();
+ if (StringUtil.isEmpty(err)) {
+ err = process_output.getStdout();
+ }
+ LOG.warn("Couldn't get interpreter version: process exited with code " + process_output.getExitCode() + "\n" + err
+ );
+ return null;
}
final List lines = stdout ? process_output.getStdoutLines() : process_output.getStderrLines();
return SdkUtil.getFirstMatch(lines, pattern);