From nobody Mon Feb 28 12:53:49 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 7EBE119F8116; Mon, 28 Feb 2022 12:53:50 +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 4K6gL61jQBz3kmf; Mon, 28 Feb 2022 12:53:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646052830; 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=Y3tZaTSxdqHXVouqiAWQbdKQY4nIA84XQzr9HwIKmZY=; b=hdEQadRalSou82/pMV6efqO0hFE9cO+c3sZprZYHpKR6dM01og8d0tMyrFhN6y11a2LOPr ZL5iJF/Z2L9/pVLs5OPtSz+gq+SlPaQlKqz+1e5ADEECHxtedN997IC96WK9t+d3uf+XCQ v6QH0dHfzWYKuyOgs9nZr+MOwl7z3FYQMM0xOVw6Ok4r8n4YoFt3G6vIVW8e1qmYWlWWwo arAg/CwSs32ep/BA5aWOjphMCE5l0Oj8crhLv1izZlExNpwQ4xePAg+Y5ofbJwPLFhROiQ 45JtSMbNSYthMLIS7idaNUWy6rndATlYROv35NiiJBhdhX6m37lAsrMbZ+gyuQ== 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 A6BB41BA76; Mon, 28 Feb 2022 12:53:49 +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 21SCrnFK067304; Mon, 28 Feb 2022 12:53:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21SCrn6O067303; Mon, 28 Feb 2022 12:53:49 GMT (envelope-from git) Date: Mon, 28 Feb 2022 12:53:49 GMT Message-Id: <202202281253.21SCrn6O067303@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: 1eb8e5183d10 - main - devel/py-nose: 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: 1eb8e5183d103fdc3b998c24124f9d0efba5caa1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646052830; 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=Y3tZaTSxdqHXVouqiAWQbdKQY4nIA84XQzr9HwIKmZY=; b=cPngOJ/re3+VCq1aane/0CZVFnVIAKNFDAqUzB7s23uNQDa0p4ERyOuW0Qbs6UNqQK35CO uv6Em+Fxi6mZ62fP2EIEIbwmyfkFJoxjs8Ei4nnh/WJ/kohnoaiHB0/gN/hbWPBUHq//qe It+RXNpGtJrm+ydvxSIfyrT2zdd3FhlgMWq1ycf/nTgpTSBgHpGZLW6Y7hLKBKd1NIw0fz hcS2m+oryQW5GhoqEsB18h222HLtmZT6a+aw2yrR8R5XPazvJmE7kEIKpXKn/+fyQz6f71 T7uriWggKBKihJTuI4FNwvILgc8i+WP4SBv0X6qKFcwgB9Wc7nb2d4yFKGwc7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646052830; a=rsa-sha256; cv=none; b=Nfh2q30iols6WHy/t5QNfVvtpvPqRMx/q4vxDOEnZI8eyVrwsY4tDjNKXbpnBOADGWq1Gn SgdjLRQ70821UK2+otfEIeuJTHlfSyDv+c5pYWA8Kg6RANIOiFCulHYL8dYKPoHMSM6d1I 0W1coCveFJIUGEEzvDt0OK6k8j7+Plp61xK2HYY2RAkWLL986Bash2xtfUNQcAcn/e9yXC KmWeqVymJIL8xvUcZz+lBtdUeU0bnw3iu7wB7KbdybjCLlK0YpBRkAaXnlIV14ncodjq7Y VF6d7R+EbgYi2HC8n4+MbDCbNmo4JUci0bkkieIMYS3noVWOdozAHdERN4VOrA== 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=1eb8e5183d103fdc3b998c24124f9d0efba5caa1 commit 1eb8e5183d103fdc3b998c24124f9d0efba5caa1 Author: Po-Chuan Hsieh AuthorDate: 2022-02-28 09:40:11 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-02-28 12:46:40 +0000 devel/py-nose: Fix build with setuptools 58.0.0+ setuptools 58.0.0 removes 2to3 support. With hat: python --- devel/py-nose/files/patch-2to3 | 357 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 357 insertions(+) diff --git a/devel/py-nose/files/patch-2to3 b/devel/py-nose/files/patch-2to3 new file mode 100644 index 000000000000..b81577c51658 --- /dev/null +++ b/devel/py-nose/files/patch-2to3 @@ -0,0 +1,357 @@ +--- nose/config.py.orig 2015-04-04 08:52:52 UTC ++++ nose/config.py +@@ -65,7 +65,7 @@ class ConfiguredDefaultsOptionParser(object): + cfg = ConfigParser.RawConfigParser() + try: + cfg.read(filename) +- except ConfigParser.Error, exc: ++ except ConfigParser.Error as exc: + raise ConfigError("Error reading config file %r: %s" % + (filename, str(exc))) + config.extend(self._configTuples(cfg, filename)) +@@ -79,7 +79,7 @@ class ConfiguredDefaultsOptionParser(object): + filename = '' + try: + cfg.readfp(fh) +- except ConfigParser.Error, exc: ++ except ConfigParser.Error as exc: + raise ConfigError("Error reading config file %r: %s" % + (filename, str(exc))) + return self._configTuples(cfg, filename) +@@ -113,12 +113,12 @@ class ConfiguredDefaultsOptionParser(object): + continue + try: + self._processConfigValue(name, value, values, parser) +- except NoSuchOptionError, exc: ++ except NoSuchOptionError as exc: + self._file_error( + "Error reading config file %r: " + "no such option %r" % (filename, exc.name), + name=name, filename=filename) +- except optparse.OptionValueError, exc: ++ except optparse.OptionValueError as exc: + msg = str(exc).replace('--' + name, repr(name), 1) + self._file_error("Error reading config file %r: " + "%s" % (filename, msg), +@@ -128,12 +128,12 @@ class ConfiguredDefaultsOptionParser(object): + values = self._parser.get_default_values() + try: + config = self._readConfiguration(config_files) +- except ConfigError, exc: ++ except ConfigError as exc: + self._error(str(exc)) + else: + try: + self._applyConfigurationToValues(self._parser, config, values) +- except ConfigError, exc: ++ except ConfigError as exc: + self._error(str(exc)) + return self._parser.parse_args(args, values) + +--- nose/core.py.orig 2015-04-04 08:52:52 UTC ++++ nose/core.py +@@ -150,7 +150,7 @@ class TestProgram(unittest.TestProgram): + if self.config.options.version: + from nose import __version__ + sys.stdout = sys.__stdout__ +- print "%s version %s" % (os.path.basename(sys.argv[0]), __version__) ++ print("%s version %s" % (os.path.basename(sys.argv[0]), __version__)) + sys.exit(0) + + if self.config.options.showPlugins: +@@ -224,25 +224,25 @@ class TestProgram(unittest.TestProgram): + v = self.config.verbosity + self.config.plugins.sort() + for p in self.config.plugins: +- print "Plugin %s" % p.name ++ print("Plugin %s" % p.name) + if v >= 2: +- print " score: %s" % p.score +- print '\n'.join(textwrap.wrap(p.help().strip(), ++ print(" score: %s" % p.score) ++ print('\n'.join(textwrap.wrap(p.help().strip(), + initial_indent=' ', +- subsequent_indent=' ')) ++ subsequent_indent=' '))) + if v >= 3: + parser = DummyParser() + p.addOptions(parser) + if len(parser.options): + print +- print " Options:" ++ print(" Options:") + for opts, help in parser.options: +- print ' %s' % (', '.join(opts)) ++ print(' %s' % (', '.join(opts))) + if help: +- print '\n'.join( ++ print('\n'.join( + textwrap.wrap(help.strip(), + initial_indent=' ', +- subsequent_indent=' ')) ++ subsequent_indent=' '))) + print + + def usage(cls): +--- nose/ext/dtcompat.py.orig 2012-09-29 08:18:54 UTC ++++ nose/ext/dtcompat.py +@@ -341,9 +341,9 @@ class _OutputRedirectingPdb(pdb.Pdb): + # [XX] Normalize with respect to os.path.pardir? + def _module_relative_path(module, path): + if not inspect.ismodule(module): +- raise TypeError, 'Expected a module: %r' % module ++ raise TypeError('Expected a module: %r' % module) + if path.startswith('/'): +- raise ValueError, 'Module-relative files may not have absolute paths' ++ raise ValueError('Module-relative files may not have absolute paths') + + # Find the base directory for the path. + if hasattr(module, '__file__'): +@@ -875,7 +875,7 @@ class DocTestFinder: + add them to `tests`. + """ + if self._verbose: +- print 'Finding tests in %s' % name ++ print('Finding tests in %s' % name) + + # If we've already processed this object, then ignore it. + if id(obj) in seen: +@@ -1179,8 +1179,8 @@ + # keyboard interrupts.) + try: + # Don't blink! This is where the user's code gets run. +- exec compile(example.source, filename, "single", +- compileflags, 1) in test.globs ++ exec(compile(example.source, filename, "single", ++ compileflags, 1), test.globs) + self.debugger.set_continue() # ==== Example Finished ==== + exception = None + except KeyboardInterrupt: +@@ -1354,28 +1354,28 @@ class DocTestRunner: + failed.append(x) + if verbose: + if notests: +- print len(notests), "items had no tests:" ++ print(len(notests), "items had no tests:") + notests.sort() + for thing in notests: +- print " ", thing ++ print(" ", thing) + if passed: +- print len(passed), "items passed all tests:" ++ print(len(passed), "items passed all tests:") + passed.sort() + for thing, count in passed: +- print " %3d tests in %s" % (count, thing) ++ print(" %3d tests in %s" % (count, thing)) + if failed: +- print self.DIVIDER +- print len(failed), "items had failures:" ++ print(self.DIVIDER) ++ print(len(failed), "items had failures:") + failed.sort() + for thing, (f, t) in failed: +- print " %3d of %3d in %s" % (f, t, thing) ++ print(" %3d of %3d in %s" % (f, t, thing)) + if verbose: +- print totalt, "tests in", len(self._name2ft), "items." +- print totalt - totalf, "passed and", totalf, "failed." ++ print(totalt, "tests in", len(self._name2ft), "items.") ++ print(totalt - totalf, "passed and", totalf, "failed.") + if totalf: +- print "***Test Failed***", totalf, "failures." ++ print("***Test Failed***", totalf, "failures.") + elif verbose: +- print "Test passed." ++ print("Test passed.") + return totalf, totalt + + #///////////////////////////////////////////////////////////////// +@@ -1385,8 +1385,8 @@ class DocTestRunner: + d = self._name2ft + for name, (f, t) in other._name2ft.items(): + if name in d: +- print "*** DocTestRunner.merge: '" + name + "' in both" \ +- " testers; summing outcomes." ++ print("*** DocTestRunner.merge: '" + name + "' in both" \ ++ " testers; summing outcomes.") + f2, t2 = d[name] + f = f + f2 + t = t + t2 +@@ -1875,10 +1875,10 @@ class Tester: + def runstring(self, s, name): + test = DocTestParser().get_doctest(s, self.globs, name, None, None) + if self.verbose: +- print "Running string", name ++ print("Running string", name) + (f,t) = self.testrunner.run(test) + if self.verbose: +- print f, "of", t, "examples failed in string", name ++ print(f, "of", t, "examples failed in string", name) + return (f,t) + + def rundoc(self, object, name=None, module=None): +@@ -2247,7 +2247,7 @@ def debug_script(src, pm=False, globs=None): + try: + execfile(srcfilename, globs, globs) + except: +- print sys.exc_info()[1] ++ print(sys.exc_info()[1]) + pdb.post_mortem(sys.exc_info()[2]) + else: + # Note that %r is vital here. '%s' instead can, e.g., cause +--- nose/failure.py.orig 2015-04-04 08:52:52 UTC ++++ nose/failure.py +@@ -36,7 +36,7 @@ class Failure(unittest.TestCase): + def runTest(self): + if self.tb is not None: + if is_base_exception(self.exc_val): +- raise self.exc_val, None, self.tb +- raise self.exc_class, self.exc_val, self.tb ++ raise self.exc_val.with_traceback(self.tb) ++ raise self.exc_class(self.exc_val).with_traceback(self.tb) + else: + raise self.exc_class(self.exc_val) +--- nose/inspector.py.orig 2012-09-29 08:18:54 UTC ++++ nose/inspector.py +@@ -38,7 +38,7 @@ def inspect_traceback(tb): + try: + for tok in tokenize.generate_tokens(src.readline): + exp(*tok) +- except tokenize.TokenError, e: ++ except tokenize.TokenError as e: + # this can happen if our inspectable region happens to butt up + # against the end of a construct like a docstring with the closing + # """ on separate line +--- nose/plugins/base.py.orig 2015-03-18 23:44:59 UTC ++++ nose/plugins/base.py +@@ -67,7 +67,7 @@ class Plugin(object): + try: + self.options(parser, env) + self.can_configure = True +- except OptionConflictError, e: ++ except OptionConflictError as e: + warn("Plugin %s has conflicting option string: %s and will " + "be disabled" % (self, e), RuntimeWarning) + self.enabled = False +--- nose/plugins/cover.py.orig 2015-04-04 09:28:20 UTC ++++ nose/plugins/cover.py +@@ -194,14 +194,14 @@ class Coverage(Plugin): + log.debug("Generating HTML coverage report") + try: + self.coverInstance.html_report(modules, self.coverHtmlDir) +- except coverage.misc.CoverageException, e: ++ except coverage.misc.CoverageException as e: + log.warning("Failed to generate HTML report: %s" % str(e)) + + if self.coverXmlFile: + log.debug("Generating XML coverage report") + try: + self.coverInstance.xml_report(modules, self.coverXmlFile) +- except coverage.misc.CoverageException, e: ++ except coverage.misc.CoverageException as e: + log.warning("Failed to generate XML report: %s" % str(e)) + + # make sure we have minimum required coverage +--- nose/plugins/doctests.py.orig 2015-04-04 08:52:52 UTC ++++ nose/plugins/doctests.py +@@ -275,7 +275,7 @@ class Doctest(Plugin): + try: + fixture_context = __import__( + fixt_mod, globals(), locals(), ["nop"]) +- except ImportError, e: ++ except ImportError as e: + log.debug( + "Could not import %s: %s (%s)", fixt_mod, e, sys.path) + log.debug("Fixture module %s resolved to %s", +@@ -413,7 +413,7 @@ class DocTestCase(doctest.DocTestCase): + if value is None: + return + setattr(builtin_mod, self._result_var, value) +- print repr(value) ++ print(repr(value)) + + def tearDown(self): + super(DocTestCase, self).tearDown() +@@ -446,7 +446,7 @@ class DocFileCase(doctest.DocFileCase): + if value is None: + return + setattr(builtin_mod, self._result_var, value) +- print repr(value) ++ print(repr(value)) + + def tearDown(self): + super(DocFileCase, self).tearDown() +--- nose/plugins/manager.py.orig 2014-08-13 09:44:58 UTC ++++ nose/plugins/manager.py +@@ -387,7 +387,7 @@ class EntryPointPluginManager(PluginManager): + plugcls = ep.load() + except KeyboardInterrupt: + raise +- except Exception, e: ++ except Exception as e: + # never want a plugin load to kill the test run + # but we can't log here because the logger is not yet + # configured +--- nose/plugins/multiprocess.py.orig 2014-03-29 10:20:27 UTC ++++ nose/plugins/multiprocess.py +@@ -478,7 +478,7 @@ class MultiProcessTestRunner(TextTestRunner): + self.config.multiprocess_timeout-timeprocessing) + log.debug("Completed %s tasks (%s remain)", len(completed), len(tasks)) + +- except (KeyboardInterrupt, SystemExit), e: ++ except (KeyboardInterrupt, SystemExit) as e: + log.info('parent received ctrl-c when waiting for test results') + thrownError = e + #resultQueue.get(False) +@@ -715,7 +715,7 @@ def __runner(ix, testQueue, resultQueue, currentaddr, + test(result) + currentaddr.value = bytes_('') + resultQueue.put((ix, test_addr, test.tasks, batch(result))) +- except KeyboardInterrupt, e: #TimedOutException: ++ except KeyboardInterrupt as e: #TimedOutException: + timeout = isinstance(e, TimedOutException) + if timeout: + keyboardCaught.set() +@@ -810,7 +810,7 @@ class NoSharedFixtureContextSuite(ContextSuite): + #log.debug('running test %s in suite %s', test, self); + try: + test(orig) +- except KeyboardInterrupt, e: ++ except KeyboardInterrupt as e: + timeout = isinstance(e, TimedOutException) + if timeout: + msg = 'Timeout when running test %s in suite %s' +--- nose/plugins/plugintest.py.orig 2015-04-04 08:52:52 UTC ++++ nose/plugins/plugintest.py +@@ -404,7 +404,7 @@ def run(*arg, **kw): + sys.stderr = stderr + sys.stdout = stdout + out = buffer.getvalue() +- print munge_nose_output_for_doctest(out) ++ print(munge_nose_output_for_doctest(out)) + + + def run_buffered(*arg, **kw): +--- nose/plugins/testid.py.orig 2015-04-04 08:52:52 UTC ++++ nose/plugins/testid.py +@@ -198,7 +198,7 @@ class TestId(Plugin): + self.ids, self.tests, self.failed, self.source_names, + self.idfile) + fh.close() +- except ValueError, e: ++ except ValueError as e: + # load() may throw a ValueError when reading the ids file, if it + # was generated with a newer version of Python than we are currently + # running. +--- nose/twistedtools.py.orig 2013-04-05 22:25:31 UTC ++++ nose/twistedtools.py +@@ -166,7 +166,7 @@ def deferred(timeout=None): + # Re-raise all exceptions + if error is not None: + exc_type, exc_value, tb = error +- raise exc_type, exc_value, tb ++ raise exc_type(exc_value).with_traceback(tb) + wrapper = make_decorator(func)(wrapper) + return wrapper + return decorate