diff --git a/eclipse-pydev.spec b/eclipse-pydev.spec index 5087b07..82feef9 100644 --- a/eclipse-pydev.spec +++ b/eclipse-pydev.spec @@ -2,12 +2,12 @@ %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Repo tag for the release -%global git_tag pydev_7_5_0 +%global git_tag pydev_7_6_0 Epoch: 1 Summary: Eclipse Python development plug-in Name: eclipse-pydev -Version: 7.5.0 +Version: 7.6.0 Release: 1%{?dist} License: EPL-1.0 URL: http://pydev.org @@ -30,14 +30,17 @@ Patch3: fix-process-killing.patch # Don't package source for natives in binary plugins Patch4: exclude-project-files.patch +# Snakeyaml 2 not available in Fedora yet +Patch5: snakeyaml.patch + # Port to latest lucene -Patch5: lucene-8.patch +Patch6: lucene-8.patch # Improvements for pip integration -Patch6: better-pip-integration.patch +Patch7: better-pip-integration.patch # Don't attempt update of outline if already disposed -Patch7: prevent_update_outline_when_disposed.patch +Patch8: prevent_update_outline_when_disposed.patch # Upstream Eclipse no longer supports non-64bit arches ExcludeArch: s390 %{arm} %{ix86} @@ -99,9 +102,10 @@ Python development. %patch2 -p1 %patch3 -p1 %patch4 -%patch5 -p1 -%patch6 +%patch5 -p1 -R +%patch6 -p1 %patch7 +%patch8 %mvn_package "::pom:" __noinstall %mvn_package ":::sources{,-feature}:" __noinstall @@ -253,6 +257,9 @@ sed -i -e '/.*\.py$/s/0644/0755/' .mfiles* %{_datadir}/appdata/eclipse-pydev.metainfo.xml %changelog +* Thu Jun 25 2020 Mat Booth - 1:7.6.0-1 +- Update to latest upstream release + * Tue Mar 24 2020 Mat Booth - 1:7.5.0-1 - Update to latest upstream release - Drop mylyn extension diff --git a/fix-process-killing.patch b/fix-process-killing.patch index 8cf9439..952b054 100644 --- a/fix-process-killing.patch +++ b/fix-process-killing.patch @@ -159,7 +159,7 @@ index e4ea072..12fd1ce 100644 @@ -3,8 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Pydev debug Bundle-SymbolicName: org.python.pydev.debug; singleton:=true - Bundle-Version: 7.5.0.qualifier + Bundle-Version: 7.6.0.qualifier -Bundle-ClassPath: pydev-debug.jar, - libs/winp-1.26.0.7.jar +Bundle-ClassPath: pydev-debug.jar diff --git a/lucene-8.patch b/lucene-8.patch index b56028e..e6bc319 100644 --- a/lucene-8.patch +++ b/lucene-8.patch @@ -19,7 +19,7 @@ index 9b3da3551..7555a8e4d 100644 --- a/plugins/org.python.pydev.shared_core/META-INF/MANIFEST.MF +++ b/plugins/org.python.pydev.shared_core/META-INF/MANIFEST.MF @@ -5,8 +5,8 @@ Bundle-SymbolicName: org.python.pydev.shared_core;singleton:=true - Bundle-Version: 7.5.0.qualifier + Bundle-Version: 7.6.0.qualifier Bundle-ClassPath: shared_core.jar, libs/snakeyaml-1.11.jar, - libs/lucene-analyzers-common-6.1.0.jar, diff --git a/native-name.patch b/native-name.patch index d821148..50516e5 100644 --- a/native-name.patch +++ b/native-name.patch @@ -1,14 +1,3 @@ ---- plugins/org.python.pydev.core/pysrc/pydevd_attach_to_process/attach_script.py.orig 2019-09-16 11:29:41.843052447 +0100 -+++ plugins/org.python.pydev.core/pysrc/pydevd_attach_to_process/attach_script.py 2019-09-16 11:29:56.642009197 +0100 -@@ -36,7 +36,7 @@ - else: - suffix = 'x86' - -- filename = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'pydevd_attach_to_process', 'attach_linux_%s.so' % (suffix,)) -+ filename = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'pydevd_attach_to_process', 'attach_linux.so' % (suffix,)) - - elif IS_MAC: - if IS_64BIT_PROCESS: --- plugins/org.python.pydev.core/pysrc/pydevd_attach_to_process/add_code_to_python_process.py.orig 2019-09-16 11:29:17.379123942 +0100 +++ plugins/org.python.pydev.core/pysrc/pydevd_attach_to_process/add_code_to_python_process.py 2019-09-16 11:30:44.886868201 +0100 @@ -445,7 +445,7 @@ diff --git a/snakeyaml.patch b/snakeyaml.patch new file mode 100644 index 0000000..6a509a2 --- /dev/null +++ b/snakeyaml.patch @@ -0,0 +1,230 @@ +From 5adbd31eb97262e3d9bf0b3df71a4f248ade1d3d Mon Sep 17 00:00:00 2001 +From: Fabio Zadrozny +Date: Thu, 23 Jan 2020 10:05:30 -0300 +Subject: [PATCH] Update yaml to snakeyaml-engine. + +--- + .../revisited/modules/AbstractModule.java | 3 +- + .../pydev/debug/model/PyBreakpoint.java | 5 ++-- + .../pydev/debug/model/PyRunToLineTarget.java | 3 +- + .../pydev/debug/model/PySetNextTarget.java | 6 ++-- + .../org.python.pydev.shared_core/.classpath | 2 +- + .../META-INF/MANIFEST.MF | 4 +-- + .../build.properties | 9 +++--- + .../libs/README.txt | 10 ++++++- + .../libs/snakeyaml-1.11.jar | Bin 270552 -> 0 bytes + ...snakeyaml-engine-2.1-20200105.160423-4.jar | Bin 0 -> 259565 bytes + .../preferences/ScopedPreferences.java | 11 +++----- + .../pydev/shared_core/yaml/YamlWrapper.java | 26 ++++++++++++++++-- + 12 files changed, 53 insertions(+), 26 deletions(-) + delete mode 100644 plugins/org.python.pydev.shared_core/libs/snakeyaml-1.11.jar + create mode 100644 plugins/org.python.pydev.shared_core/libs/snakeyaml-engine-2.1-20200105.160423-4.jar + +diff --git a/plugins/org.python.pydev.debug/src/org/python/pydev/debug/model/PyBreakpoint.java b/plugins/org.python.pydev.debug/src/org/python/pydev/debug/model/PyBreakpoint.java +index ef32f96d4..1e1eee973 100644 +--- a/plugins/org.python.pydev.debug/src/org/python/pydev/debug/model/PyBreakpoint.java ++++ b/plugins/org.python.pydev.debug/src/org/python/pydev/debug/model/PyBreakpoint.java +@@ -137,7 +137,8 @@ private IPythonNature getPythonNature() { + try { + String externalPath = (String) marker.getAttribute(PyBreakpoint.PY_BREAK_EXTERNAL_PATH_ID); + if (externalPath != null) { +- Tuple infoForFile = InterpreterManagersAPI.getInfoForFile(new File(externalPath)); ++ Tuple infoForFile = InterpreterManagersAPI ++ .getInfoForFile(new File(externalPath)); + if (infoForFile != null) { + nature = infoForFile.o1; + } +@@ -272,7 +273,7 @@ public String getFunctionName() { + //the ast manager is actually restored (so, modName is None, and we have little alternative + //but making a parse to get the function name) + IDocument doc = getDocument(); +- sourceModule = AbstractModule.createModuleFromDoc("", null, doc, nature, true); ++ sourceModule = AbstractModule.createModuleFromDoc("", file, doc, nature, true); + } + + int lineToUse = getLineNumber() - 1; +diff --git a/plugins/org.python.pydev.debug/src/org/python/pydev/debug/model/PyRunToLineTarget.java b/plugins/org.python.pydev.debug/src/org/python/pydev/debug/model/PyRunToLineTarget.java +index 326f29acb..8b0ac59af 100644 +--- a/plugins/org.python.pydev.debug/src/org/python/pydev/debug/model/PyRunToLineTarget.java ++++ b/plugins/org.python.pydev.debug/src/org/python/pydev/debug/model/PyRunToLineTarget.java +@@ -26,7 +26,6 @@ + import org.python.pydev.parser.visitors.NodeUtils; + import org.python.pydev.shared_core.string.FullRepIterable; + +- + public class PyRunToLineTarget implements IRunToLineTarget { + + @Override +@@ -71,7 +70,7 @@ public void runToLine(IWorkbenchPart part, ISelection selection, ISuspendResume + } + + try { +- sourceModule = (SourceModule) AbstractModule.createModuleFromDoc("", null, doc, nature, true); ++ sourceModule = AbstractModule.createModuleFromDoc("", pyEdit.getEditorFile(), doc, nature, true); + } catch (MisconfigurationException e) { + Log.log(e); + return; +diff --git a/plugins/org.python.pydev.debug/src/org/python/pydev/debug/model/PySetNextTarget.java b/plugins/org.python.pydev.debug/src/org/python/pydev/debug/model/PySetNextTarget.java +index 8ea27494f..36e2a6923 100644 +--- a/plugins/org.python.pydev.debug/src/org/python/pydev/debug/model/PySetNextTarget.java ++++ b/plugins/org.python.pydev.debug/src/org/python/pydev/debug/model/PySetNextTarget.java +@@ -26,7 +26,6 @@ + import org.python.pydev.parser.visitors.NodeUtils; + import org.python.pydev.shared_core.string.FullRepIterable; + +- + /** + * @author Hussain Bohra + */ +@@ -38,7 +37,8 @@ public boolean canSetNextToLine(IWorkbenchPart part, ISelection selection, ISusp + } + + @Override +- public boolean setNextToLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) throws CoreException { ++ public boolean setNextToLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) ++ throws CoreException { + // System.out.println("Run to line:"+target); + PyStackFrame stack = null; + if (target instanceof PyStackFrame) { +@@ -74,7 +74,7 @@ public boolean setNextToLine(IWorkbenchPart part, ISelection selection, ISuspend + } + + try { +- sourceModule = (SourceModule) AbstractModule.createModuleFromDoc("", null, doc, nature, true); ++ sourceModule = AbstractModule.createModuleFromDoc("", pyEdit.getEditorFile(), doc, nature, true); + } catch (MisconfigurationException e) { + Log.log(e); + return false; +diff --git a/plugins/org.python.pydev.shared_core/.classpath b/plugins/org.python.pydev.shared_core/.classpath +index f8225c656..1cdb88323 100644 +--- a/plugins/org.python.pydev.shared_core/.classpath ++++ b/plugins/org.python.pydev.shared_core/.classpath +@@ -2,7 +2,7 @@ + + + +- ++ + + + +diff --git a/plugins/org.python.pydev.shared_core/META-INF/MANIFEST.MF b/plugins/org.python.pydev.shared_core/META-INF/MANIFEST.MF +index 3c1f8b4df..6baa9c2b2 100644 +--- a/plugins/org.python.pydev.shared_core/META-INF/MANIFEST.MF ++++ b/plugins/org.python.pydev.shared_core/META-INF/MANIFEST.MF +@@ -4,9 +4,9 @@ Bundle-Name: Shared Core Plug-in + Bundle-SymbolicName: org.python.pydev.shared_core;singleton:=true + Bundle-Version: 7.6.0.qualifier + Bundle-ClassPath: shared_core.jar, +- libs/snakeyaml-1.11.jar, + libs/lucene-analyzers-common-6.1.0.jar, +- libs/lucene-core-6.1.0.jar ++ libs/lucene-core-6.1.0.jar, ++ libs/snakeyaml-engine-2.1-20200105.160423-4.jar + Bundle-Activator: org.python.pydev.shared_core.SharedCorePlugin + Eclipse-BundleShape: dir + Require-Bundle: org.eclipse.core.runtime, +diff --git a/plugins/org.python.pydev.shared_core/build.properties b/plugins/org.python.pydev.shared_core/build.properties +index 8af3a0600..3a551ee8c 100644 +--- a/plugins/org.python.pydev.shared_core/build.properties ++++ b/plugins/org.python.pydev.shared_core/build.properties +@@ -2,11 +2,10 @@ bin.includes = shared_core.jar,\ + META-INF/,\ + LICENSE.txt,\ + libs/,\ +- libs/lucene-analyzers-common-6.1.0.jar,\ +- libs/lucene-core-6.1.0.jar ++ libs/snakeyaml-engine-2.1-20200105.160423-4.jar + jars.compile.order = shared_core.jar + source.shared_core.jar = src/ + output.shared_core.jar = bin/ +-jars.extra.classpath = libs/snakeyaml-1.11.jar,\ +- libs/lucene-core-6.1.0.jar,\ +- libs/lucene-analyzers-common-6.1.0.jar ++jars.extra.classpath = libs/lucene-core-6.1.0.jar,\ ++ libs/lucene-analyzers-common-6.1.0.jar,\ ++ libs/snakeyaml-engine-2.1-20200105.160423-4.jar +diff --git a/plugins/org.python.pydev.shared_core/src/org/python/pydev/shared_core/preferences/ScopedPreferences.java b/plugins/org.python.pydev.shared_core/src/org/python/pydev/shared_core/preferences/ScopedPreferences.java +index 125a6f2eb..c6aa9c86a 100644 +--- a/plugins/org.python.pydev.shared_core/src/org/python/pydev/shared_core/preferences/ScopedPreferences.java ++++ b/plugins/org.python.pydev.shared_core/src/org/python/pydev/shared_core/preferences/ScopedPreferences.java +@@ -41,7 +41,7 @@ + import org.python.pydev.shared_core.string.StringUtils; + import org.python.pydev.shared_core.structure.OrderedSet; + import org.python.pydev.shared_core.structure.Tuple; +-import org.yaml.snakeyaml.Yaml; ++import org.python.pydev.shared_core.yaml.YamlWrapper; + + public final class ScopedPreferences implements IScopedPreferences { + +@@ -272,8 +272,7 @@ public String saveToProjectSettings(Map saveData, IProject... pr + + private void dumpSaveDataToFile(Map saveData, IFile yamlFile, boolean exists) throws IOException, + CoreException { +- Yaml yaml = new Yaml(); +- String dumpAsMap = yaml.dumpAsMap(saveData); ++ String dumpAsMap = YamlWrapper.dumpAsMap(saveData); + if (!exists) { + // Create empty (so that we can set the charset properly later on). + yamlFile.create(new ByteArrayInputStream("".getBytes()), true, new NullProgressMonitor()); +@@ -284,8 +283,7 @@ private void dumpSaveDataToFile(Map saveData, IFile yamlFile, bo + } + + private void dumpSaveDataToFile(Map saveData, File yamlFile) throws IOException { +- Yaml yaml = new Yaml(); +- String dumpAsMap = yaml.dumpAsMap(saveData); ++ String dumpAsMap = YamlWrapper.dumpAsMap(saveData); + FileUtils.writeStrToFile(dumpAsMap, yamlFile); + // Don't use the code below because we want to dump as a map to have a better layout for the file. + // +@@ -541,8 +539,7 @@ public Object call() { + if (yamlContents.trim().length() == 0) { + return new HashMap(); + } +- Yaml yaml = new Yaml(); +- Object load = yaml.load(yamlContents); ++ Object load = YamlWrapper.load(yamlContents); + if (!(load instanceof Map)) { + if (load == null) { + throw new Exception("Expected top-level element to be a map. Found: null"); +diff --git a/plugins/org.python.pydev.shared_core/src/org/python/pydev/shared_core/yaml/YamlWrapper.java b/plugins/org.python.pydev.shared_core/src/org/python/pydev/shared_core/yaml/YamlWrapper.java +index 452675f10..844de9550 100644 +--- a/plugins/org.python.pydev.shared_core/src/org/python/pydev/shared_core/yaml/YamlWrapper.java ++++ b/plugins/org.python.pydev.shared_core/src/org/python/pydev/shared_core/yaml/YamlWrapper.java +@@ -2,12 +2,34 @@ + + import java.util.Map; + +-import org.yaml.snakeyaml.Yaml; ++import org.snakeyaml.engine.v2.api.Dump; ++import org.snakeyaml.engine.v2.api.DumpSettings; ++import org.snakeyaml.engine.v2.api.Load; ++import org.snakeyaml.engine.v2.api.LoadSettings; ++import org.snakeyaml.engine.v2.api.LoadSettingsBuilder; ++import org.snakeyaml.engine.v2.common.FlowStyle; + + public class YamlWrapper { + + public static String dumpAsMap(@SuppressWarnings("rawtypes") Map map) { +- return new Yaml().dumpAsMap(map); ++ Dump dump = new Dump( ++ DumpSettings.builder() ++ .setBestLineBreak("\n") ++ .setMultiLineFlow(true) ++ .setIndent(2) ++ .setDefaultFlowStyle(FlowStyle.BLOCK) ++ .build()); ++ String output = dump.dumpToString(map); ++ return output; ++ } ++ ++ public static Object load(String yamlContents) { ++ LoadSettingsBuilder builder = LoadSettings.builder(); ++ LoadSettings settings = builder ++ .setMaxAliasesForCollections(10) ++ .build(); ++ Load load = new Load(settings); ++ return load.loadFromString(yamlContents); + } + + } diff --git a/sources b/sources index a23f95e..5954bab 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pydev_7_5_0.tar.gz) = 14848457725ef90e2e76452fcead12e4a23c6037a1cee997d15e20e488a31e1947c5ad8eb666a10fcf8929c6441a37b671e8601e3c1701b3f8a81ab95367a523 +SHA512 (pydev_7_6_0.tar.gz) = 8ad9e4a0c5d668f7341f3f1eb88cdc6067d6648b177ddf1e993289cf2e1fb72e2dd551613f48e11bb09fcad4567ee8d0ca0b4a0be8947b7ff413285255bddda6