86>Apr 5 08:35:13 userdel[54522]: delete user 'rooter' <86>Apr 5 08:35:13 userdel[54522]: removed group 'rooter' owned by 'rooter' <86>Apr 5 08:35:13 userdel[54522]: removed shadow group 'rooter' owned by 'rooter' <86>Apr 5 08:35:13 groupadd[54578]: group added to /etc/group: name=rooter, GID=567 <86>Apr 5 08:35:13 groupadd[54578]: group added to /etc/gshadow: name=rooter <86>Apr 5 08:35:13 groupadd[54578]: new group: name=rooter, GID=567 <86>Apr 5 08:35:13 useradd[54602]: new user: name=rooter, UID=567, GID=567, home=/root, shell=/bin/bash <86>Apr 5 08:35:13 userdel[54637]: delete user 'builder' <86>Apr 5 08:35:13 userdel[54637]: removed group 'builder' owned by 'builder' <86>Apr 5 08:35:13 userdel[54637]: removed shadow group 'builder' owned by 'builder' <86>Apr 5 08:35:13 groupadd[54671]: group added to /etc/group: name=builder, GID=568 <86>Apr 5 08:35:13 groupadd[54671]: group added to /etc/gshadow: name=builder <86>Apr 5 08:35:13 groupadd[54671]: new group: name=builder, GID=568 <86>Apr 5 08:35:13 useradd[54696]: new user: name=builder, UID=568, GID=568, home=/usr/src, shell=/bin/bash <13>Apr 5 08:35:16 rpmi: libgdbm-1.8.3-alt10 1454943334 installed <13>Apr 5 08:35:16 rpmi: libexpat-2.2.4-alt1 1503305345 installed <13>Apr 5 08:35:16 rpmi: libp11-kit-0.23.15-alt1 sisyphus+226408.100.2.1 1554288204 installed <13>Apr 5 08:35:16 rpmi: libtasn1-4.13-alt2 1521133850 installed <13>Apr 5 08:35:16 rpmi: rpm-macros-alternatives-0.5.0-alt1 sisyphus+221902.300.4.1 1550587121 installed <13>Apr 5 08:35:16 rpmi: alternatives-0.5.0-alt1 sisyphus+221902.300.4.1 1550587121 installed <13>Apr 5 08:35:16 rpmi: ca-certificates-2019.03.31-alt1 sisyphus+226302.100.1.1 1554055265 installed <13>Apr 5 08:35:16 rpmi: ca-trust-0.1.1-alt2 1515595785 installed <13>Apr 5 08:35:16 rpmi: p11-kit-trust-0.23.15-alt1 sisyphus+226408.100.2.1 1554288204 installed <13>Apr 5 08:35:16 rpmi: libcrypto1.1-1.1.1b-alt1 sisyphus+225327.200.2.1 1553099317 installed <13>Apr 5 08:35:16 rpmi: libssl1.1-1.1.1b-alt1 sisyphus+225327.200.2.1 1553099317 installed <13>Apr 5 08:35:16 rpmi: python3-3.6.8-alt1 sisyphus+220164.200.3.1 1548842636 installed <13>Apr 5 08:35:17 rpmi: python3-base-3.6.8-alt1 sisyphus+220164.200.3.1 1548842636 installed <13>Apr 5 08:35:17 rpmi: libpython3-3.6.8-alt1 sisyphus+220164.200.3.1 1548842636 installed <13>Apr 5 08:35:17 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>Apr 5 08:35:17 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>Apr 5 08:35:21 rpmi: python3-module-pkg_resources-1:40.8.0-alt1 sisyphus+221229.100.2.1 1550559950 installed <13>Apr 5 08:35:21 rpmi: python-modules-curses-2.7.16-alt1 sisyphus+226365.200.2.1 1554143304 installed <13>Apr 5 08:35:21 rpmi: libtinfo-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686226 installed <13>Apr 5 08:35:21 rpmi: libncurses-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686226 installed <13>Apr 5 08:35:21 rpmi: python3-dev-3.6.8-alt1 sisyphus+220164.200.3.1 1548842636 installed <13>Apr 5 08:35:21 rpmi: libverto-0.3.0-alt1_7 sisyphus+225932.100.1.1 1553994919 installed <13>Apr 5 08:35:21 rpmi: libkeyutils-1.6-alt2 sisyphus.217337.100 1544003161 installed <13>Apr 5 08:35:21 rpmi: libcom_err-1.44.6-alt1 sisyphus+224154.100.1.1 1552091678 installed <86>Apr 5 08:35:21 groupadd[88776]: group added to /etc/group: name=_keytab, GID=499 <86>Apr 5 08:35:21 groupadd[88776]: group added to /etc/gshadow: name=_keytab <86>Apr 5 08:35:21 groupadd[88776]: new group: name=_keytab, GID=499 <13>Apr 5 08:35:21 rpmi: libkrb5-1.16.3-alt1 sisyphus+223678.100.1.1 1551746516 installed <13>Apr 5 08:35:21 rpmi: libtirpc-1.0.3-alt1 1532008017 installed <13>Apr 5 08:35:21 rpmi: libnsl2-1.1.0-alt1_1 1511548749 installed <13>Apr 5 08:35:21 rpmi: python-modules-compiler-2.7.16-alt1 sisyphus+226365.200.2.1 1554143304 installed <13>Apr 5 08:35:21 rpmi: python-modules-email-2.7.16-alt1 sisyphus+226365.200.2.1 1554143304 installed <13>Apr 5 08:35:21 rpmi: python-modules-unittest-2.7.16-alt1 sisyphus+226365.200.2.1 1554143304 installed <13>Apr 5 08:35:21 rpmi: python-modules-encodings-2.7.16-alt1 sisyphus+226365.200.2.1 1554143304 installed <13>Apr 5 08:35:21 rpmi: python-modules-2.7.16-alt1 sisyphus+226365.200.2.1 1554143304 installed <13>Apr 5 08:35:21 rpmi: python-modules-nis-2.7.16-alt1 sisyphus+226365.200.2.1 1554143304 installed <13>Apr 5 08:35:21 rpmi: python-modules-ctypes-2.7.16-alt1 sisyphus+226365.200.2.1 1554143304 installed <13>Apr 5 08:35:21 rpmi: python-modules-multiprocessing-2.7.16-alt1 sisyphus+226365.200.2.1 1554143304 installed <13>Apr 5 08:35:21 rpmi: python-modules-logging-2.7.16-alt1 sisyphus+226365.200.2.1 1554143304 installed <13>Apr 5 08:35:21 rpmi: python-tools-2to3-2.7.16-alt1 sisyphus+226365.200.2.1 1554143304 installed <13>Apr 5 08:35:22 rpmi: python-modules-xml-2.7.16-alt1 sisyphus+226365.200.2.1 1554143304 installed <13>Apr 5 08:35:22 rpmi: python-modules-hotshot-2.7.16-alt1 sisyphus+226365.200.2.1 1554143304 installed <13>Apr 5 08:35:22 rpmi: python-modules-bsddb-2.7.16-alt1 sisyphus+226365.200.2.1 1554143304 installed <13>Apr 5 08:35:22 rpmi: python-2.7.16-alt1 sisyphus+226365.200.2.1 1554143304 installed <13>Apr 5 08:35:22 rpmi: python-modules-distutils-2.7.16-alt1 sisyphus+226365.200.2.1 1554143304 installed <13>Apr 5 08:35:22 rpmi: python-module-pkg_resources-1:40.8.0-alt1 sisyphus+221229.100.2.1 1550559950 installed <13>Apr 5 08:35:22 rpmi: libnsl2-devel-1.1.0-alt1_1 1511548749 installed <13>Apr 5 08:35:22 rpmi: python-dev-2.7.16-alt1 sisyphus+226365.200.2.1 1554143304 installed <13>Apr 5 08:35:22 rpmi: python-module-setuptools-1:40.8.0-alt1 sisyphus+221229.100.2.1 1550559950 installed <13>Apr 5 08:35:22 rpmi: python3-module-setuptools-1:40.8.0-alt1 sisyphus+221229.100.2.1 1550559950 installed Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/python-module-genshi-0.7-alt1.1.1.1.nosrc.rpm Installing python-module-genshi-0.7-alt1.1.1.1.src.rpm Building target platforms: i586 Building for target i586 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.40663 + 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.87336 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd genshi-0.7 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export FFLAGS + /usr/bin/python2.7 setup.py build setup.py:72: DistDeprecationWarning: Features are deprecated and will be removed in a future version. See https://github.com/pypa/setuptools/issues/65. Extension('genshi._speedups', ['genshi/_speedups.c']), /usr/lib/python2.7/distutils/core.py:111: DistDeprecationWarning: Features are deprecated and will be removed in a future version. See https://github.com/pypa/setuptools/issues/65. _setup_distribution = dist = klass(attrs) running build running build_py creating build creating build/lib.linux-i686-2.7 creating build/lib.linux-i686-2.7/genshi copying genshi/util.py -> build/lib.linux-i686-2.7/genshi copying genshi/path.py -> build/lib.linux-i686-2.7/genshi copying genshi/output.py -> build/lib.linux-i686-2.7/genshi copying genshi/input.py -> build/lib.linux-i686-2.7/genshi copying genshi/core.py -> build/lib.linux-i686-2.7/genshi copying genshi/compat.py -> build/lib.linux-i686-2.7/genshi copying genshi/builder.py -> build/lib.linux-i686-2.7/genshi copying genshi/__init__.py -> build/lib.linux-i686-2.7/genshi creating build/lib.linux-i686-2.7/genshi/filters copying genshi/filters/transform.py -> build/lib.linux-i686-2.7/genshi/filters copying genshi/filters/i18n.py -> build/lib.linux-i686-2.7/genshi/filters copying genshi/filters/html.py -> build/lib.linux-i686-2.7/genshi/filters copying genshi/filters/__init__.py -> build/lib.linux-i686-2.7/genshi/filters creating build/lib.linux-i686-2.7/genshi/template copying genshi/template/text.py -> build/lib.linux-i686-2.7/genshi/template copying genshi/template/plugin.py -> build/lib.linux-i686-2.7/genshi/template copying genshi/template/markup.py -> build/lib.linux-i686-2.7/genshi/template copying genshi/template/loader.py -> build/lib.linux-i686-2.7/genshi/template copying genshi/template/interpolation.py -> build/lib.linux-i686-2.7/genshi/template copying genshi/template/eval.py -> build/lib.linux-i686-2.7/genshi/template copying genshi/template/directives.py -> build/lib.linux-i686-2.7/genshi/template copying genshi/template/base.py -> build/lib.linux-i686-2.7/genshi/template copying genshi/template/astutil.py -> build/lib.linux-i686-2.7/genshi/template copying genshi/template/ast24.py -> build/lib.linux-i686-2.7/genshi/template copying genshi/template/_ast24.py -> build/lib.linux-i686-2.7/genshi/template copying genshi/template/__init__.py -> build/lib.linux-i686-2.7/genshi/template creating build/lib.linux-i686-2.7/genshi/tests copying genshi/tests/util.py -> build/lib.linux-i686-2.7/genshi/tests copying genshi/tests/path.py -> build/lib.linux-i686-2.7/genshi/tests copying genshi/tests/output.py -> build/lib.linux-i686-2.7/genshi/tests copying genshi/tests/input.py -> build/lib.linux-i686-2.7/genshi/tests copying genshi/tests/core.py -> build/lib.linux-i686-2.7/genshi/tests copying genshi/tests/builder.py -> build/lib.linux-i686-2.7/genshi/tests copying genshi/tests/__init__.py -> build/lib.linux-i686-2.7/genshi/tests creating build/lib.linux-i686-2.7/genshi/filters/tests copying genshi/filters/tests/transform.py -> build/lib.linux-i686-2.7/genshi/filters/tests copying genshi/filters/tests/test_html.py -> build/lib.linux-i686-2.7/genshi/filters/tests copying genshi/filters/tests/i18n.py -> build/lib.linux-i686-2.7/genshi/filters/tests copying genshi/filters/tests/__init__.py -> build/lib.linux-i686-2.7/genshi/filters/tests creating build/lib.linux-i686-2.7/genshi/template/tests copying genshi/template/tests/text.py -> build/lib.linux-i686-2.7/genshi/template/tests copying genshi/template/tests/plugin.py -> build/lib.linux-i686-2.7/genshi/template/tests copying genshi/template/tests/markup.py -> build/lib.linux-i686-2.7/genshi/template/tests copying genshi/template/tests/loader.py -> build/lib.linux-i686-2.7/genshi/template/tests copying genshi/template/tests/interpolation.py -> build/lib.linux-i686-2.7/genshi/template/tests copying genshi/template/tests/eval.py -> build/lib.linux-i686-2.7/genshi/template/tests copying genshi/template/tests/directives.py -> build/lib.linux-i686-2.7/genshi/template/tests copying genshi/template/tests/base.py -> build/lib.linux-i686-2.7/genshi/template/tests copying genshi/template/tests/__init__.py -> build/lib.linux-i686-2.7/genshi/template/tests creating build/lib.linux-i686-2.7/genshi/template/tests/templates copying genshi/template/tests/templates/__init__.py -> build/lib.linux-i686-2.7/genshi/template/tests/templates running build_ext building 'genshi._speedups' extension creating build/temp.linux-i686-2.7 creating build/temp.linux-i686-2.7/genshi i586-alt-linux-gcc -pthread -DNDEBUG -pipe -frecord-gcc-switches -Wall -g -O3 -march=i586 -mtune=generic -fwrapv -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -I/usr/include/python2.7 -c genshi/_speedups.c -o build/temp.linux-i686-2.7/genshi/_speedups.o In file included from /usr/include/python2.7/Python.h:83, from genshi/_speedups.c:14: genshi/_speedups.c: In function 'init_speedups': /usr/include/python2.7/object.h:769:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ((PyObject*)(op))->ob_refcnt++) ~^~~~~~~~~~~~~~~~ genshi/_speedups.c:696:5: note: in expansion of macro 'Py_INCREF' Py_INCREF(&MarkupType); ^~~~~~~~~ i586-alt-linux-gcc -pthread -shared -L/usr/lib/nsl -lnsl -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic build/temp.linux-i686-2.7/genshi/_speedups.o -lpython2.7 -o build/lib.linux-i686-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'