86>Nov 14 13:37:58 userdel[23754]: delete user 'rooter' <86>Nov 14 13:37:58 userdel[23754]: removed group 'rooter' owned by 'rooter' <86>Nov 14 13:37:58 userdel[23754]: removed shadow group 'rooter' owned by 'rooter' <86>Nov 14 13:37:58 groupadd[23761]: group added to /etc/group: name=rooter, GID=555 <86>Nov 14 13:37:58 groupadd[23761]: group added to /etc/gshadow: name=rooter <86>Nov 14 13:37:58 groupadd[23761]: new group: name=rooter, GID=555 <86>Nov 14 13:37:58 useradd[23767]: new user: name=rooter, UID=555, GID=555, home=/root, shell=/bin/bash <86>Nov 14 13:37:58 userdel[23778]: delete user 'builder' <86>Nov 14 13:37:58 userdel[23778]: removed group 'builder' owned by 'builder' <86>Nov 14 13:37:58 userdel[23778]: removed shadow group 'builder' owned by 'builder' <86>Nov 14 13:37:58 groupadd[23785]: group added to /etc/group: name=builder, GID=556 <86>Nov 14 13:37:58 groupadd[23785]: group added to /etc/gshadow: name=builder <86>Nov 14 13:37:58 groupadd[23785]: new group: name=builder, GID=556 <86>Nov 14 13:37:58 useradd[23790]: new user: name=builder, UID=556, GID=556, home=/usr/src, shell=/bin/bash <13>Nov 14 13:38:02 rpmi: libgdbm-1.8.3-alt10 1454943334 installed <13>Nov 14 13:38:02 rpmi: libexpat-2.2.4-alt1 1503305345 installed <13>Nov 14 13:38:02 rpmi: libp11-kit-0.23.15-alt1 sisyphus+226408.100.2.1 1554288204 installed <13>Nov 14 13:38:02 rpmi: libtasn1-4.14-alt1 sisyphus+235791.100.1.1 1565282372 installed <13>Nov 14 13:38:02 rpmi: rpm-macros-alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Nov 14 13:38:02 rpmi: alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Nov 14 13:38:02 rpmi: ca-certificates-2019.10.28-alt1 sisyphus+239875.300.1.1 1572267834 installed <13>Nov 14 13:38:02 rpmi: ca-trust-0.1.2-alt1 sisyphus+233348.100.1.1 1561653823 installed <13>Nov 14 13:38:02 rpmi: p11-kit-trust-0.23.15-alt1 sisyphus+226408.100.2.1 1554288204 installed <13>Nov 14 13:38:02 rpmi: libcrypto1.1-1.1.1d-alt1.1 sisyphus+237931.100.2.1 1569235729 installed <13>Nov 14 13:38:02 rpmi: libssl1.1-1.1.1d-alt1.1 sisyphus+237931.100.2.1 1569235729 installed <13>Nov 14 13:38:02 rpmi: python3-3.7.4-alt2 sisyphus+239418.100.1.1 1571389913 installed <13>Nov 14 13:38:02 rpmi: libpython3-3.7.4-alt2 sisyphus+239418.100.1.1 1571389913 installed <13>Nov 14 13:38:04 rpmi: python3-base-3.7.4-alt2 sisyphus+239418.100.1.1 1571389913 installed <13>Nov 14 13:38:04 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>Nov 14 13:38:04 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>Nov 14 13:38:11 rpmi: python3-module-pkg_resources-1:41.4.0-alt1 sisyphus+238787.100.2.1 1570608044 installed <13>Nov 14 13:38:11 rpmi: python-modules-curses-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Nov 14 13:38:11 rpmi: libtinfo-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686226 installed <13>Nov 14 13:38:11 rpmi: libncurses-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686226 installed <13>Nov 14 13:38:11 rpmi: python3-dev-3.7.4-alt2 sisyphus+239418.100.1.1 1571389913 installed <13>Nov 14 13:38:11 rpmi: libverto-0.3.0-alt1_7 sisyphus+225932.100.1.1 1553994919 installed <13>Nov 14 13:38:11 rpmi: libkeyutils-1.6-alt2 sisyphus+226520.100.2.1 1554512089 installed <13>Nov 14 13:38:11 rpmi: libcom_err-1.44.6-alt1 sisyphus+224154.100.1.1 1552091678 installed <86>Nov 14 13:38:11 groupadd[381]: group added to /etc/group: name=_keytab, GID=499 <86>Nov 14 13:38:11 groupadd[381]: group added to /etc/gshadow: name=_keytab <86>Nov 14 13:38:11 groupadd[381]: new group: name=_keytab, GID=499 <13>Nov 14 13:38:11 rpmi: libkrb5-1.16.3-alt1 sisyphus+223678.100.1.1 1551746516 installed <13>Nov 14 13:38:11 rpmi: libtirpc-1.0.3-alt1 1532008017 installed <13>Nov 14 13:38:11 rpmi: libnsl2-1.1.0-alt1_1 1511548749 installed <13>Nov 14 13:38:11 rpmi: python-modules-compiler-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Nov 14 13:38:11 rpmi: python-modules-email-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Nov 14 13:38:11 rpmi: python-modules-unittest-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Nov 14 13:38:11 rpmi: python-modules-encodings-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Nov 14 13:38:11 rpmi: python-modules-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Nov 14 13:38:11 rpmi: python-modules-nis-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Nov 14 13:38:11 rpmi: python-modules-ctypes-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Nov 14 13:38:11 rpmi: python-modules-multiprocessing-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Nov 14 13:38:11 rpmi: python-modules-logging-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Nov 14 13:38:11 rpmi: python-tools-2to3-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Nov 14 13:38:11 rpmi: python-modules-xml-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Nov 14 13:38:11 rpmi: python-modules-hotshot-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Nov 14 13:38:11 rpmi: python-modules-bsddb-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Nov 14 13:38:11 rpmi: python-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Nov 14 13:38:11 rpmi: python-modules-distutils-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Nov 14 13:38:12 rpmi: python-module-pkg_resources-1:41.4.0-alt1 sisyphus+238787.100.2.1 1570608044 installed <13>Nov 14 13:38:12 rpmi: libnsl2-devel-1.1.0-alt1_1 1511548749 installed <13>Nov 14 13:38:12 rpmi: python-dev-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Nov 14 13:38:12 rpmi: python-module-setuptools-1:41.4.0-alt1 sisyphus+238787.100.2.1 1570608044 installed <13>Nov 14 13:38:12 rpmi: python3-module-setuptools-1:41.4.0-alt1 sisyphus+238787.100.2.1 1570608044 installed Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/python-module-genshi-0.7-alt2.nosrc.rpm Installing python-module-genshi-0.7-alt2.src.rpm Building target platforms: i586 Building for target i586 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.46139 + 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.46139 + 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 -fno-strict-aliasing -pipe -frecord-gcc-switches -Wall -g -O3 -march=i586 -mtune=generic -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 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'