From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/anki/files/, app-misc/anki/
Date: Sat, 12 Jun 2021 09:25:58 +0000 (UTC) [thread overview]
Message-ID: <1623489948.267c5a6cdfd2d0e3839118d49598e92ac074d7b0.sam@gentoo> (raw)
commit: 267c5a6cdfd2d0e3839118d49598e92ac074d7b0
Author: Austin Ray <austin <AT> austinray <DOT> io>
AuthorDate: Fri Jun 11 15:10:22 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jun 12 09:25:48 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=267c5a6c
app-misc/anki: patch Python 3.9 incompatibility
This commit modifies the existing anki-2.1.15 ebuild with a patch to
replace a deprecated, undocumented method available in Python 3.8[0] but
removed in Python 3.9[1]. Without the patch, anki throws a runtime error
(see bug for more details) as anki 2.1.15 pre-dates Python 3.9.
[0] https://github.com/python/cpython/blob/4844abdd700120120fc76c29d911bcb547700baf/Lib/html/parser.py#L466
[1] https://bugs.python.org/issue37328
Closes: https://bugs.gentoo.org/795309
Signed-off-by: Austin Ray <austin <AT> austinray.io>
Closes: https://github.com/gentoo/gentoo/pull/21200
Signed-off-by: Sam James <sam <AT> gentoo.org>
app-misc/anki/{anki-2.1.15.ebuild => anki-2.1.15-r1.ebuild} | 1 +
app-misc/anki/files/anki-2.1.15-unescape.patch | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/app-misc/anki/anki-2.1.15.ebuild b/app-misc/anki/anki-2.1.15-r1.ebuild
similarity index 98%
rename from app-misc/anki/anki-2.1.15.ebuild
rename to app-misc/anki/anki-2.1.15-r1.ebuild
index a1b7dc8c2e7..f97f7bb0fbc 100644
--- a/app-misc/anki/anki-2.1.15.ebuild
+++ b/app-misc/anki/anki-2.1.15-r1.ebuild
@@ -44,6 +44,7 @@ BDEPEND="test? (
PATCHES=(
"${FILESDIR}"/${PN}-2.1.0_beta25-web-folder.patch
"${FILESDIR}"/${PN}-2.1.15-mpv-args.patch
+ "${FILESDIR}"/${PN}-2.1.15-unescape.patch
)
src_prepare() {
diff --git a/app-misc/anki/files/anki-2.1.15-unescape.patch b/app-misc/anki/files/anki-2.1.15-unescape.patch
new file mode 100644
index 00000000000..7b03c8d8e1a
--- /dev/null
+++ b/app-misc/anki/files/anki-2.1.15-unescape.patch
@@ -0,0 +1,13 @@
+diff --git a/aqt/reviewer.py b/aqt/reviewer.py
+index f01fcbd9f..5aaf26669 100644
+--- a/aqt/reviewer.py
++++ b/aqt/reviewer.py
+@@ -359,7 +359,7 @@ Please run Tools>Empty Cards""")
+ cor = stripHTML(cor)
+ # ensure we don't chomp multiple whitespace
+ cor = cor.replace(" ", " ")
+- cor = parser.unescape(cor)
++ cor = html.unescape(cor)
+ cor = cor.replace("\xa0", " ")
+ cor = cor.strip()
+ given = self.typedAnswer
next reply other threads:[~2021-06-12 9:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-12 9:25 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-06-13 21:29 [gentoo-commits] repo/gentoo:master commit in: app-misc/anki/files/, app-misc/anki/ Sam James
2017-12-18 12:37 Michael Weber
2017-12-18 12:05 Michael Weber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1623489948.267c5a6cdfd2d0e3839118d49598e92ac074d7b0.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox