From nobody Sun Aug 27 11:43:57 2023 X-Original-To: dev-commits-ports-main@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 4RYWzx6gJzz4qryX; Sun, 27 Aug 2023 11:43:57 +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 4RYWzx6KS0z3T07; Sun, 27 Aug 2023 11:43:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693136637; 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=FG2rPuiKnT88DfcLEfPqEygRo9d/C7AZJBzFNsNPVWk=; b=UZKwO3QgaAjKVpoft8q/RanUqtfjEPktllPCgVPLA0H7w6ymyXuQ2gyO90exHE8FpCyK5P 5DQ85Fi6sznfoB9jnLwkLEZbviRTCHlKbsk6WZXuty93n1NX7dfQPqV4A+g36sVz3BD4AT ff1MTFvj/RMHDBAjzwjIPCiLs49LklcZtPcIo+UY1VtrsvylGZxqayQfbDK6B5tjqw3CJY VafVj/iiaNnIeLyTcTKrCJuscWE0Q9IoIcLpmCZy9dUT+DdMleR/nz/NZMWcyOUwJcR/3c ofsckCiDEeIoTIiIQeP/lYwr5tVb/JcwX0GlD+3EiedB9Rpvi4B9LyAsi0Bx0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693136637; 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=FG2rPuiKnT88DfcLEfPqEygRo9d/C7AZJBzFNsNPVWk=; b=v0m/talbYlTEQ04tgs1jevs3Vw+WqNSAfiRMggswOXsln2MuLFWDO7WD58RywfkfzUi6ij urAZKTHgYftABUhGBKa35CDKQc5nGCxmbrP6WdC4xJ36bxIJ16AXXjUNL5UbNESKs/sFRi KdCf1bsO+ANT62zRHtA8KfTAM65X9X+/XtzSxgE+ktHSTfTLFQR41HGaq+MVnyupWhkv+x PkqYSklQIPtP3MjU8wFQuDjli/OFUFzgdD6Wx6sNWoFSJIopkYaWzq/OW/gEYgWcPgrYPY /ZWkQ0XlVP175xpPcGNld3l5M7fgXDVD4uOYmRGZkkteO+tn7+4LsjL2heWq8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693136637; a=rsa-sha256; cv=none; b=qdW9xj/7XJPLPk9IoeLeNPv3GSiZOOkA7wY14hcS6n+tXOdjsP2qKhUu2V8NzpQIngpTqx lNG7Wk3iYt89u0Fpbe4gwUeAPj/Ai5wmXEjgn5njFThyoCTia3f2XG8bXxi6EZqL7DslKD BUOoARMgxXJ9EBdDWJ82wfUfmNpIhiumLy5+e5IQW/OWx4dkmewqQSk1OGe2ONrQPowTkU 991uOGOUem7HLNSUzHJXb6ckcW7RoI9jNC5a0QJHR2lZi0yCr0AaCZw5w2UQtL/4ZdhTeU QLwMcBy2wEYBEla7VsYWgXlbifO1tdbjgybFrdBZbwLXw3Mj/WE6+kbrSZxB2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RYWzx5M4Sz9S7; Sun, 27 Aug 2023 11:43:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37RBhvnr011024; Sun, 27 Aug 2023 11:43:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37RBhvM6011021; Sun, 27 Aug 2023 11:43:57 GMT (envelope-from git) Date: Sun, 27 Aug 2023 11:43:57 GMT Message-Id: <202308271143.37RBhvM6011021@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Ruslan Makhmatkhanov Subject: git: 1daa5c9c4026 - main - zope ports: remove leaf zope ports that have no sense in absence of zope itself List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rm X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1daa5c9c40262b9dd10186c92bc3e250ff1bcc2b Auto-Submitted: auto-generated The branch main has been updated by rm: URL: https://cgit.FreeBSD.org/ports/commit/?id=1daa5c9c40262b9dd10186c92bc3e250ff1bcc2b commit 1daa5c9c40262b9dd10186c92bc3e250ff1bcc2b Author: Ruslan Makhmatkhanov AuthorDate: 2023-08-27 11:43:24 +0000 Commit: Ruslan Makhmatkhanov CommitDate: 2023-08-27 11:43:24 +0000 zope ports: remove leaf zope ports that have no sense in absence of zope itself With hat: zope --- MOVED | 3 + textproc/Makefile | 3 - textproc/py-zope.i18nmessageid/Makefile | 18 - textproc/py-zope.i18nmessageid/distinfo | 3 - textproc/py-zope.i18nmessageid/pkg-descr | 3 - textproc/py-zope.structuredtext/Makefile | 18 - textproc/py-zope.structuredtext/distinfo | 2 - textproc/py-zope.structuredtext/files/patch-2to3 | 138 --- textproc/py-zope.structuredtext/pkg-descr | 3 - textproc/py-zope.tal/Makefile | 23 - textproc/py-zope.tal/distinfo | 2 - textproc/py-zope.tal/files/patch-2to3 | 1119 ---------------------- textproc/py-zope.tal/pkg-descr | 5 - 13 files changed, 3 insertions(+), 1337 deletions(-) diff --git a/MOVED b/MOVED index 2d9b99416f46..b6caaf9dde37 100644 --- a/MOVED +++ b/MOVED @@ -7833,3 +7833,6 @@ devel/py-zope.testing||2023-08-27|Remove leaf zope ports that have no sense in a devel/py-zope.exceptions||2023-08-27|Remove leaf zope ports that have no sense in absence of zope itself devel/py-zope.i18n||2023-08-27|Remove leaf zope ports that have no sencse in absence of zope itself devel/py-zope.location||2023-08-27|Remove leaf zope ports that have no sense in absence of zope itself +textproc/py-zope.i18nmessageid||2023-08-27|Remove leaf zope ports that have no sense in absence of zope itself +textproc/py-zope.structuredtext||2023-08-27|Remove leaf zope ports that have no sense in absence of zope itself +textproc/py-zope.tal||2023-08-27|Remove leaf zope ports that have no sense in absence of zope itself diff --git a/textproc/Makefile b/textproc/Makefile index 9c308007771a..90f603f0d041 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1634,9 +1634,6 @@ SUBDIR += py-xmlschema SUBDIR += py-yapf SUBDIR += py-youseedee - SUBDIR += py-zope.i18nmessageid - SUBDIR += py-zope.structuredtext - SUBDIR += py-zope.tal SUBDIR += py-zpt SUBDIR += qprint SUBDIR += qr diff --git a/textproc/py-zope.i18nmessageid/Makefile b/textproc/py-zope.i18nmessageid/Makefile deleted file mode 100644 index e33ea4e19eb7..000000000000 --- a/textproc/py-zope.i18nmessageid/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -PORTNAME= zope.i18nmessageid -PORTVERSION= 5.0.1 -CATEGORIES= textproc www python -MASTER_SITES= PYPI -PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -DIST_SUBDIR= zope - -MAINTAINER= zope@FreeBSD.org -COMMENT= Message Identifiers for internationalization -WWW= https://pypi.org/project/zope.i18nmessageid/ - -LICENSE= ZPL21 -LICENSE_FILE= ${WRKSRC}/LICENSE.txt - -USES= python -USE_PYTHON= distutils autoplist - -.include diff --git a/textproc/py-zope.i18nmessageid/distinfo b/textproc/py-zope.i18nmessageid/distinfo deleted file mode 100644 index d4023f1f7dc3..000000000000 --- a/textproc/py-zope.i18nmessageid/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -TIMESTAMP = 1622489099 -SHA256 (zope/zope.i18nmessageid-5.0.1.tar.gz) = 9534142b684c986f5303f469573978e5a340f05ba2eee4f872933f1c38b1b059 -SIZE (zope/zope.i18nmessageid-5.0.1.tar.gz) = 28217 diff --git a/textproc/py-zope.i18nmessageid/pkg-descr b/textproc/py-zope.i18nmessageid/pkg-descr deleted file mode 100644 index 565e286c0d46..000000000000 --- a/textproc/py-zope.i18nmessageid/pkg-descr +++ /dev/null @@ -1,3 +0,0 @@ -zope.i18nmessageid provides facilities for declaring such messages -within program source text; translation of the messages is the -responsiblitiy of the 'zope.i18n' package. diff --git a/textproc/py-zope.structuredtext/Makefile b/textproc/py-zope.structuredtext/Makefile deleted file mode 100644 index 428a82e78ea3..000000000000 --- a/textproc/py-zope.structuredtext/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -PORTNAME= zope.structuredtext -PORTVERSION= 3.5.1 -PORTREVISION= 1 -CATEGORIES= textproc python zope -MASTER_SITES= PYPI -PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -DIST_SUBDIR= zope - -MAINTAINER= zope@FreeBSD.org -COMMENT= StructuredText parser -WWW= https://pypi.org/project/zope.structuredtext/ - -LICENSE= ZPL21 - -USES= python -USE_PYTHON= distutils autoplist - -.include diff --git a/textproc/py-zope.structuredtext/distinfo b/textproc/py-zope.structuredtext/distinfo deleted file mode 100644 index f26cc17650e8..000000000000 --- a/textproc/py-zope.structuredtext/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (zope/zope.structuredtext-3.5.1.tar.gz) = 12b9119ccc737470da73ee777118068db171e77ef9f28e69360905da8b8dbc70 -SIZE (zope/zope.structuredtext-3.5.1.tar.gz) = 59461 diff --git a/textproc/py-zope.structuredtext/files/patch-2to3 b/textproc/py-zope.structuredtext/files/patch-2to3 deleted file mode 100644 index 495107b3a18e..000000000000 --- a/textproc/py-zope.structuredtext/files/patch-2to3 +++ /dev/null @@ -1,138 +0,0 @@ ---- 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() diff --git a/textproc/py-zope.structuredtext/pkg-descr b/textproc/py-zope.structuredtext/pkg-descr deleted file mode 100644 index 90ef85f1ede8..000000000000 --- a/textproc/py-zope.structuredtext/pkg-descr +++ /dev/null @@ -1,3 +0,0 @@ -This package provides a parser and renderers for the classic Zope -"structured text" markup dialect (STX). STX is a plain text markup -in which document structure is signalled primarily by identation. diff --git a/textproc/py-zope.tal/Makefile b/textproc/py-zope.tal/Makefile deleted file mode 100644 index 3c4b141b5ddb..000000000000 --- a/textproc/py-zope.tal/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -PORTNAME= zope.tal -PORTVERSION= 3.6.1 -PORTREVISION= 1 -CATEGORIES= textproc python zope -MASTER_SITES= PYPI -PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -DIST_SUBDIR= zope - -MAINTAINER= zope@FreeBSD.org -COMMENT= Zope Template Application Language (TAL) -WWW= https://pypi.org/project/zope.tal/ - -LICENSE= ZPL21 - -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}zope.i18nmessageid>=0:textproc/py-zope.i18nmessageid@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}zope.interface>=0:devel/py-zope.interface@${PY_FLAVOR} - -USES= python zip -USE_PYTHON= distutils autoplist - -NO_ARCH= yes - -.include diff --git a/textproc/py-zope.tal/distinfo b/textproc/py-zope.tal/distinfo deleted file mode 100644 index ed8d504372cb..000000000000 --- a/textproc/py-zope.tal/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (zope/zope.tal-3.6.1.zip) = cacea002263fb0da49b73f44f03992a3363aa3aa6f07d896f815a685222d2eab -SIZE (zope/zope.tal-3.6.1.zip) = 150795 diff --git a/textproc/py-zope.tal/files/patch-2to3 b/textproc/py-zope.tal/files/patch-2to3 deleted file mode 100644 index 406cba687986..000000000000 --- a/textproc/py-zope.tal/files/patch-2to3 +++ /dev/null @@ -1,1119 +0,0 @@ ---- src/zope/tal/driver.py.orig 2012-02-14 07:21:28 UTC -+++ src/zope/tal/driver.py -@@ -43,7 +43,7 @@ import sys - import getopt - - if __name__ == "__main__": -- import setpath # Local hack to tweak sys.path etc. -+ from . import setpath # Local hack to tweak sys.path etc. - - # Import local classes - import zope.tal.taldefs -@@ -104,9 +104,9 @@ ENGINES = {'test23.html': TestEngine, - } - - def usage(code, msg=''): -- print >> sys.stderr, __doc__ -+ print(__doc__, file=sys.stderr) - if msg: -- print >> sys.stderr, msg -+ print(msg, file=sys.stderr) - sys.exit(code) - - def main(): -@@ -120,7 +120,7 @@ def main(): - try: - opts, args = getopt.getopt(sys.argv[1:], "hHxlmstia", - ['help', 'html', 'xml']) -- except getopt.error, msg: -+ except getopt.error as msg: - usage(2, msg) - for opt, arg in opts: - if opt in ('-h', '--help'): ---- src/zope/tal/dummyengine.py.orig 2012-02-14 07:21:28 UTC -+++ src/zope/tal/dummyengine.py -@@ -100,12 +100,12 @@ class DummyEngine(object): - if type == "not": - return not self.evaluate(expr) - if type == "exists": -- return self.locals.has_key(expr) or self.globals.has_key(expr) -+ return expr in self.locals or expr in self.globals - if type == "python": - try: - return eval(expr, self.globals, self.locals) - except: -- raise TALExpressionError("evaluation error in %s" % `expr`) -+ raise TALExpressionError("evaluation error in %s" % repr(expr)) - if type == "position": - # Insert the current source file name, line number, - # and column offset. -@@ -114,17 +114,17 @@ class DummyEngine(object): - else: - lineno, offset = None, None - return '%s (%s,%s)' % (self.source_file, lineno, offset) -- raise TALExpressionError("unrecognized expression: " + `expression`) -+ raise TALExpressionError("unrecognized expression: " + repr(expression)) - - # implementation; can be overridden - def evaluatePathOrVar(self, expr): - expr = expr.strip() -- if self.locals.has_key(expr): -+ if expr in self.locals: - return self.locals[expr] -- elif self.globals.has_key(expr): -+ elif expr in self.globals: - return self.globals[expr] - else: -- raise TALExpressionError("unknown variable: %s" % `expr`) -+ raise TALExpressionError("unknown variable: %s" % repr(expr)) - - def evaluateValue(self, expr): - return self.evaluate(expr) -@@ -134,7 +134,7 @@ class DummyEngine(object): - - def evaluateText(self, expr): - text = self.evaluate(expr) -- if isinstance(text, (str, unicode, Message)): -+ if isinstance(text, (str, Message)): - return text - if text is not None and text is not Default: - text = str(text) -@@ -159,7 +159,7 @@ class DummyEngine(object): - macro = self.macros[localName] - else: - # External macro -- import driver -+ from . import driver - program, macros = driver.compilefile(file) - macro = macros.get(localName) - if not macro: -@@ -208,7 +208,7 @@ class DummyEngine(object): - locals = self.locals.copy() - - assert lang == 'text/server-python' -- import sys, StringIO -+ import sys, io - - # Removing probable comments - if code.strip().startswith(''): -@@ -216,15 +216,15 @@ class DummyEngine(object): - - # Prepare code. - lines = code.split('\n') -- lines = filter(lambda l: l.strip() != '', lines) -+ lines = [l for l in lines if l.strip() != ''] - code = '\n'.join(lines) - # This saves us from all indentation issues :) - if code.startswith(' ') or code.startswith('\t'): - code = 'if 1 == 1:\n' + code + '\n' - tmp = sys.stdout -- sys.stdout = StringIO.StringIO() -+ sys.stdout = io.StringIO() - try: -- exec code in globals, locals -+ exec(code, globals, locals) - finally: - result = sys.stdout - sys.stdout = tmp -@@ -246,7 +246,7 @@ class Iterator(object): - self.engine = engine - self.nextIndex = 0 - -- def next(self): -+ def __next__(self): - i = self.nextIndex - try: - item = self.seq[i] -@@ -264,7 +264,7 @@ class DummyTranslationDomain(object): - msgids = {} - - def appendMsgid(self, domain, data): -- if not self.msgids.has_key(domain): -+ if domain not in self.msgids: - self.msgids[domain] = [] - self.msgids[domain].append(data) - -@@ -308,7 +308,7 @@ class DummyTranslationDomain(object): - self.appendMsgid(domain, (msgid, mapping)) - - def repl(m): -- return unicode(mapping[m.group(m.lastindex).lower()]) -+ return str(mapping[m.group(m.lastindex).lower()]) - cre = re.compile(r'\$(?:([_A-Za-z][-\w]*)|\{([_A-Za-z][-\w]*)\})') - return cre.sub(repl, text) - ---- src/zope/tal/htmltalparser.py.orig 2012-02-14 09:53:32 UTC -+++ src/zope/tal/htmltalparser.py -@@ -14,7 +14,7 @@ - """Parse HTML and compile to TALInterpreter intermediate code. - """ - --from HTMLParser import HTMLParser, HTMLParseError -+from html.parser import HTMLParser, HTMLParseError - - from zope.tal.taldefs import (ZOPE_METAL_NS, ZOPE_TAL_NS, ZOPE_I18N_NS, - METALError, TALError, I18NError) -@@ -118,7 +118,7 @@ class HTMLTALParser(HTMLParser): - f.close() - try: - self.parseString(data) -- except TALError, e: -+ except TALError as e: - e.setFile(file) - raise - -@@ -141,7 +141,7 @@ class HTMLTALParser(HTMLParser): - = self.process_ns(tag, attrs) - if tag in EMPTY_HTML_TAGS and "content" in taldict: - raise TALError( -- "empty HTML tags cannot use tal:content: %s" % `tag`, -+ "empty HTML tags cannot use tal:content: %s" % repr(tag), - self.getpos()) - # Support for inline Python code. - if tag == 'script': -@@ -163,7 +163,7 @@ class HTMLTALParser(HTMLParser): - if "content" in taldict: - if tag in EMPTY_HTML_TAGS: - raise TALError( -- "empty HTML tags cannot use tal:content: %s" % `tag`, -+ "empty HTML tags cannot use tal:content: %s" % repr(tag), - self.getpos()) - self.gen.emitStartElement(tag, attrlist, taldict, metaldict, - i18ndict, self.getpos()) ---- src/zope/tal/interfaces.py.orig 2012-02-14 07:21:28 UTC -+++ src/zope/tal/interfaces.py -@@ -61,13 +61,14 @@ class ITALExpressionEngine(Interface): - using the 'is' operator in Python. - """ - -- def setPosition((lineno, offset)): -+ def setPosition(xxx_todo_changeme): - """Inform the engine of the current position in the source file. - - This is used to allow the evaluation engine to report - execution errors so that site developers can more easily - locate the offending expression. - """ -+ (lineno, offset) = xxx_todo_changeme - - def setSourceFile(filename): - """Inform the engine of the name of the current source file. -@@ -128,12 +129,13 @@ class ITALExpressionEngine(Interface): - No constraints are imposed on the return value. - """ - -- def createErrorInfo(exception, (lineno, offset)): -+ def createErrorInfo(exception, xxx_todo_changeme1): - """Returns an ITALExpressionErrorInfo object. - - The returned object is used to provide information about the - error condition for the on-error handler. - """ -+ (lineno, offset) = xxx_todo_changeme1 - - def setGlobal(name, value): - """Set a global variable. ---- src/zope/tal/ndiff.py.orig 2012-02-14 07:21:28 UTC -+++ src/zope/tal/ndiff.py -@@ -114,6 +114,7 @@ TRACE = 0 - - # define what "junk" means - import re -+from functools import reduce - - def IS_LINE_JUNK(line, pat=re.compile(r"\s*#?\s*$").match): - return pat(line) is not None -@@ -209,7 +210,7 @@ class SequenceMatcher(object): - b = self.b - self.b2j = b2j = {} - self.b2jhas = b2jhas = b2j.has_key -- for i in xrange(len(b)): -+ for i in range(len(b)): - elt = b[i] - if b2jhas(elt): - b2j[elt].append(i) -@@ -222,7 +223,7 @@ class SequenceMatcher(object): - # saved. - isjunk, junkdict = self.isjunk, {} - if isjunk: -- for elt in b2j.keys(): -+ for elt in list(b2j.keys()): - if isjunk(elt): - junkdict[elt] = 1 # value irrelevant; it's a set - del b2j[elt] -@@ -281,7 +282,7 @@ class SequenceMatcher(object): - # junk-free match ending with a[i-1] and b[j] - j2len = {} - nothing = [] -- for i in xrange(alo, ahi): -+ for i in range(alo, ahi): - # look at all instances of a[i] in b; note that because - # b2j has no junk keys, the loop is skipped if a[i] is junk - j2lenget = j2len.get -@@ -314,8 +315,8 @@ class SequenceMatcher(object): - bestsize = bestsize + 1 - - if TRACE: -- print "get_matching_blocks", alo, ahi, blo, bhi -- print " returns", besti, bestj, bestsize -+ print("get_matching_blocks", alo, ahi, blo, bhi) -+ print(" returns", besti, bestj, bestsize) - return besti, bestj, bestsize - - def get_matching_blocks(self): -@@ -326,7 +327,7 @@ class SequenceMatcher(object): - self.__helper(0, la, 0, lb, self.matching_blocks) - self.matching_blocks.append((la, lb, 0)) - if TRACE: -- print '*** matching blocks', self.matching_blocks -+ print('*** matching blocks', self.matching_blocks) - return self.matching_blocks - - # builds list of matching blocks covering a[alo:ahi] and -@@ -417,8 +418,8 @@ class SequenceMatcher(object): - - # meant for dumping lines - def dump(tag, x, lo, hi): -- for i in xrange(lo, hi): -- print tag, x[i], -+ for i in range(lo, hi): -+ print(tag, x[i], end=' ') - - def plain_replace(a, alo, ahi, b, blo, bhi): - assert alo < ahi and blo < bhi -@@ -438,7 +439,7 @@ def plain_replace(a, alo, ahi, b, blo, bhi): - - def fancy_replace(a, alo, ahi, b, blo, bhi): - if TRACE: -- print '*** fancy_replace', alo, ahi, blo, bhi -+ print('*** fancy_replace', alo, ahi, blo, bhi) - dump('>', a, alo, ahi) - dump('<', b, blo, bhi) - -@@ -451,10 +452,10 @@ def fancy_replace(a, alo, ahi, b, blo, bhi): - # search for the pair that matches best without being identical - # (identical lines must be junk lines, & we don't want to synch up - # on junk -- unless we have to) -- for j in xrange(blo, bhi): -+ for j in range(blo, bhi): - bj = b[j] - cruncher.set_seq2(bj) -- for i in xrange(alo, ahi): -+ for i in range(alo, ahi): - ai = a[i] - if ai == bj: - if eqi is None: -@@ -486,7 +487,7 @@ def fancy_replace(a, alo, ahi, b, blo, bhi): - # a[best_i] very similar to b[best_j]; eqi is None iff they're not - # identical - if TRACE: -- print '*** best_ratio', best_ratio, best_i, best_j -+ print('*** best_ratio', best_ratio, best_i, best_j) - dump('>', a, best_i, best_i+1) - dump('<', b, best_j, best_j+1) - -@@ -512,11 +513,11 @@ def fancy_replace(a, alo, ahi, b, blo, bhi): - atags = atags + ' ' * la - btags = btags + ' ' * lb - else: -- raise ValueError('unknown tag ' + `tag`) -+ raise ValueError('unknown tag ' + repr(tag)) - printq(aelt, belt, atags, btags) - else: - # the synch pair is identical -- print ' ', aelt, -+ print(' ', aelt, end=' ') - - # pump out diffs from after the synch point - fancy_helper(a, best_i+1, ahi, b, best_j+1, bhi) -@@ -537,12 +538,12 @@ def printq(aline, bline, atags, btags): - common = min(count_leading(aline, "\t"), - count_leading(bline, "\t")) - common = min(common, count_leading(atags[:common], " ")) -- print "-", aline, -+ print("-", aline, end=' ') - if count_leading(atags, " ") < len(atags): -- print "?", "\t" * common + atags[common:] -- print "+", bline, -+ print("?", "\t" * common + atags[common:]) -+ print("+", bline, end=' ') - if count_leading(btags, " ") < len(btags): -- print "?", "\t" * common + btags[common:] -+ print("?", "\t" * common + btags[common:]) - - def count_leading(line, ch): - i, n = 0, len(line) -@@ -562,7 +563,7 @@ def fail(msg): - def fopen(fname): - try: - return open(fname, 'r') -- except IOError, detail: -+ except IOError as detail: - return fail("couldn't open " + fname + ": " + str(detail)) - - # open two files & spray the diff to stdout; return false iff a problem -@@ -586,7 +587,7 @@ def fcompare(f1name, f2name): - elif tag == 'equal': - dump(' ', a, alo, ahi) - else: -- raise ValueError('unknown tag ' + `tag`) -+ raise ValueError('unknown tag ' + repr(tag)) - - return 1 - -@@ -597,7 +598,7 @@ def main(args): - import getopt - try: - opts, args = getopt.getopt(args, "qr:") -- except getopt.error, detail: -+ except getopt.error as detail: - return fail(str(detail)) - noisy = 1 - qseen = rseen = 0 -@@ -621,8 +622,8 @@ def main(args): - return fail("need 2 filename args") - f1name, f2name = args - if noisy: -- print '-:', f1name -- print '+:', f2name -+ print('-:', f1name) -+ print('+:', f2name) - return fcompare(f1name, f2name) - - def restore(which): -@@ -631,7 +632,7 @@ def restore(which): - prefixes = (" ", tag) - for line in sys.stdin.readlines(): - if line[:2] in prefixes: -- print line[2:], -+ print(line[2:], end=' ') - - if __name__ == '__main__': - import sys ---- src/zope/tal/runtest.py.orig 2012-02-14 07:21:28 UTC -+++ src/zope/tal/runtest.py -@@ -19,24 +19,24 @@ import os - import sys - import traceback - --from cStringIO import StringIO -+from io import StringIO - - if __name__ == "__main__": -- import setpath # Local hack to tweak sys.path etc. -+ from . import setpath # Local hack to tweak sys.path etc. - - import zope.tal.driver - import zope.tal.tests.utils - - def showdiff(a, b): -- import ndiff -+ from . import ndiff - cruncher = ndiff.SequenceMatcher(ndiff.IS_LINE_JUNK, a, b) - for tag, alo, ahi, blo, bhi in cruncher.get_opcodes(): - if tag == "equal": - continue -- print nicerange(alo, ahi) + tag[0] + nicerange(blo, bhi) -+ print(nicerange(alo, ahi) + tag[0] + nicerange(blo, bhi)) - ndiff.dump('<', a, alo, ahi) - if a and b: -- print '---' -+ print('---') - ndiff.dump('>', b, blo, bhi) - - def nicerange(lo, hi): -@@ -80,10 +80,10 @@ def main(): - if arg.find("_sa") >= 0 and "-a" not in opts: - locopts.append("-a") - if not unittesting: -- print arg, -+ print(arg, end=' ') - sys.stdout.flush() - if zope.tal.tests.utils.skipxml and arg.endswith(".xml"): -- print "SKIPPED (XML parser not available)" -+ print("SKIPPED (XML parser not available)") - continue - save = sys.stdout, sys.argv - try: -@@ -98,13 +98,13 @@ def main(): - except: - errors = 1 - if quiet: -- print sys.exc_type -+ print(sys.exc_info()[0]) - sys.stdout.flush() - else: - if unittesting: -- print -+ print() - else: -- print "Failed:" -+ print("Failed:") - sys.stdout.flush() - traceback.print_exc() - continue -@@ -116,7 +116,7 @@ def main(): - f = open(outfile) - except IOError: - expected = None -- print "(missing file %s)" % outfile, -+ print("(missing file %s)" % outfile, end=' ') - else: - expected = f.readlines() - f.close() -@@ -127,12 +127,12 @@ def main(): - actual = readlines(stdout) - if actual == expected: - if not unittesting: -- print "OK" -+ print("OK") - else: - if unittesting: -- print -+ print() - else: -- print "not OK" -+ print("not OK") - errors = 1 - if not quiet and expected is not None: - showdiff(expected, actual) ---- src/zope/tal/talgenerator.py.orig 2012-02-14 07:21:28 UTC -+++ src/zope/tal/talgenerator.py -@@ -69,7 +69,7 @@ class TALGenerator(object): - output = [] - collect = [] - cursor = 0 -- for cursor in xrange(len(program)+1): -+ for cursor in range(len(program)+1): - try: - item = program[cursor] - except IndexError: -@@ -197,8 +197,8 @@ class TALGenerator(object): - def compileExpression(self, expr): - try: - return self.expressionCompiler.compile(expr) -- except self.CompilerError, err: -- raise TALError('%s in expression %s' % (err.args[0], `expr`), -+ except self.CompilerError as err: -+ raise TALError('%s in expression %s' % (err.args[0], repr(expr)), - self.position) - - def pushProgram(self): -@@ -259,7 +259,7 @@ class TALGenerator(object): - m = re.match( - r"(?s)\s*(?:(global|local)\s+)?(%s)\s+(.*)\Z" % NAME_RE, part) - if not m: -- raise TALError("invalid define syntax: " + `part`, -+ raise TALError("invalid define syntax: " + repr(part), - self.position) - scope, name, expr = m.group(1, 2, 3) - scope = scope or "local" -@@ -293,7 +293,7 @@ class TALGenerator(object): - def emitRepeat(self, arg): - m = re.match("(?s)\s*(%s)\s+(.*)\Z" % NAME_RE, arg) - if not m: -- raise TALError("invalid repeat syntax: " + `arg`, -+ raise TALError("invalid repeat syntax: " + repr(arg), - self.position) - name, expr = m.group(1, 2) - cexpr = self.compileExpression(expr) -@@ -346,11 +346,11 @@ class TALGenerator(object): - def emitDefineMacro(self, macroName): - program = self.popProgram() - macroName = macroName.strip() -- if self.macros.has_key(macroName): -- raise METALError("duplicate macro definition: %s" % `macroName`, -+ if macroName in self.macros: -+ raise METALError("duplicate macro definition: %s" % repr(macroName), - self.position) - if not re.match('%s$' % NAME_RE, macroName): -- raise METALError("invalid macro name: %s" % `macroName`, -+ raise METALError("invalid macro name: %s" % repr(macroName), - self.position) - self.macros[macroName] = program - self.inMacroDef = self.inMacroDef - 1 -@@ -374,18 +374,18 @@ class TALGenerator(object): - program = self.popProgram() - slotName = slotName.strip() - if not re.match('%s$' % NAME_RE, slotName): -- raise METALError("invalid slot name: %s" % `slotName`, -+ raise METALError("invalid slot name: %s" % repr(slotName), - self.position) - self.emit("defineSlot", slotName, program) - - def emitFillSlot(self, slotName): - program = self.popProgram() - slotName = slotName.strip() -- if self.slots.has_key(slotName): -- raise METALError("duplicate fill-slot name: %s" % `slotName`, -+ if slotName in self.slots: -+ raise METALError("duplicate fill-slot name: %s" % repr(slotName), - self.position) - if not re.match('%s$' % NAME_RE, slotName): -- raise METALError("invalid slot name: %s" % `slotName`, -+ raise METALError("invalid slot name: %s" % repr(slotName), - self.position) - self.slots[slotName] = program - self.inMacroUse = 1 -@@ -449,13 +449,13 @@ class TALGenerator(object): - newlist = [] - for item in attrlist: - key = item[0] -- if repldict.has_key(key): -+ if key in repldict: - expr, xlat, msgid = repldict[key] - item = item[:2] + ("replace", expr, xlat, msgid) - del repldict[key] - newlist.append(item) - # Add dynamic-only attributes -- for key, (expr, xlat, msgid) in repldict.items(): -+ for key, (expr, xlat, msgid) in list(repldict.items()): - newlist.append((key, None, "insert", expr, xlat, msgid)) - return newlist - -@@ -482,25 +482,25 @@ class TALGenerator(object): - taldict["content"] = taldict.pop("replace") - replaced = True - -- for key, value in taldict.items(): -+ for key, value in list(taldict.items()): - if key not in taldefs.KNOWN_TAL_ATTRIBUTES: -- raise TALError("bad TAL attribute: " + `key`, position) -+ raise TALError("bad TAL attribute: " + repr(key), position) - if not (value or key == 'omit-tag'): - raise TALError("missing value for TAL attribute: " + -- `key`, position) -- for key, value in metaldict.items(): -+ repr(key), position) -+ for key, value in list(metaldict.items()): - if key not in taldefs.KNOWN_METAL_ATTRIBUTES: -- raise METALError("bad METAL attribute: " + `key`, -+ raise METALError("bad METAL attribute: " + repr(key), - position) - if not value: - raise TALError("missing value for METAL attribute: " + -- `key`, position) -- for key, value in i18ndict.items(): -+ repr(key), position) -+ for key, value in list(i18ndict.items()): - if key not in taldefs.KNOWN_I18N_ATTRIBUTES: -- raise I18NError("bad i18n attribute: " + `key`, position) -+ raise I18NError("bad i18n attribute: " + repr(key), position) - if not value and key in ("attributes", "data", "id"): - raise I18NError("missing value for i18n attribute: " + -- `key`, position) -+ repr(key), position) - - todo = {} - defineMacro = metaldict.get("define-macro") -@@ -681,7 +681,7 @@ class TALGenerator(object): - i18nattrs = {} - # Convert repldict's name-->expr mapping to a - # name-->(compiled_expr, translate) mapping -- for key, value in repldict.items(): -+ for key, value in list(repldict.items()): - if i18nattrs.get(key, None): - raise I18NError( - "attribute [%s] cannot both be part of tal:attributes" ---- src/zope/tal/talgettext.py.orig 2012-02-14 07:21:28 UTC -+++ src/zope/tal/talgettext.py -@@ -62,16 +62,16 @@ NLSTR = '"\n"' - - def usage(code, msg=''): - # Python 2.1 required -- print >> sys.stderr, __doc__ -+ print(__doc__, file=sys.stderr) - if msg: -- print >> sys.stderr, msg -+ print(msg, file=sys.stderr) - sys.exit(code) - - - class POTALInterpreter(TALInterpreter): - def translate(self, msgid, default=None, i18ndict=None, obj=None): - if default is None: -- default = getattr(msgid, 'default', unicode(msgid)) -+ default = getattr(msgid, 'default', str(msgid)) - # If no i18n dict exists yet, create one. - if i18ndict is None: - i18ndict = {} -@@ -126,15 +126,15 @@ class POEngine(DummyEngine): - if msgid not in domain: - domain[msgid] = [] - else: -- msgids = domain.keys() -+ msgids = list(domain.keys()) - idx = msgids.index(msgid) - existing_msgid = msgids[idx] - if msgid.default != existing_msgid.default: - references = '\n'.join([location[0]+':'+str(location[1]) for location in domain[msgid]]) -- print >> sys.stderr, (u"Warning: msgid '%s' in %s already exists " \ -+ print(("Warning: msgid '%s' in %s already exists " \ - "with a different default (bad: %s, should be: %s)\n" \ - "The references for the existent value are:\n%s\n" % \ -- (msgid, self.file+':'+str(position), msgid.default.encode('utf-8'), existing_msgid.default.encode('utf-8'), references)).encode('utf-8') -+ (msgid, self.file+':'+str(position), msgid.default.encode('utf-8'), existing_msgid.default.encode('utf-8'), references)).encode('utf-8'), file=sys.stderr) - domain[msgid].append((self.file, position)) - return 'x' - -@@ -170,8 +170,8 @@ class UpdatePOEngine(POEngine): - - try: - lines = open(self._filename).readlines() *** 468 LINES SKIPPED ***