From nobody Fri Mar 25 13:50:58 2022 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 ADAEA1A34A87; Fri, 25 Mar 2022 13:51:00 +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 4KQ3QX0hfgz3h5W; Fri, 25 Mar 2022 13:50:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648216260; 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=C4S1ciD8Chb51YJVXimf4NWsmw0FiIc9Y4VBSX+TKW0=; b=yQu66Qq45XlKGhywvd4wgoZQPCyUrB+2c2rCvSze3ONIPL9kRHEC0VLKuQ/k0J8xw56KQc QqArsKYglGaKtATU8IuFfOeAWZPi3iSe2F96q0nm0voCbaWPG2RWsF5LJyc+T1HhdDZgFm fF3X5KyNSz0Ng0gtRVcAMn5RfeI90RP+gTUDRgOQb/0ZlM+G/3ZyyAGW8h9L1mV8nBkrY/ QKzPD2dNPktMBvW7vGWUzZz1zC0KJ0teOobH6ClKQVqdpkiAjX7ZgCetpRoCThgGtjrq4K fZa3vjE20UAHyYYotrGsgFEAUQFcG4ffqQWdGgKNIuOzFnlKI2wlpx4LjjqiMw== 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 133BD5994; Fri, 25 Mar 2022 13:50:59 +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 22PDowdg037663; Fri, 25 Mar 2022 13:50:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22PDowvC037662; Fri, 25 Mar 2022 13:50:58 GMT (envelope-from git) Date: Fri, 25 Mar 2022 13:50:58 GMT Message-Id: <202203251350.22PDowvC037662@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: e0bd72244431 - main - security/py-zope.password: Fix build with setuptools 58.0.0+ 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: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e0bd72244431bda4f7da2636d93077cb163f71bc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648216260; 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=C4S1ciD8Chb51YJVXimf4NWsmw0FiIc9Y4VBSX+TKW0=; b=HbO+CXSsmvbCYzBtggfPWwQ9CftMgmN9pAAFTDjTJXhPM+14l+IqyaLb/P87Q7lNV9TvME ch8dNlUQjkrUCT+Ky822wpBjPKdFSF00L8SWQTHGIzNyDSQVXV8ONX44XZBpd/zTYRHVs7 cWQbubFRqCUJXb+/dBuBM9lE/1QsB3EIgpiAaj9GVYnh9/d7A5KZnx2/U7r6t2W30+PlgS VrMw0RbT2L+pHDHjKgiAOsvDgiQo0ySSf0/JErdz3Cx6TgB5BdvNbnH3EZJNywsytymkDa XHxmvOkgIEVczaV6B552H8Rx5fOClVxC28OQJtKGLnHryGg7tOKiuFgw7YN9zQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648216260; a=rsa-sha256; cv=none; b=H3TPGQyDGayIe65hLUb8pvFRhKznEywkDY3kJU4qR5V1vI9TmPwdSc/hllAybWhRJvCSYn DzQGGmrMVp4X/6WsacUFLRv1cdcPkqEzuIylj6R2AibcgmLd1Bif3vOjO73h+nAnO3qSjL alfPfIPbOFrNm+lK0XxHWHw/Pf1QLwRYvztoXtczG4PZisn+1yXV+oVnnrS5MVbeCZW4Aj U6G5Kdf/k5ytgfg5ytCOWpjsCgRXKleEQBRj8/dtnqXxtsUXR8EmFYqWE7nRN8FiZ2k4nV fSuCjKmOfwuIifFfxyIbk5O8h3E/7D6J46FLvDEgi1QjlN59zur2w1h6u2XF4Q== 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=e0bd72244431bda4f7da2636d93077cb163f71bc commit e0bd72244431bda4f7da2636d93077cb163f71bc Author: Po-Chuan Hsieh AuthorDate: 2022-03-25 13:34:19 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-03-25 13:38:21 +0000 security/py-zope.password: Fix build with setuptools 58.0.0+ With hat: python --- security/py-zope.password/files/patch-2to3 | 205 +++++++++++++++++++++++++++++ 1 file changed, 205 insertions(+) diff --git a/security/py-zope.password/files/patch-2to3 b/security/py-zope.password/files/patch-2to3 new file mode 100644 index 000000000000..d71c52e1ba57 --- /dev/null +++ b/security/py-zope.password/files/patch-2to3 @@ -0,0 +1,205 @@ +--- src/zope/password/tests/test_zpasswd.py.orig 2010-05-27 08:08:11 UTC ++++ src/zope/password/tests/test_zpasswd.py +@@ -19,7 +19,7 @@ $Id: test_zpasswd.py 112138 2010-05-07 15:23:02Z ulif + import os + import sys + import unittest, doctest +-from StringIO import StringIO ++from io import StringIO + + from zope.password import password, zpasswd + +@@ -51,23 +51,23 @@ class ArgumentParsingTestCase(TestBase): + argv = ["foo/bar.py"] + args + options = zpasswd.parse_args(argv) + self.assertEqual(options.program, "bar.py") +- self.assert_(options.version) ++ self.assertTrue(options.version) + return options + + def check_stdout_content(self, args): + try: + options = self.parse_args(args) +- except SystemExit, e: ++ except SystemExit as e: + self.assertEqual(e.code, 0) +- self.assert_(self.stdout.getvalue()) +- self.failIf(self.stderr.getvalue()) ++ self.assertTrue(self.stdout.getvalue()) ++ self.assertFalse(self.stderr.getvalue()) + else: + self.fail("expected SystemExit") + + def test_no_arguments(self): + options = self.parse_args([]) +- self.assert_(options.managers) +- self.assert_(not options.destination) ++ self.assertTrue(options.managers) ++ self.assertTrue(not options.destination) + + def test_version_long(self): + self.check_stdout_content(["--version"]) +@@ -88,11 +88,11 @@ class ArgumentParsingTestCase(TestBase): + + def test_config_short(self): + options = self.parse_args(["-c", self.config]) +- self.assert_(options.managers) ++ self.assertTrue(options.managers) + + def test_config_long(self): + options = self.parse_args(["--config", self.config]) +- self.assert_(options.managers) ++ self.assertTrue(options.managers) + + class ControlledInputApplication(zpasswd.Application): + +@@ -123,19 +123,19 @@ class InputCollectionTestCase(TestBase): + + def check_principal(self, expected): + output = self.stdout.getvalue() +- self.failUnless(output) ++ self.assertTrue(output) + + principal_lines = output.splitlines()[-(len(expected) + 1):-1] + for line, expline in zip(principal_lines, expected): +- self.failUnlessEqual(line.strip(), expline) ++ self.assertEqual(line.strip(), expline) + + def test_principal_information(self): + options = self.createOptions() + app = ControlledInputApplication(options, + ["id", "title", "login", "1", "passwd", "passwd", "description"]) + app.process() +- self.failUnless(not self.stderr.getvalue()) +- self.failUnless(app.all_input_consumed()) ++ self.assertTrue(not self.stderr.getvalue()) ++ self.assertTrue(app.all_input_consumed()) + self.check_principal([ + '>destination, principal +- print ++ print(self.title) ++ print(principal, file=destination) ++ print() + + return 0 + +@@ -185,21 +185,21 @@ class Application(object): + while True: + value = self.read_input_line(prompt).strip() + if not value and error: +- print >>sys.stderr, error ++ print(error, file=sys.stderr) + continue + return value + + def get_password_manager(self): + default = 0 + self.print_message("Password manager:") +- print ++ print() + managers = self.options.managers + + for i, (name, manager) in enumerate(managers): +- print "% i. %s" % (i + 1, name) ++ print("% i. %s" % (i + 1, name)) + if name == 'SSHA': + default = i +- print ++ print() + self.need_blank_line = True + while True: + password_manager = self.read_input_line( +@@ -212,8 +212,8 @@ class Application(object): + if index > 0 and index <= len(managers): + index -= 1 + break +- print >>sys.stderr, "You must select a password manager" +- print "%s password manager selected" % managers[index][0] ++ print("You must select a password manager", file=sys.stderr) ++ print("%s password manager selected" % managers[index][0]) + return managers[index] + + def get_password(self): +@@ -221,23 +221,23 @@ class Application(object): + while True: + password = self.read_password("Password: ") + if not password: +- print >>sys.stderr, "Password may not be empty" ++ print("Password may not be empty", file=sys.stderr) + continue + if password != password.strip() or password.split() != [password]: +- print >>sys.stderr, "Password may not contain spaces" ++ print("Password may not contain spaces", file=sys.stderr) + continue + break + again = self.read_password("Verify password: ") + if again != password: +- print >>sys.stderr, "Password not verified!" ++ print("Password not verified!", file=sys.stderr) + sys.exit(1) + return password + + def print_message(self, message): + if self.need_blank_line: +- print ++ print() + self.need_blank_line = False +- print message ++ print(message) + + def get_password_managers(config_path=None): + if not config_path: +@@ -247,7 +247,7 @@ def get_password_managers(config_path=None): + from zope.component import getUtilitiesFor + from zope.password.interfaces import IPasswordManager + +- print "Loading configuration..." ++ print("Loading configuration...") + config = xmlconfig.file(config_path) + managers = [] + for name, manager in getUtilitiesFor(IPasswordManager):