public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-text/cmark/, app-text/cmark/files/
@ 2021-02-09  8:23 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2021-02-09  8:23 UTC (permalink / raw
  To: gentoo-commits

commit:     9542d8c5f26718711018b040bed295278cb15016
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Sun Feb  7 23:13:38 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb  9 08:22:53 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9542d8c5

app-text/cmark: fix tests (#767850)

Fix tests runs with Python 3.8.
Closes: https://bugs.gentoo.org/767850
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/19370
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-text/cmark/cmark-0.29.0.ebuild                 |  6 ++++-
 .../cmark/files/cmark-0.29.0-python38_tests.patch  | 31 ++++++++++++++++++++++
 2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/app-text/cmark/cmark-0.29.0.ebuild b/app-text/cmark/cmark-0.29.0.ebuild
index 36fc6e99005..a1db9210003 100644
--- a/app-text/cmark/cmark-0.29.0.ebuild
+++ b/app-text/cmark/cmark-0.29.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -19,6 +19,10 @@ RESTRICT="!test? ( test )"
 
 DEPEND="test? ( ${PYTHON_DEPS} )"
 
+PATCHES=(
+	"${FILESDIR}/${P}-python38_tests.patch"
+)
+
 pkg_setup() {
 	use test && python-any-r1_pkg_setup
 }

diff --git a/app-text/cmark/files/cmark-0.29.0-python38_tests.patch b/app-text/cmark/files/cmark-0.29.0-python38_tests.patch
new file mode 100644
index 00000000000..13cd7181594
--- /dev/null
+++ b/app-text/cmark/files/cmark-0.29.0-python38_tests.patch
@@ -0,0 +1,31 @@
+From 92697d564042d5b914048e087e4274c3c71e0055 Mon Sep 17 00:00:00 2001
+From: Christopher Fujino <christopherfujino@gmail.com>
+Date: Sun, 12 Jul 2020 16:11:42 -0700
+Subject: [PATCH] replace cgi.escape with html.escape (#656)
+
+---
+ test/normalize.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/test/normalize.py b/test/normalize.py
+index 6073bf01..f8ece18d 100644
+--- a/test/normalize.py
++++ b/test/normalize.py
+@@ -13,7 +13,7 @@ class HTMLParseError(Exception):
+ from html.entities import name2codepoint
+ import sys
+ import re
+-import cgi
++import html
+ 
+ # Normalization code, adapted from
+ # https://github.com/karlcow/markdown-testsuite/
+@@ -66,7 +66,7 @@ def handle_starttag(self, tag, attrs):
+                     self.output += ("=" + '"' +
+                             urllib.quote(urllib.unquote(v), safe='/') + '"')
+                 elif v != None:
+-                    self.output += ("=" + '"' + cgi.escape(v,quote=True) + '"')
++                    self.output += ("=" + '"' + html.escape(v,quote=True) + '"')
+         self.output += ">"
+         self.last_tag = tag
+         self.last = "starttag"


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/cmark/, app-text/cmark/files/
@ 2024-04-11 22:16 Yixun Lan
  0 siblings, 0 replies; 2+ messages in thread
From: Yixun Lan @ 2024-04-11 22:16 UTC (permalink / raw
  To: gentoo-commits

commit:     941b558de184e13bc703f04aa22c802c8a89da4b
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Wed Apr 10 10:17:29 2024 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Apr 11 22:16:00 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=941b558d

app-text/cmark: fix test failures

Closes: https://bugs.gentoo.org/929043
Closes: https://github.com/gentoo/gentoo/pull/36191
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-text/cmark/cmark-0.31.0.ebuild                   |  4 ++++
 app-text/cmark/files/cmark-0.31.0_fix_api_test.patch | 17 +++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/app-text/cmark/cmark-0.31.0.ebuild b/app-text/cmark/cmark-0.31.0.ebuild
index da5a39b33e87..9d990ce41277 100644
--- a/app-text/cmark/cmark-0.31.0.ebuild
+++ b/app-text/cmark/cmark-0.31.0.ebuild
@@ -19,6 +19,10 @@ RESTRICT="!test? ( test )"
 
 BDEPEND="test? ( ${PYTHON_DEPS} )"
 
+PATCHES=(
+	"${FILESDIR}/cmark-0.31.0_fix_api_test.patch"
+)
+
 pkg_setup() {
 	use test && python-any-r1_pkg_setup
 }

diff --git a/app-text/cmark/files/cmark-0.31.0_fix_api_test.patch b/app-text/cmark/files/cmark-0.31.0_fix_api_test.patch
new file mode 100644
index 000000000000..defecc445c4e
--- /dev/null
+++ b/app-text/cmark/files/cmark-0.31.0_fix_api_test.patch
@@ -0,0 +1,17 @@
+https://github.com/commonmark/cmark/commit/a739d4911b5fa5586679b8e55999719cc910d26b
+From: John MacFarlane <jgm@berkeley.edu>
+Date: Wed, 13 Mar 2024 14:31:28 -0700
+Subject: [PATCH] Flag root node as open...
+
+in `cmark_parser_new_with_mem_into_root`. Closes #532.
+--- a/src/blocks.c
++++ b/src/blocks.c
+@@ -98,6 +98,8 @@ cmark_parser *cmark_parser_new_with_mem_into_root(int options, cmark_mem *mem, c
+   cmark_strbuf_init(mem, &parser->linebuf, 0);
+   cmark_strbuf_init(mem, &parser->content, 0);
+ 
++  root->flags = CMARK_NODE__OPEN;
++
+   parser->refmap = cmark_reference_map_new(mem);
+   parser->root = root;
+   parser->current = root;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-11 22:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-11 22:16 [gentoo-commits] repo/gentoo:master commit in: app-text/cmark/, app-text/cmark/files/ Yixun Lan
  -- strict thread matches above, loose matches on Subject: below --
2021-02-09  8:23 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox