diff --git a/9e86f6744be764b2522663f9a7fe2376105fc72c.patch b/9e86f6744be764b2522663f9a7fe2376105fc72c.patch new file mode 100644 index 0000000..ef5b9d6 --- /dev/null +++ b/9e86f6744be764b2522663f9a7fe2376105fc72c.patch @@ -0,0 +1,25 @@ +From 9e86f6744be764b2522663f9a7fe2376105fc72c Mon Sep 17 00:00:00 2001 +From: Petr Viktorin +Date: Wed, 21 Aug 2019 14:52:30 +0200 +Subject: [PATCH] py3: When changing a dict, iterate over a copy of its items + +Changing dict keys while iterating over the dict was always +undefined behavior in Python, but in 3.8 our tests started +failing on this case. +--- + src/calibre/ebooks/oeb/base.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py +index 1f87dcbe45..af9cb3f62a 100644 +--- a/src/calibre/ebooks/oeb/base.py ++++ b/src/calibre/ebooks/oeb/base.py +@@ -702,7 +702,7 @@ def __init__(self, term, value, attrib={}, nsmap={}, **kwargs): + term = CALIBRE(local) + self.term = term + self.value = value +- for attr, value in attrib.items(): ++ for attr, value in list(attrib.items()): + if isprefixname(value): + attrib[attr] = qname(value, nsmap) + nsattr = Metadata.OPF_ATTRS.get(attr, attr) diff --git a/calibre.spec b/calibre.spec index 1e72ddc..ca802b4 100644 --- a/calibre.spec +++ b/calibre.spec @@ -106,6 +106,8 @@ Patch10069: 0069-Update-bundled-mechanize.patch Patch10070: 0070-Get-parse_index-working-for-foreign-affairs-AJAX-bac.patch Patch10071: 0071-Update-Foreign-Affairs.patch +Patch20001: https://github.com/kovidgoyal/calibre/pull/1033/commits/9e86f6744be764b2522663f9a7fe2376105fc72c.patch + BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-qt5-devel