* [PR PATCH] zim: update to 0.73.3.
@ 2020-11-01 17:15 mobinmob
2020-11-09 17:58 ` [PR PATCH] [Merged]: " ahesford
0 siblings, 1 reply; 2+ messages in thread
From: mobinmob @ 2020-11-01 17:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
There is a new pull request by mobinmob against master on the void-packages repository
https://github.com/mobinmob/void-packages zim
https://github.com/void-linux/void-packages/pull/26054
zim: update to 0.73.3.
A patch file from https://github.com/void-linux/void-packages/pull/26054.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-zim-26054.patch --]
[-- Type: text/x-diff, Size: 10782 bytes --]
From 72ca669276df808ff06656e7402a6f01bcb506e4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 1 Nov 2020 19:15:01 +0200
Subject: [PATCH] zim: update to 0.73.3.
---
srcpkgs/zim/patches/01-py39.patch | 234 ------------------------------
srcpkgs/zim/patches/02-py39.patch | 22 ---
srcpkgs/zim/template | 6 +-
3 files changed, 3 insertions(+), 259 deletions(-)
delete mode 100644 srcpkgs/zim/patches/01-py39.patch
delete mode 100644 srcpkgs/zim/patches/02-py39.patch
diff --git a/srcpkgs/zim/patches/01-py39.patch b/srcpkgs/zim/patches/01-py39.patch
deleted file mode 100644
index 79b64e429ef..00000000000
--- a/srcpkgs/zim/patches/01-py39.patch
+++ /dev/null
@@ -1,234 +0,0 @@
-From 0c7d355a76236b0c687fb7c59cd974c2c7f35657 Mon Sep 17 00:00:00 2001
-From: Robin Lee <cheeselee@fedoraproject.org>
-Date: Thu, 10 Sep 2020 21:31:22 +0800
-Subject: [PATCH] Replace usage of `getchildren` and `getiterator` with `list`
- or `iter`
-
-Methods getchildren() and getiterator() of classes ElementTree and Element in
-the ElementTree module have been deprecated since Python 3.2 and removed since
-Python 3.9.
-
-Fixes #1258
-Closes #1259
----
- tests/__init__.py | 2 +-
- zim/formats/__init__.py | 44 ++++++++++++++++++++---------------------
- zim/gui/pageview.py | 2 +-
- 3 files changed, 24 insertions(+), 24 deletions(-)
-
-diff --git tests/__init__.py tests/__init__.py
-index 20e5b8df..88f87f87 100644
---- tests/__init__.py
-+++ tests/__init__.py
-@@ -559,7 +559,7 @@ def __init__(self):
- tree = etree.ElementTree(file=root + '/tests/data/notebook-wiki.xml')
-
- test_data = []
-- for node in tree.getiterator(tag='page'):
-+ for node in tree.iter(tag='page'):
- name = node.attrib['name']
- text = str(node.text.lstrip('\n'))
- test_data.append((name, text))
-diff --git zim/formats/__init__.py zim/formats/__init__.py
-index 9e00c169..e1149f7f 100644
---- zim/formats/__init__.py
-+++ zim/formats/__init__.py
-@@ -262,7 +262,7 @@ def hascontent(self):
- '''Returns True if the tree contains any content at all.'''
- root = self._etree.getroot()
- return root is not None and (
-- bool(root.getchildren()) or (root.text and not root.text.isspace())
-+ bool(list(root)) or (root.text and not root.text.isspace())
- )
-
- @property
-@@ -284,14 +284,14 @@ def extend(self, tree):
- myroot = self._etree.getroot()
- otherroot = tree._etree.getroot()
- if otherroot.text:
-- children = myroot.getchildren()
-+ children = list(myroot)
- if children:
- last = children[-1]
- last.tail = (last.tail or '') + otherroot.text
- else:
- myroot.text = (myroot.text or '') + otherroot.text
-
-- for element in otherroot.getchildren():
-+ for element in iter(otherroot):
- myroot.append(element)
-
- return self
-@@ -312,7 +312,7 @@ def tostring(self):
-
- # HACK: Force sorting of attrib - else change in python3.8 breaks test cases
- # Ensure all attrib are string, else ElementTree fails
-- for element in self._etree.getiterator('*'):
-+ for element in self._etree.iter('*'):
- myattrib = element.attrib.copy()
- element.attrib.clear()
- for key in sorted(myattrib.keys()):
-@@ -342,8 +342,8 @@ def iter_href(self):
- from zim.notebook.page import HRef # XXX
- seen = set()
- for elt in itertools.chain(
-- self._etree.getiterator(LINK),
-- self._etree.getiterator(IMAGE)
-+ self._etree.iter(LINK),
-+ self._etree.iter(IMAGE)
- ):
- href = elt.attrib.get('href')
- if href and href not in seen:
-@@ -359,7 +359,7 @@ def iter_tag_names(self):
- @returns: yields an unordered list of tag names
- '''
- seen = set()
-- for elt in self._etree.getiterator(TAG):
-+ for elt in self._etree.iter(TAG):
- name = elt.text
- if not name in seen:
- seen.add(name)
-@@ -367,7 +367,7 @@ def iter_tag_names(self):
-
- def _get_heading_element(self, level=1):
- root = self._etree.getroot()
-- children = root.getchildren()
-+ children = list(root)
- if root.text and not root.text.isspace():
- return None
-
-@@ -424,7 +424,7 @@ def remove_heading(self, level=-1):
- '''
- root = self._etree.getroot()
- roottext = root.text and not root.text.isspace()
-- children = root.getchildren()
-+ children = list(root)
-
- if children and not roottext:
- first = children[0]
-@@ -442,7 +442,7 @@ def cleanup_headings(self, offset=0, max=6):
- and a max depth.
- '''
- path = []
-- for heading in self._etree.getiterator('h'):
-+ for heading in self._etree.iter('h'):
- level = int(heading.attrib['level'])
- # find parent header in path using old level
- while path and path[-1][0] >= level:
-@@ -461,11 +461,11 @@ def resolve_images(self, notebook=None, path=None):
- adds a '_src_file' attribute to the elements with the full file path.
- '''
- if notebook is None:
-- for element in self._etree.getiterator('img'):
-+ for element in self._etree.iter('img'):
- filepath = element.attrib['src']
- element.attrib['_src_file'] = File(filepath)
- else:
-- for element in self._etree.getiterator('img'):
-+ for element in self._etree.iter('img'):
- filepath = element.attrib['src']
- element.attrib['_src_file'] = notebook.resolve_file(element.attrib['src'], path)
-
-@@ -473,7 +473,7 @@ def unresolve_images(self):
- '''Undo effect of L{resolve_images()}, mainly intended for
- testing.
- '''
-- for element in self._etree.getiterator('img'):
-+ for element in self._etree.iter('img'):
- if '_src_file' in element.attrib:
- element.attrib.pop('_src_file')
-
-@@ -481,7 +481,7 @@ def encode_urls(self, mode=URL_ENCODE_READABLE):
- '''Calls encode_url() on all links that contain urls.
- See zim.parsing for details. Modifies the parse tree.
- '''
-- for link in self._etree.getiterator('link'):
-+ for link in self._etree.iter('link'):
- href = link.attrib['href']
- if href and is_url_re.match(href):
- link.attrib['href'] = url_encode(href, mode=mode)
-@@ -492,7 +492,7 @@ def decode_urls(self, mode=URL_ENCODE_READABLE):
- '''Calls decode_url() on all links that contain urls.
- See zim.parsing for details. Modifies the parse tree.
- '''
-- for link in self._etree.getiterator('link'):
-+ for link in self._etree.iter('link'):
- href = link.attrib['href']
- if href and is_url_re.match(href):
- link.attrib['href'] = url_decode(href, mode=mode)
-@@ -502,7 +502,7 @@ def decode_urls(self, mode=URL_ENCODE_READABLE):
- def count(self, text):
- '''Returns the number of occurences of 'text' in this tree.'''
- count = 0
-- for element in self._etree.getiterator():
-+ for element in self._etree.iter():
- if element.text:
- count += element.text.count(text)
- if element.tail:
-@@ -515,7 +515,7 @@ def countre(self, regex):
- in this tree.
- '''
- count = 0
-- for element in self._etree.getiterator():
-+ for element in self._etree.iter():
- if element.text:
- newstring, n = regex.subn('', element.text)
- count += n
-@@ -535,7 +535,7 @@ def _get_element_ends_with_newline(self, element):
- elif element.tag in ('li', 'h'):
- return True # implicit newline
- else:
-- children = element.getchildren()
-+ children = list(element)
- if children:
- return self._get_element_ends_with_newline(children[-1]) # recurs
- elif element.text:
-@@ -586,7 +586,7 @@ def findall(self, tag):
- @param tag: tag name
- @returns: yields L{Node} objects
- '''
-- for elt in self._etree.getiterator(tag):
-+ for elt in self._etree.iter(tag):
- yield Element.new_from_etree(elt)
-
- def replace(self, tag, func):
-@@ -932,7 +932,7 @@ def end(self, tag):
- if len(self._stack) > 1 and not (
- tag in (IMAGE, OBJECT, HEADDATA, TABLEDATA)
- or (self._last.text and not self._last.text.isspace())
-- or self._last.getchildren()
-+ or bool(list(self._last))
- ):
- # purge empty tags
- if self._last.text and self._last.text.isspace():
-@@ -940,7 +940,7 @@ def end(self, tag):
-
- empty = self._stack.pop()
- self._stack[-1].remove(empty)
-- children = self._stack[-1].getchildren()
-+ children = list(self._stack[-1])
- if children:
- self._last = children[-1]
- if not self._last.tail is None:
-@@ -1053,7 +1053,7 @@ def close(self):
- def _append_to_previous(self, text):
- '''Add text before current element'''
- parent = self._stack[-2]
-- children = parent.getchildren()[:-1]
-+ children = list(parent)[:-1]
- if children:
- if children[-1].tail:
- children[-1].tail = children[-1].tail + text
-diff --git zim/gui/pageview.py zim/gui/pageview.py
-index 84fe99b4..c2c29cc5 100644
---- zim/gui/pageview.py
-+++ zim/gui/pageview.py
-@@ -857,7 +857,7 @@ def force_line_start():
- if not iter.starts_line():
- self.insert_at_cursor('\n')
-
-- for element in node.getchildren():
-+ for element in iter(node):
- if element.tag in ('p', 'div'):
- # No force line start here on purpose
- if 'indent' in element.attrib:
diff --git a/srcpkgs/zim/patches/02-py39.patch b/srcpkgs/zim/patches/02-py39.patch
deleted file mode 100644
index 7bf92a28589..00000000000
--- a/srcpkgs/zim/patches/02-py39.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 177d4b58f5bc5b298bc88907d76372334057dd31 Mon Sep 17 00:00:00 2001
-From: Alexander Kapshuna <kapsh@kap.sh>
-Date: Tue, 22 Sep 2020 21:26:39 +0300
-Subject: [PATCH] Fix reading preformatted text under Python 3.9 (#1261)
-
----
- zim/formats/__init__.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git zim/formats/__init__.py zim/formats/__init__.py
-index e1149f7f..f22b0b0b 100644
---- zim/formats/__init__.py
-+++ zim/formats/__init__.py
-@@ -822,7 +822,7 @@ def end(self, tag):
- self._last_char = None
-
- def append(self, tag, attrib=None, text=None):
-- attrib = attrib.copy() if attrib is not None else None
-+ attrib = attrib.copy() if attrib is not None else {}
- if tag in BLOCK_LEVEL:
- if text and not text.endswith('\n'):
- text += '\n'
diff --git a/srcpkgs/zim/template b/srcpkgs/zim/template
index 8e49842cf7b..94f33ed850b 100644
--- a/srcpkgs/zim/template
+++ b/srcpkgs/zim/template
@@ -1,7 +1,7 @@
# Template file for 'zim'
pkgname=zim
-version=0.73.2
-revision=3
+version=0.73.3
+revision=1
build_style=python3-module
hostmakedepends="python3-gobject python3-xdg gtk+3"
depends="python3-gobject python3-xdg gtk+3 desktop-file-utils"
@@ -10,4 +10,4 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="http://zim-wiki.org/"
distfiles="http://zim-wiki.org/downloads/${pkgname}-${version}.tar.gz"
-checksum=dd6d3dcea8ce1a88c72c6dedae7d2ae5670e3cafe76873c81b4e7483340bebf5
+checksum=a1f03d31682278b5432156b629ea3f2494e6f999d5947b7805114a4661e59300
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PR PATCH] [Merged]: zim: update to 0.73.3.
2020-11-01 17:15 [PR PATCH] zim: update to 0.73.3 mobinmob
@ 2020-11-09 17:58 ` ahesford
0 siblings, 0 replies; 2+ messages in thread
From: ahesford @ 2020-11-09 17:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 156 bytes --]
There's a merged pull request on the void-packages repository
zim: update to 0.73.3.
https://github.com/void-linux/void-packages/pull/26054
Description:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-09 17:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-01 17:15 [PR PATCH] zim: update to 0.73.3 mobinmob
2020-11-09 17:58 ` [PR PATCH] [Merged]: " ahesford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).