86>Apr 21 02:09:52 userdel[114216]: delete user 'rooter' <86>Apr 21 02:09:52 groupadd[114239]: group added to /etc/group: name=rooter, GID=567 <86>Apr 21 02:09:52 groupadd[114239]: group added to /etc/gshadow: name=rooter <86>Apr 21 02:09:52 groupadd[114239]: new group: name=rooter, GID=567 <86>Apr 21 02:09:52 useradd[114258]: new user: name=rooter, UID=567, GID=567, home=/root, shell=/bin/bash <86>Apr 21 02:09:52 userdel[114306]: delete user 'builder' <86>Apr 21 02:09:52 userdel[114306]: removed group 'builder' owned by 'builder' <86>Apr 21 02:09:52 groupadd[114326]: group added to /etc/group: name=builder, GID=568 <86>Apr 21 02:09:52 groupadd[114326]: group added to /etc/gshadow: name=builder <86>Apr 21 02:09:52 groupadd[114326]: new group: name=builder, GID=568 <86>Apr 21 02:09:52 useradd[114339]: new user: name=builder, UID=568, GID=568, home=/usr/src, shell=/bin/bash <13>Apr 21 02:09:54 rpmi: libexpat-2.2.4-alt0.M80P.1 1503871120 installed <13>Apr 21 02:09:54 rpmi: libgdbm-1.8.3-alt10 1454943313 installed <13>Apr 21 02:09:54 rpmi: libtinfo-devel-5.9-alt8 1456756459 installed <13>Apr 21 02:09:54 rpmi: libncurses-devel-5.9-alt8 1456756459 installed <13>Apr 21 02:09:54 rpmi: python-modules-curses-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 02:09:54 rpmi: libverto-0.2.6-alt1_6 1455633234 installed <13>Apr 21 02:09:54 rpmi: libkeyutils-1.5.10-alt0.M80P.2 p8+216694.100.6.1 1547827915 installed <13>Apr 21 02:09:54 rpmi: libcom_err-1.42.13-alt2 1449075846 installed <13>Apr 21 02:09:54 rpmi: ca-certificates-2016.02.25-alt1 1462368370 installed <13>Apr 21 02:09:54 rpmi: libcrypto10-1.0.2n-alt0.M80P.1 1512766129 installed <13>Apr 21 02:09:54 rpmi: libssl10-1.0.2n-alt0.M80P.1 1512766129 installed <86>Apr 21 02:09:54 groupadd[120555]: group added to /etc/group: name=_keytab, GID=499 <86>Apr 21 02:09:54 groupadd[120555]: group added to /etc/gshadow: name=_keytab <86>Apr 21 02:09:54 groupadd[120555]: new group: name=_keytab, GID=499 <13>Apr 21 02:09:54 rpmi: libkrb5-1.14.6-alt1.M80P.1 1525355673 installed <13>Apr 21 02:09:55 rpmi: python3-base-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 21 02:09:55 rpmi: python3-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 21 02:09:55 rpmi: python-modules-compiler-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 02:09:55 rpmi: rpm-build-python3-0.1.10.10-alt1.M80P.1 1530521451 installed <13>Apr 21 02:09:55 rpmi: libpython3-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 21 02:09:55 rpmi: python3-module-py-1.4.34-alt0.M80P.1 1503506764 installed <13>Apr 21 02:09:55 rpmi: python3-dev-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 21 02:09:56 rpmi: python-modules-email-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 02:09:56 rpmi: python3-module-pytest-3.2.1-alt0.M80P.1 1503499784 installed <13>Apr 21 02:09:56 rpmi: python3-module-setuptools-1:18.5-alt0.M80P.1 1497527461 installed <13>Apr 21 02:09:56 rpmi: python-modules-unittest-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 02:09:56 rpmi: python-modules-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 02:09:56 rpmi: python-modules-ctypes-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 02:09:56 rpmi: python-modules-encodings-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 02:09:56 rpmi: python-modules-multiprocessing-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 02:09:56 rpmi: python-modules-logging-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 02:09:56 rpmi: python-tools-2to3-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 02:09:56 rpmi: python-modules-xml-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 02:09:56 rpmi: python-modules-hotshot-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 02:09:56 rpmi: python-modules-bsddb-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 02:09:56 rpmi: python-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 02:09:56 rpmi: python-dev-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 02:09:56 rpmi: python-module-py-1.4.34-alt0.M80P.1 1503506764 installed <13>Apr 21 02:09:56 rpmi: python-modules-json-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 02:09:56 rpmi: python-module-pytest-3.2.1-alt0.M80P.1 1503499784 installed <13>Apr 21 02:09:56 rpmi: python-module-setuptools-1:18.5-alt0.M80P.1 1497527461 installed Installing python-module-genshi-0.7-alt1.1.1.1.src.rpm Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.61354 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf genshi-0.7 + echo 'Source #0 (genshi-0.7.tar):' Source #0 (genshi-0.7.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/genshi-0.7.tar + cd genshi-0.7 + /bin/chmod -c -Rf u+rwX,go-w . + rm -rf ../python3 + cp -a . ../python3 + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.61354 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd genshi-0.7 + CFLAGS='-pipe -Wall -g -O2' + export CFLAGS + CXXFLAGS='-pipe -Wall -g -O2' + export CXXFLAGS + FFLAGS='-pipe -Wall -g -O2' + export FFLAGS + /usr/bin/python2.7 setup.py build running build running build_py creating build creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7/genshi copying genshi/util.py -> build/lib.linux-x86_64-2.7/genshi copying genshi/path.py -> build/lib.linux-x86_64-2.7/genshi copying genshi/output.py -> build/lib.linux-x86_64-2.7/genshi copying genshi/input.py -> build/lib.linux-x86_64-2.7/genshi copying genshi/core.py -> build/lib.linux-x86_64-2.7/genshi copying genshi/compat.py -> build/lib.linux-x86_64-2.7/genshi copying genshi/builder.py -> build/lib.linux-x86_64-2.7/genshi copying genshi/__init__.py -> build/lib.linux-x86_64-2.7/genshi creating build/lib.linux-x86_64-2.7/genshi/filters copying genshi/filters/transform.py -> build/lib.linux-x86_64-2.7/genshi/filters copying genshi/filters/i18n.py -> build/lib.linux-x86_64-2.7/genshi/filters copying genshi/filters/html.py -> build/lib.linux-x86_64-2.7/genshi/filters copying genshi/filters/__init__.py -> build/lib.linux-x86_64-2.7/genshi/filters creating build/lib.linux-x86_64-2.7/genshi/template copying genshi/template/text.py -> build/lib.linux-x86_64-2.7/genshi/template copying genshi/template/plugin.py -> build/lib.linux-x86_64-2.7/genshi/template copying genshi/template/markup.py -> build/lib.linux-x86_64-2.7/genshi/template copying genshi/template/loader.py -> build/lib.linux-x86_64-2.7/genshi/template copying genshi/template/interpolation.py -> build/lib.linux-x86_64-2.7/genshi/template copying genshi/template/eval.py -> build/lib.linux-x86_64-2.7/genshi/template copying genshi/template/directives.py -> build/lib.linux-x86_64-2.7/genshi/template copying genshi/template/base.py -> build/lib.linux-x86_64-2.7/genshi/template copying genshi/template/astutil.py -> build/lib.linux-x86_64-2.7/genshi/template copying genshi/template/ast24.py -> build/lib.linux-x86_64-2.7/genshi/template copying genshi/template/_ast24.py -> build/lib.linux-x86_64-2.7/genshi/template copying genshi/template/__init__.py -> build/lib.linux-x86_64-2.7/genshi/template creating build/lib.linux-x86_64-2.7/genshi/tests copying genshi/tests/util.py -> build/lib.linux-x86_64-2.7/genshi/tests copying genshi/tests/path.py -> build/lib.linux-x86_64-2.7/genshi/tests copying genshi/tests/output.py -> build/lib.linux-x86_64-2.7/genshi/tests copying genshi/tests/input.py -> build/lib.linux-x86_64-2.7/genshi/tests copying genshi/tests/core.py -> build/lib.linux-x86_64-2.7/genshi/tests copying genshi/tests/builder.py -> build/lib.linux-x86_64-2.7/genshi/tests copying genshi/tests/__init__.py -> build/lib.linux-x86_64-2.7/genshi/tests creating build/lib.linux-x86_64-2.7/genshi/filters/tests copying genshi/filters/tests/transform.py -> build/lib.linux-x86_64-2.7/genshi/filters/tests copying genshi/filters/tests/test_html.py -> build/lib.linux-x86_64-2.7/genshi/filters/tests copying genshi/filters/tests/i18n.py -> build/lib.linux-x86_64-2.7/genshi/filters/tests copying genshi/filters/tests/__init__.py -> build/lib.linux-x86_64-2.7/genshi/filters/tests creating build/lib.linux-x86_64-2.7/genshi/template/tests copying genshi/template/tests/text.py -> build/lib.linux-x86_64-2.7/genshi/template/tests copying genshi/template/tests/plugin.py -> build/lib.linux-x86_64-2.7/genshi/template/tests copying genshi/template/tests/markup.py -> build/lib.linux-x86_64-2.7/genshi/template/tests copying genshi/template/tests/loader.py -> build/lib.linux-x86_64-2.7/genshi/template/tests copying genshi/template/tests/interpolation.py -> build/lib.linux-x86_64-2.7/genshi/template/tests copying genshi/template/tests/eval.py -> build/lib.linux-x86_64-2.7/genshi/template/tests copying genshi/template/tests/directives.py -> build/lib.linux-x86_64-2.7/genshi/template/tests copying genshi/template/tests/base.py -> build/lib.linux-x86_64-2.7/genshi/template/tests copying genshi/template/tests/__init__.py -> build/lib.linux-x86_64-2.7/genshi/template/tests creating build/lib.linux-x86_64-2.7/genshi/template/tests/templates copying genshi/template/tests/templates/__init__.py -> build/lib.linux-x86_64-2.7/genshi/template/tests/templates running build_ext building 'genshi._speedups' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/genshi x86_64-alt-linux-gcc -pthread -DNDEBUG -pipe -Wall -g -O3 -pipe -Wall -g -O2 -fPIC -I/usr/include/python2.7 -c genshi/_speedups.c -o build/temp.linux-x86_64-2.7/genshi/_speedups.o genshi/_speedups.c: In function 'init_speedups': genshi/_speedups.c:696:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] Py_INCREF(&MarkupType); ^ x86_64-alt-linux-gcc -pthread -shared -pipe -Wall -g -O2 build/temp.linux-x86_64-2.7/genshi/_speedups.o -lpython2.7 -o build/lib.linux-x86_64-2.7/genshi/_speedups.so + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/genshi-0.7 + find -type f -name '*.py' -exec 2to3 -w '{}' + RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ./setup.py RefactoringTool: Refactored ./scripts/ast_generator.py RefactoringTool: Refactored ./genshi/util.py RefactoringTool: No changes to ./genshi/tests/util.py RefactoringTool: Refactored ./genshi/tests/path.py --- ./setup.py (original) +++ ./setup.py (refactored) @@ -56,11 +56,11 @@ self._unavailable(e) def _unavailable(self, exc): - print('*' * 70) + print(('*' * 70)) print("""WARNING: An optional C extension could not be compiled, speedups will not be available.""") - print('*' * 70) + print(('*' * 70)) print(exc) --- ./scripts/ast_generator.py (original) +++ ./scripts/ast_generator.py (refactored) @@ -23,12 +23,12 @@ bnames.append("%s" % base.__name__) else: bnames.append("%s.%s" % (base.__module__,base.__name__)) - print("class %s(%s):" % (cls.__name__, ", ".join(bnames))) + print(("class %s(%s):" % (cls.__name__, ", ".join(bnames)))) written = False for attr in cls.__dict__: if attr not in IGNORE_ATTRS: written = True - print("\t%s = %s" % (attr, repr(cls.__dict__[attr]),)) + print(("\t%s = %s" % (attr, repr(cls.__dict__[attr]),))) if not written: print("\tpass") done.add(cls) @@ -36,11 +36,11 @@ print('# Generated automatically, please do not edit') print('# Generator can be found in Genshi SVN, scripts/ast_generator.py') print('') -print('__version__ = %s' % _ast.__version__) +print(('__version__ = %s' % _ast.__version__)) print('') for name in dir(_ast): cls = getattr(_ast, name) if cls.__class__ is type: print_class(cls) - print + print() --- ./genshi/util.py (original) +++ ./genshi/util.py (refactored) @@ -13,10 +13,10 @@ """Various utility classes and functions.""" -import htmlentitydefs as entities +import html.entities as entities import re -from compat import any, all, stringrepr +from .compat import any, all, stringrepr __docformat__ = 'restructuredtext en' @@ -193,17 +193,17 @@ >>> stripentities('1 < 2') u'1 < 2' >>> stripentities('more …') - u'more \u2026' + u'more \\u2026' >>> stripentities('…') - u'\u2026' + u'\\u2026' >>> stripentities('…') - u'\u2026' + u'\\u2026' If the `keepxmlentities` parameter is provided and is a truth value, the core XML entities (&, ', >, < and ") are left intact. >>> stripentities('1 < 2 …', keepxmlentities=True) - u'1 < 2 \u2026' + u'1 < 2 \\u2026' """ def _replace_entity(match): if match.group(1): # numeric entity @@ -212,13 +212,13 @@ ref = int(ref[1:], 16) else: ref = int(ref, 10) - return unichr(ref) + return chr(ref) else: # character entity ref = match.group(2) if keepxmlentities and ref in ('amp', 'apos', 'gt', 'lt', 'quot'): return '&%s;' % ref try: - return unichr(entities.name2codepoint[ref]) + return chr(entities.name2codepoint[ref]) except KeyError: if keepxmlentities: return '&%s;' % ref --- ./genshi/tests/path.py (original) +++ ./genshi/tests/path.py (refactored) @@ -635,21 +635,21 @@ return strategy_class.supports(path) def test_simple_strategy_support(self): - self.assert_(self._test_support(SimplePathStrategy, 'a/b')) - self.assert_(self._test_support(SimplePathStrategy, 'self::a/b')) - self.assert_(self._test_support(SimplePathStrategy, 'descendant::a/b')) - self.assert_(self._test_support(SimplePathStrategy, + self.assertTrue(self._test_support(SimplePathStrategy, 'a/b')) + self.assertTrue(self._test_support(SimplePathStrategy, 'self::a/b')) + self.assertTrue(self._test_support(SimplePathStrategy, 'descendant::a/b')) + self.assertTrue(self._test_support(SimplePathStrategy, 'descendant-or-self::a/b')) - self.assert_(self._test_support(SimplePathStrategy, '//a/b')) - self.assert_(self._test_support(SimplePathStrategy, 'a/@b')) - self.assert_(selfRefactoringTool: Refactored ./genshi/tests/output.py RefactoringTool: Refactored ./genshi/tests/input.py ._test_support(SimplePathStrategy, 'a/text()')) + self.assertTrue(self._test_support(SimplePathStrategy, '//a/b')) + self.assertTrue(self._test_support(SimplePathStrategy, 'a/@b')) + self.assertTrue(self._test_support(SimplePathStrategy, 'a/text()')) # a//b is a/descendant-or-self::node()/b - self.assert_(not self._test_support(SimplePathStrategy, 'a//b')) - self.assert_(not self._test_support(SimplePathStrategy, 'node()/@a')) - self.assert_(not self._test_support(SimplePathStrategy, '@a')) - self.assert_(not self._test_support(SimplePathStrategy, 'foo:bar')) - self.assert_(not self._test_support(SimplePathStrategy, 'a/@foo:bar')) + self.assertTrue(not self._test_support(SimplePathStrategy, 'a//b')) + self.assertTrue(not self._test_support(SimplePathStrategy, 'node()/@a')) + self.assertTrue(not self._test_support(SimplePathStrategy, '@a')) + self.assertTrue(not self._test_support(SimplePathStrategy, 'foo:bar')) + self.assertTrue(not self._test_support(SimplePathStrategy, 'a/@foo:bar')) def _test_strategies(self, input, path, output, namespaces=None, variables=None): --- ./genshi/tests/output.py (original) +++ ./genshi/tests/output.py (refactored) @@ -356,7 +356,7 @@ """, output) def test_html5_doctype(self): - stream = HTML(u'') + stream = HTML('') output = stream.render(XHTMLSerializer, doctype=DocType.HTML5, encoding=None) self.assertEqual('\n', output) @@ -369,7 +369,7 @@ def test_cache_markup(self): loc = (None, -1, -1) stream = Stream([(Stream.START, (QName('foo'), Attrs()), loc), - (Stream.TEXT, u'…', loc), + (Stream.TEXT, '…', loc), (Stream.END, QName('foo'), loc), (Stream.START, (QName('bar'), Attrs()), loc), (Stream.TEXT, Markup('…'), loc), @@ -444,7 +444,7 @@ """, output) def test_html5_doctype(self): - stream = HTML(u'') + stream = HTML('') output = stream.render(HTMLSerializer, doctype=DocType.HTML5, encoding=None) self.assertEqual('\n', output) --- ./genshi/tests/input.py (original) +++ ./genshi/tests/input.py (refactored) @@ -51,27 +51,27 @@ self.assertEqual(('class', 'bar'), attrib[2]) def test_unicode_input(self): - text = u'