[Git][debian-gis-team/grass][master] 2 commits: Add upstream patch to fix python3.9 compatibility.
Bas Couwenberg
gitlab at salsa.debian.org
Wed Dec 2 11:47:13 GMT 2020
Bas Couwenberg pushed to branch master at Debian GIS Project / grass
Commits:
8fc328b5 by Bas Couwenberg at 2020-12-02T12:18:19+01:00
Add upstream patch to fix python3.9 compatibility.
- - - - -
530c0111 by Bas Couwenberg at 2020-12-02T12:18:31+01:00
Set distribution to unstable.
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/0001-wxGUI-Replace-getchildren-and-getiterator-from-Eleme.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,9 +1,10 @@
-grass (7.8.4-3) UNRELEASED; urgency=medium
+grass (7.8.4-3) unstable; urgency=medium
* Bump watch file version to 4.
* Bump Standards-Version to 4.5.1, no changes.
+ * Add upstream patch to fix python3.9 compatibility.
- -- Bas Couwenberg <sebastic at debian.org> Fri, 06 Nov 2020 18:53:12 +0100
+ -- Bas Couwenberg <sebastic at debian.org> Wed, 02 Dec 2020 12:18:21 +0100
grass (7.8.4-2) unstable; urgency=medium
=====================================
debian/patches/0001-wxGUI-Replace-getchildren-and-getiterator-from-Eleme.patch
=====================================
@@ -0,0 +1,79 @@
+Description: wxGUI: Replace getchildren and getiterator from ElementTree
+ .
+ Element.getchildren() and getiterator() are deprecated
+ since Python version 3.2 and removed in version 3.9.
+ .
+ Using simpler replacements list(), in, and iter().
+Author: Vaclav Petras <wenzeslaus at gmail.com>
+Origin: https://github.com/OSGeo/grass/commit/e16272143751e70e2b721c58e8bdb71ca37256dd
+Bug: https://github.com/OSGeo/grass/issues/1119
+
+--- a/gui/wxpython/core/toolboxes.py
++++ b/gui/wxpython/core/toolboxes.py
+@@ -413,7 +413,7 @@ def _expandToolboxes(node, toolboxes):
+ continue
+ for subtoolbox in n.findall('./items/subtoolbox'):
+ items = n.find('./items')
+- idx = items.getchildren().index(subtoolbox)
++ idx = list(items).index(subtoolbox)
+
+ if has_xpath:
+ toolbox = toolboxes.find(
+@@ -450,7 +450,7 @@ def _expandUserToolboxesItem(node, toolb
+
+ for n in node.findall('./items/user-toolboxes-list'):
+ items = node.find('./items')
+- idx = items.getchildren().index(n)
++ idx = list(items).index(n)
+ el = etree.Element(
+ 'toolbox', attrib={
+ 'name': 'GeneratedUserToolboxesList'})
+@@ -531,7 +531,7 @@ def _expandAddonsItem(node):
+ for n in addonsTags:
+ # find parent is not possible with implementation of etree (in 2.7)
+ items = node.find('./menubar')
+- idx = items.getchildren().index(n)
++ idx = list(items).index(n)
+ # do not set name since it is already in menudata file
+ # attib={'name': 'AddonsList'}
+ el = etree.Element('menu')
+@@ -570,9 +570,8 @@ def _expandItems(node, items, itemTag):
+
+ if moduleNode is None: # module not available in dist
+ continue
+- mItemChildren = moduleItem.getchildren()
+- tagList = [n.tag for n in mItemChildren]
+- for node in moduleNode.getchildren():
++ tagList = [n.tag for n in moduleItem]
++ for node in moduleNode:
+ if node.tag not in tagList:
+ moduleItem.append(node)
+
+--- a/gui/wxpython/core/workspace.py
++++ b/gui/wxpython/core/workspace.py
+@@ -209,7 +209,7 @@ class ProcessWorkspaceFile:
+ :param node: display tree node
+ :param inGroup: in group -> index of group item otherwise -1
+ """
+- for item in node.getchildren():
++ for item in node:
+ if item.tag == 'group':
+ # -> group
+ self.layers.append({
+--- a/gui/wxpython/tools/update_menudata.py
++++ b/gui/wxpython/tools/update_menudata.py
+@@ -73,12 +73,12 @@ def updateData(data, modules):
+ 'vcolors']
+
+ menu_modules = list()
+- for node in data.tree.getiterator():
++ for node in data.tree.iter():
+ if node.tag != 'menuitem':
+ continue
+
+ item = dict()
+- for child in node.getchildren():
++ for child in node:
+ item[child.tag] = child.text
+
+ if 'command' not in item:
=====================================
debian/patches/series
=====================================
@@ -2,3 +2,4 @@ pager
instdir
no-fail-html.patch
jquery.patch
+0001-wxGUI-Replace-getchildren-and-getiterator-from-Eleme.patch
View it on GitLab: https://salsa.debian.org/debian-gis-team/grass/-/compare/bfbae61df2de739cb5899548570e1d59cef38aee...530c01115ea4c708c26637a0654b68f5e45089de
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/grass/-/compare/bfbae61df2de739cb5899548570e1d59cef38aee...530c01115ea4c708c26637a0654b68f5e45089de
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20201202/5c91ac8b/attachment-0001.html>
More information about the Pkg-grass-devel
mailing list