86>Apr 21 01:08:16 userdel[20133]: delete user 'rooter' <86>Apr 21 01:08:16 userdel[20133]: removed group 'rooter' owned by 'rooter' <86>Apr 21 01:08:16 userdel[20133]: removed shadow group 'rooter' owned by 'rooter' <86>Apr 21 01:08:16 groupadd[20179]: group added to /etc/group: name=rooter, GID=663 <86>Apr 21 01:08:16 groupadd[20179]: group added to /etc/gshadow: name=rooter <86>Apr 21 01:08:16 groupadd[20179]: new group: name=rooter, GID=663 <86>Apr 21 01:08:16 useradd[20216]: new user: name=rooter, UID=663, GID=663, home=/root, shell=/bin/bash <86>Apr 21 01:08:16 userdel[20265]: delete user 'builder' <86>Apr 21 01:08:16 userdel[20265]: removed group 'builder' owned by 'builder' <86>Apr 21 01:08:16 userdel[20265]: removed shadow group 'builder' owned by 'builder' <86>Apr 21 01:08:16 groupadd[20310]: group added to /etc/group: name=builder, GID=664 <86>Apr 21 01:08:16 groupadd[20310]: group added to /etc/gshadow: name=builder <86>Apr 21 01:08:16 groupadd[20310]: new group: name=builder, GID=664 <86>Apr 21 01:08:16 useradd[20337]: new user: name=builder, UID=664, GID=664, home=/usr/src, shell=/bin/bash <13>Apr 21 01:08:19 rpmi: libexpat-2.2.4-alt0.M80P.1 1503871120 installed <13>Apr 21 01:08:19 rpmi: libgdbm-1.8.3-alt10 1454943313 installed <13>Apr 21 01:08:19 rpmi: libtinfo-devel-5.9-alt8 1456756459 installed <13>Apr 21 01:08:19 rpmi: libncurses-devel-5.9-alt8 1456756459 installed <13>Apr 21 01:08:19 rpmi: python-modules-curses-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:08:19 rpmi: libverto-0.2.6-alt1_6 1455633234 installed <13>Apr 21 01:08:19 rpmi: libkeyutils-1.5.10-alt0.M80P.2 p8+216694.100.6.1 1547827915 installed <13>Apr 21 01:08:19 rpmi: libcom_err-1.42.13-alt2 1449075846 installed <13>Apr 21 01:08:19 rpmi: ca-certificates-2016.02.25-alt1 1462368370 installed <13>Apr 21 01:08:19 rpmi: libcrypto10-1.0.2n-alt0.M80P.1 1512766129 installed <13>Apr 21 01:08:19 rpmi: libssl10-1.0.2n-alt0.M80P.1 1512766129 installed <86>Apr 21 01:08:19 groupadd[31406]: group added to /etc/group: name=_keytab, GID=499 <86>Apr 21 01:08:19 groupadd[31406]: group added to /etc/gshadow: name=_keytab <86>Apr 21 01:08:19 groupadd[31406]: new group: name=_keytab, GID=499 <13>Apr 21 01:08:19 rpmi: libkrb5-1.14.6-alt1.M80P.1 1525355673 installed <13>Apr 21 01:08:20 rpmi: python3-base-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 21 01:08:20 rpmi: python-modules-compiler-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:08:20 rpmi: python3-module-py-1.4.34-alt0.M80P.1 1503506764 installed <13>Apr 21 01:08:20 rpmi: python-modules-email-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:08:20 rpmi: python3-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 21 01:08:20 rpmi: rpm-build-python3-0.1.10.10-alt1.M80P.1 1530521451 installed <13>Apr 21 01:08:20 rpmi: python-modules-unittest-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:08:20 rpmi: python3-module-pytest-3.2.1-alt0.M80P.1 1503499784 installed <13>Apr 21 01:08:20 rpmi: python3-module-setuptools-1:18.5-alt0.M80P.1 1497527461 installed <13>Apr 21 01:08:21 rpmi: python-modules-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:08:21 rpmi: python-modules-ctypes-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:08:21 rpmi: python-modules-encodings-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:08:21 rpmi: python-modules-multiprocessing-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:08:21 rpmi: python-modules-logging-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:08:21 rpmi: python-tools-2to3-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:08:21 rpmi: python-modules-xml-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:08:21 rpmi: python-modules-hotshot-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:08:21 rpmi: python-modules-bsddb-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:08:21 rpmi: python-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:08:21 rpmi: python-dev-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:08:21 rpmi: python-module-py-1.4.34-alt0.M80P.1 1503506764 installed <13>Apr 21 01:08:21 rpmi: python-modules-json-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:08:21 rpmi: python-module-pytest-3.2.1-alt0.M80P.1 1503499784 installed <13>Apr 21 01:08:21 rpmi: python-module-setuptools-1:18.5-alt0.M80P.1 1497527461 installed Installing python-module-ClientForm-0.2.10-alt4.1.1.src.rpm Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.19194 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf ClientForm-0.2.10 + echo 'Source #0 (ClientForm-0.2.10.tar.gz):' Source #0 (ClientForm-0.2.10.tar.gz): + /bin/gzip -dc /usr/src/RPM/SOURCES/ClientForm-0.2.10.tar.gz + /bin/tar -xf - + cd ClientForm-0.2.10 + /bin/chmod -c -Rf u+rwX,go-w . + cp -fR . ../python3 + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.67043 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd ClientForm-0.2.10 + 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 copying ClientForm.py -> build/lib + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/ClientForm-0.2.10 + find ../python3 -type f -name '*.py' -exec 2to3 -w -n '{}' + RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ../python3/test/test_clientform.py --- ../python3/test/test_clientform.py (original) +++ ../python3/test/test_clientform.py (refactored) @@ -8,7 +8,7 @@ import unittest, string from unittest import TestCase -from cStringIO import StringIO +from io import StringIO import ClientForm from ClientForm import ControlNotFoundError, ItemNotFoundError, \ @@ -107,13 +107,13 @@ def test_unescape_charref(self): from ClientForm import unescape_charref, get_entitydefs - mdash_utf8 = u"\u2014".encode("utf-8") + mdash_utf8 = "\u2014".encode("utf-8") for ref, codepoint, utf8, latin1 in [ - ("38", 38, u"&".encode("utf-8"), "&"), + ("38", 38, "&".encode("utf-8"), "&"), ("x2014", 0x2014, mdash_utf8, "—"), ("8212", 8212, mdash_utf8, "—"), ]: - self.assertEqual(unescape_charref(ref, None), unichr(codepoint)) + self.assertEqual(unescape_charref(ref, None), chr(codepoint)) self.assertEqual(unescape_charref(ref, 'latin-1'), latin1) self.assertEqual(unescape_charref(ref, 'utf-8'), utf8) @@ -121,19 +121,19 @@ from ClientForm import get_entitydefs ed = get_entitydefs() for name, char in [ - ("&", u"&"), - ("<", u"<"), - (">", u">"), - ("—", u"\u2014"), - ("♠", u"\u2660"), + ("&", "&"), + ("<", "<"), + (">", ">"), + ("—", "\u2014"), + ("♠", "\u2660"), ]: self.assertEqual(ed[name], char) def test_unescape1(self): - import htmlentitydefs + import html.entities from ClientForm import unescape, get_entitydefs data = "& < — — —" - mdash_utf8 = u"\u2014".encode("utf-8") + mdash_utf8 = "\u2014".encode("utf-8") ue = unescape(data, get_entitydefs(), "utf-8") self.assertEqual("& < %s %s %s" % ((mdash_utf8,)*3), ue) @@ -160,7 +160,7 @@ self.assertEqual(unescape("&", {}), "&") for encoding, expected in [ - ("utf-8", u"&\u06aa\u2014\u2014".encode("utf-8")), + ("utf-8", "&\u06aa\u2014\u2014".encode("utf-8")), ("latin-1", "&ڪ——")]: self.assertEqual( expected, @@ -175,7 +175,7 @@ forms = ClientForm.ParseFile(file, "http://localhost/", backwards_compat=False, encoding="utf-8") form = forms[0] - test_string = "&"+(u"\u2014".encode('utf8')*3) + test_string = "&"+("\u2014".encode('utf8')*3) self.assertEqual(form.action, "http://localhost/"+test_string) control = form.find_control(type="textarea", nr=0) self.assertEqual(control.value, "val"+test_string) @@ -193,7 +193,7 @@ forms = ClientForm.ParseFileEx( f, "http://localhost/", encoding="utf-8") form = forms[1] - test_string = "&"+(u"\u2014".encode('utf8')*3) + test_string = "&"+("\u2014".encode('utf8')*3) control = form.find_control(nr=0) for ii in range(len(control.items)): item = control.items[ii] @@ -221,7 +221,7 @@ def testEmptyParse(self): forms = ClientForm.ParseFile(StringIO(""), "http://localhost", backwards_compat=False) - self.assert_(len(forms) == 0) + self.assertTrue(len(forms) == 0) def _forms(self): file = StringIO("""