From nobody Fri Mar 25 13:51:09 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A01121A349E2; Fri, 25 Mar 2022 13:51:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KQ3Qk2ZF6z3hSB; Fri, 25 Mar 2022 13:51:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648216270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xQntCICqHkaCA2mUgdxnTW3xff4jjLly1P0IH+NIo3s=; b=My9cUsFHG861lY0vI6Cs0RHKz9xbg8jk9VJA+rORA9bof9Tv08uVzlnMEqpNBvPojNF3Y9 uVVKBTzVoTRU+l/+DuvELvBx+Q/YMSkh7QHKGtUiCaWDXQDMacLTSVOkrpwIi9e/uBfAxE 57YZr31F4pbOd2XYMp48DhxCnPxp1X9kIFb+XHOaHpl8JPEksV11mg3+taUmv2gZ4U2UVE NrJt7HCpUxD8vgU6ss/+hAIp6aymDf+mP6CTrQ2WXulhXMkTrduNLvI4MU3G+tVJnyFRxw gEHkAdUzyqlYMALK7JGrBThuBBStQ4l3VUhQHzArKECPVlPNFTVj8c2JqJQcew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C8645965; Fri, 25 Mar 2022 13:51:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22PDp9op037891; Fri, 25 Mar 2022 13:51:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22PDp9Sx037890; Fri, 25 Mar 2022 13:51:09 GMT (envelope-from git) Date: Fri, 25 Mar 2022 13:51:09 GMT Message-Id: <202203251351.22PDp9Sx037890@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 67aad1a013a1 - main - textproc/py-zope.structuredtext: Fix build with setuptools 58.0.0+ List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67aad1a013a191743a99d738a5debe3cd6f046ab Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648216270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xQntCICqHkaCA2mUgdxnTW3xff4jjLly1P0IH+NIo3s=; b=SkztlAFfcjr4Dk3x64DPhbESWVhDO4Lpt6R39B0aVZ45NmaNUvK02BVaXnuKvBhh03IIB1 btQSfybivvPgPUc+2tHTZbxfapAOKE4n4ldZoNndSnaxKDk5XvYZo6w6wc77OpVZmuGNcK oUWqXqUHU94/KhHAkZWcDc5OnY1jd68iWH5QRyBVkqK4DsmYOlawtyeGfxviY09xxrJVqc GEwaB72UDFNJvSJQtHK+SmdAXP36ymnTbChl0T8DT9NL36igcZOPJuSL9Ha8o5hgcQBepa mHiJIR0Wg8iiK/Z+o33PlVsadl6ZFs+L1ZR9t2706S6uG0Ft1hhEArna5rNONw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648216270; a=rsa-sha256; cv=none; b=qBhbEIBoM5Plw30d1xufViSkzBg+R7gNQswe37B9z8S4bXYNGIid08cL7/clO4qCaPwJVS EJFlLY2s1DDIpOAc26sS8mxbaOcNDMwgtlnadbvZWM8jLL1JdmrFVPxQ9ktLl8eIbzQuCe WqSiIheUV5y4bf49sGB7UGunXZC9qlBd0mD/5WfOyFd1SaDGLMrIraSt5jz8vAJhiFMqgH IQs82tF2xCs7Bl1oINaP5H2bf9IlUFMdy+WFuAjjbTRNWzcwRNqTtt4cvioBpk5C9vBowa +SnFcxNAobBiWq1ImwZXbyjfdCD57Lf6dQjjLZ7DWEqTwXS9CRFd6t5Id2/AWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=67aad1a013a191743a99d738a5debe3cd6f046ab commit 67aad1a013a191743a99d738a5debe3cd6f046ab Author: Po-Chuan Hsieh AuthorDate: 2022-03-25 13:34:56 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-03-25 13:38:23 +0000 textproc/py-zope.structuredtext: Fix build with setuptools 58.0.0+ With hat: python --- textproc/py-zope.structuredtext/files/patch-2to3 | 138 +++++++++++++++++++++++ 1 file changed, 138 insertions(+) diff --git a/textproc/py-zope.structuredtext/files/patch-2to3 b/textproc/py-zope.structuredtext/files/patch-2to3 new file mode 100644 index 000000000000..495107b3a18e --- /dev/null +++ b/textproc/py-zope.structuredtext/files/patch-2to3 @@ -0,0 +1,138 @@ +--- src/zope/structuredtext/docbook.py.orig 2010-12-03 16:46:32 UTC ++++ src/zope/structuredtext/docbook.py +@@ -81,7 +81,7 @@ class DocBook: + getattr(self, self.element_types[c.getNodeName()] + )(c, level, output) + except: +- print "failed", c.getNodeName(), c ++ print("failed", c.getNodeName(), c) + output('\n') + + def description(self, doc, level, output): +--- src/zope/structuredtext/stng.py.orig 2010-12-03 16:46:32 UTC ++++ src/zope/structuredtext/stng.py +@@ -14,7 +14,7 @@ + """ + + import re +-import stdom ++from . import stdom + + __metaclass__ = type + +@@ -50,7 +50,7 @@ def display(struct): + orignal paragraphs. + """ + if struct.getColorizableTexts(): +- print '\n'.join(struct.getColorizableTexts()) ++ print('\n'.join(struct.getColorizableTexts())) + if struct.getSubparagraphs(): + for x in struct.getSubparagraphs(): + display(x) +@@ -61,7 +61,7 @@ def display2(struct): + orignal paragraphs. + """ + if struct.getNodeValue(): +- print struct.getNodeValue(),"\n" ++ print(struct.getNodeValue(),"\n") + if struct.getSubparagraphs(): + for x in struct.getSubparagraphs(): + display(x) +@@ -70,11 +70,11 @@ def findlevel(levels,indent): + """Remove all level information of levels with a greater level of + indentation. Then return which level should insert this paragraph + """ +- keys = levels.keys() ++ keys = list(levels.keys()) + for key in keys: + if levels[key] > indent: + del(levels[key]) +- keys = levels.keys() ++ keys = list(levels.keys()) + if not(keys): + return 0 + else: +@@ -180,8 +180,8 @@ class StructuredTextParagraph(stdom.Element): + self._src = src + self._subs = list(subs) + +- self._attributes = kw.keys() +- for k, v in kw.items(): ++ self._attributes = list(kw.keys()) ++ for k, v in list(kw.items()): + setattr(self, k, v) + + def getChildren(self): +@@ -223,7 +223,7 @@ class StructuredTextParagraph(stdom.Element): + ('%s(' % self.__class__.__name__) + +str(self._src)+', [' + ) +- for p in self._subs: a(`p`) ++ for p in self._subs: a(repr(p)) + a((' '*(self.indent or 0))+'])') + return '\n'.join(r) + +@@ -248,7 +248,7 @@ class StructuredTextDocument(StructuredTextParagraph): + def __repr__(self): + r=[]; a=r.append + a('%s([' % self.__class__.__name__) +- for p in self._subs: a(`p`+',') ++ for p in self._subs: a(repr(p)+',') + a('])') + return '\n'.join(r) + +@@ -470,8 +470,8 @@ class StructuredTextMarkup(stdom.Element): + + def __init__(self, value, **kw): + self._value = value +- self._attributes = kw.keys() +- for key, value in kw.items(): ++ self._attributes = list(kw.keys()) ++ for key, value in list(kw.items()): + setattr(self, key, value) + + def getChildren(self): +@@ -487,7 +487,7 @@ class StructuredTextMarkup(stdom.Element): + self._value=v[0] + + def __repr__(self): +- return '%s(%s)' % (self.__class__.__name__, `self._value`) ++ return '%s(%s)' % (self.__class__.__name__, repr(self._value)) + + class StructuredTextLiteral(StructuredTextMarkup): + def getColorizableTexts(self): +--- src/zope/structuredtext/tests.py.orig 2010-12-03 16:46:32 UTC ++++ src/zope/structuredtext/tests.py +@@ -45,7 +45,7 @@ class StngTests(unittest.TestCase): + doc = Document() + raw_text = readFile(regressions, f) + text = stng.structurize(raw_text) +- self.assert_(doc(text)) ++ self.assertTrue(doc(text)) + + def testRegressionsTests(self): + # HTML regression test +@@ -73,9 +73,9 @@ class BasicTests(unittest.TestCase): + doc = DocumentWithImages()(doc) + output = HTMLWithImages()(doc, level=1) + if not expected in output: +- print "Text: ", stxtxt.encode('utf-8') +- print "Converted:", output.encode('utf-8') +- print "Expected: ", expected.encode('utf-8') ++ print("Text: ", stxtxt.encode('utf-8')) ++ print("Converted:", output.encode('utf-8')) ++ print("Expected: ", expected.encode('utf-8')) + self.fail("'%s' not in result" % expected) + + def testUnderline(self): +@@ -279,8 +279,8 @@ class BasicTests(unittest.TestCase): + def testUnicodeContent(self): + # This fails because ST uses the default locale to get "letters" + # whereas it should use \w+ and re.U if the string is Unicode. +- self._test(u"h\xe9 **y\xe9** xx", +- u"h\xe9 y\xe9 xx") ++ self._test("h\xe9 **y\xe9** xx", ++ "h\xe9 y\xe9 xx") + + def test_suite(): + suite = unittest.TestSuite()