<86>Apr 21 01:09:32 userdel[14234]: delete user 'rooter' <86>Apr 21 01:09:32 groupadd[14246]: group added to /etc/group: name=rooter, GID=609 <86>Apr 21 01:09:32 groupadd[14246]: group added to /etc/gshadow: name=rooter <86>Apr 21 01:09:32 groupadd[14246]: new group: name=rooter, GID=609 <86>Apr 21 01:09:32 useradd[14254]: new user: name=rooter, UID=609, GID=609, home=/root, shell=/bin/bash <86>Apr 21 01:09:32 userdel[14265]: delete user 'builder' <86>Apr 21 01:09:32 userdel[14265]: removed group 'builder' owned by 'builder' <86>Apr 21 01:09:32 groupadd[14276]: group added to /etc/group: name=builder, GID=610 <86>Apr 21 01:09:32 groupadd[14276]: group added to /etc/gshadow: name=builder <86>Apr 21 01:09:32 groupadd[14276]: new group: name=builder, GID=610 <86>Apr 21 01:09:32 useradd[14282]: new user: name=builder, UID=610, GID=610, home=/usr/src, shell=/bin/bash <13>Apr 21 01:09:37 rpmi: libexpat-2.2.4-alt0.M80P.1 1503871120 installed <13>Apr 21 01:09:37 rpmi: libgdbm-1.8.3-alt10 1454943313 installed <13>Apr 21 01:09:37 rpmi: libtinfo-devel-5.9-alt8 1456756459 installed <13>Apr 21 01:09:37 rpmi: libncurses-devel-5.9-alt8 1456756459 installed <13>Apr 21 01:09:37 rpmi: python-modules-curses-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:09:37 rpmi: libverto-0.2.6-alt1_6 1455633234 installed <13>Apr 21 01:09:37 rpmi: libkeyutils-1.5.10-alt0.M80P.2 p8+216694.100.6.1 1547827915 installed <13>Apr 21 01:09:37 rpmi: libcom_err-1.42.13-alt2 1449075846 installed <13>Apr 21 01:09:37 rpmi: ca-certificates-2016.02.25-alt1 1462368370 installed <13>Apr 21 01:09:37 rpmi: libcrypto10-1.0.2n-alt0.M80P.1 1512766129 installed <13>Apr 21 01:09:37 rpmi: libssl10-1.0.2n-alt0.M80P.1 1512766129 installed <86>Apr 21 01:09:37 groupadd[20907]: group added to /etc/group: name=_keytab, GID=499 <86>Apr 21 01:09:37 groupadd[20907]: group added to /etc/gshadow: name=_keytab <86>Apr 21 01:09:37 groupadd[20907]: new group: name=_keytab, GID=499 <13>Apr 21 01:09:37 rpmi: libkrb5-1.14.6-alt1.M80P.1 1525355673 installed <13>Apr 21 01:09:38 rpmi: python3-base-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 21 01:09:38 rpmi: python3-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 21 01:09:38 rpmi: python-modules-compiler-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:09:38 rpmi: rpm-build-python3-0.1.10.10-alt1.M80P.1 1530521451 installed <13>Apr 21 01:09:38 rpmi: libpython3-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 21 01:09:38 rpmi: python3-module-py-1.4.34-alt0.M80P.1 1503506764 installed <13>Apr 21 01:09:39 rpmi: python3-dev-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 21 01:09:39 rpmi: python-modules-email-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:09:39 rpmi: python3-module-pytest-3.2.1-alt0.M80P.1 1503499784 installed <13>Apr 21 01:09:39 rpmi: python3-module-setuptools-1:18.5-alt0.M80P.1 1497527461 installed <13>Apr 21 01:09:39 rpmi: python-modules-unittest-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:09:39 rpmi: python-modules-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:09:39 rpmi: python-modules-ctypes-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:09:39 rpmi: python-modules-encodings-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:09:39 rpmi: python-modules-multiprocessing-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:09:39 rpmi: python-modules-logging-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:09:39 rpmi: python-tools-2to3-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:09:39 rpmi: python-modules-xml-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:09:39 rpmi: python-modules-hotshot-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:09:39 rpmi: python-modules-bsddb-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:09:39 rpmi: python-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:09:39 rpmi: python-dev-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:09:39 rpmi: python-module-py-1.4.34-alt0.M80P.1 1503506764 installed <13>Apr 21 01:09:39 rpmi: python-modules-json-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:09:39 rpmi: python-module-pytest-3.2.1-alt0.M80P.1 1503499784 installed <13>Apr 21 01:09:40 rpmi: python-module-setuptools-1:18.5-alt0.M80P.1 1497527461 installed Installing python-module-zope.app.file-3.6.1-alt4.1.src.rpm Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.87020 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python-module-zope.app.file-3.6.1 + echo 'Source #0 (python-module-zope.app.file-3.6.1.tar):' Source #0 (python-module-zope.app.file-3.6.1.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/python-module-zope.app.file-3.6.1.tar + cd python-module-zope.app.file-3.6.1 + /bin/chmod -c -Rf u+rwX,go-w . + cp -fR . ../python3 + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.98848 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python-module-zope.app.file-3.6.1 + CFLAGS='-pipe -Wall -g -O2' + export CFLAGS + CXXFLAGS='-pipe -Wall -g -O2' + export CXXFLAGS + FFLAGS='-pipe -Wall -g -O2' + export FFLAGS + /usr/bin/python setup.py build running build running build_py creating build creating build/lib creating build/lib/zope copying src/zope/__init__.py -> build/lib/zope creating build/lib/zope/app copying src/zope/app/__init__.py -> build/lib/zope/app creating build/lib/zope/app/file copying src/zope/app/file/testing.py -> build/lib/zope/app/file copying src/zope/app/file/interfaces.py -> build/lib/zope/app/file copying src/zope/app/file/image.py -> build/lib/zope/app/file copying src/zope/app/file/i18n.py -> build/lib/zope/app/file copying src/zope/app/file/file.py -> build/lib/zope/app/file copying src/zope/app/file/__init__.py -> build/lib/zope/app/file creating build/lib/zope/app/file/tests copying src/zope/app/file/tests/test_image.py -> build/lib/zope/app/file/tests copying src/zope/app/file/tests/test_functional_put.py -> build/lib/zope/app/file/tests copying src/zope/app/file/tests/test_file.py -> build/lib/zope/app/file/tests copying src/zope/app/file/tests/__init__.py -> build/lib/zope/app/file/tests creating build/lib/zope/app/file/browser copying src/zope/app/file/browser/image.py -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/file.py -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/__init__.py -> build/lib/zope/app/file/browser creating build/lib/zope/app/file/browser/tests copying src/zope/app/file/browser/tests/test_imagedata.py -> build/lib/zope/app/file/browser/tests copying src/zope/app/file/browser/tests/test_functional.py -> build/lib/zope/app/file/browser/tests copying src/zope/app/file/browser/tests/test_file.py -> build/lib/zope/app/file/browser/tests copying src/zope/app/file/browser/tests/__init__.py -> build/lib/zope/app/file/browser/tests running egg_info writing requirements to src/zope.app.file.egg-info/requires.txt writing src/zope.app.file.egg-info/PKG-INFO writing namespace_packages to src/zope.app.file.egg-info/namespace_packages.txt writing top-level names to src/zope.app.file.egg-info/top_level.txt writing dependency_links to src/zope.app.file.egg-info/dependency_links.txt reading manifest file 'src/zope.app.file.egg-info/SOURCES.txt' writing manifest file 'src/zope.app.file.egg-info/SOURCES.txt' copying src/zope/app/file/configure.zcml -> build/lib/zope/app/file copying src/zope/app/file/ftesting.zcml -> build/lib/zope/app/file copying src/zope/app/file/browser/configure.zcml -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/file.txt -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/file_add.pt -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/file_icon.gif -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/file_upload.pt -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/image_edit.pt -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/image_icon.gif -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/preview.pt -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/url.txt -> build/lib/zope/app/file/browser + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/python-module-zope.app.file-3.6.1 + find -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 ./src/zope/app/file/tests/test_image.py RefactoringTool: Refactored ./src/zope/app/file/tests/test_functional_put.py --- ./src/zope/app/file/tests/test_image.py (original) +++ ./src/zope/app/file/tests/test_image.py (refactored) @@ -68,8 +68,8 @@ self.assertEqual(image.getImageSize(), (16, 16)) def testInterface(self): - self.failUnless(IImage.implementedBy(Image)) - self.failUnless(verifyClass(IImage, Image)) + self.assertTrue(IImage.implementedBy(Image)) + self.assertTrue(verifyClass(IImage, Image)) class TestFileAdapters(unittest.TestCase): @@ -109,50 +109,50 @@ def test_image(self): factory = FileFactory(None) f = factory("spam.txt", "image/foo", "hello world") - self.assert_(isinstance(f, Image), f) + self.assertTrue(isinstance(f, Image), f) f = factory("spam.txt", "", zptlogo) - self.assert_(isinstance(f, Image), f) + self.assertTrue(isinstance(f, Image), f) def test_text(self): factory = FileFactory(None) f = factory("spam.txt", "", "hello world") - self.assert_(isinstance(f, File), f) - self.assert_(not isinstance(f, Image), f) + self.assertTrue(isinstance(f, File), f) + self.assertTrue(not isinstance(f, Image), f) f = factory("spam.txt", "", "\0\1\2\3\4") - self.assert_(isinstance(f, File), f) - self.assert_(not isinstance(f, Image), f) + self.assertTrue(isinstance(f, File), f) + self.assertTrue(not isinstance(f, Image), f) f = factory("spam.txt", "text/splat", zptlogo) - self.assert_(isinstance(f, File), f) - self.assert_(not isinstance(f, Image), f) + self.assertTrue(isinstance(f, File), f) + self.assertTrue(not isinstance(f, Image), f) f = factory("spam.txt", "application/splat", zptlogo) - self.assert_(isinstance(f, File), f) - self.assert_(not isinstance(f, Image), f) + self.assertTrue(isinstance(f, File), f) + self.assertTrue(not isinstance(f, Image), f) class TestSized(unittest.TestCase): def testInterface(self): from zope.size.interfaces import ISized - self.failUnless(ISized.implementedBy(ImageSized)) - self.failUnless(verifyClass(ISized, ImageSized)) + self.assertTrue(ISized.implementedBy(ImageSized)) + self.assertTrue(verifyClass(ISized, ImageSized)) def test_zeroSized(self): s = ImageSized(DummyImage(0, 0, 0)) self.assertEqual(s.sizeForSorting(), ('byte', 0)) - self.assertEqual(s.sizeForDisplay(), u'0 KB ${width}x${height}') + self.assertEqual(s.sizeForDisplay(), '0 KB ${width}x${height}') self.assertEqual(s.sizeForDisplay().mapping['width'], '0') self.assertEqual(s.sizeForDisplay().mapping['height'], '0') def test_arbitrarySize(self): s = ImageSized(DummyImage(34, 56, 78)) self.assertEqual(s.sizeForSorting(), ('byte', 78)) - self.assertEqual(s.sizeForDisplay(), u'1 KB ${width}x${height}') + self.assertEqual(s.sizeForDisplay(), '1 KB ${width}x${height}') self.assertEqual(s.sizeForDisplay().mapping['width'], '34') self.assertEqual(s.sizeForDisplay().mapping['height'], '56') def test_unknownSize(self): s = ImageSized(DummyImage(-1, -1, 23)) self.assertEqual(s.sizeForSorting(), ('byte', 23)) - self.assertEqual(s.sizeForDisplay(), u'1 KB ${width}x${height}') + self.assertEqual(s.sizeForDisplay(), '1 KB ${width}x${height}') self.assertEqual(s.sizeForDisplay().mapping['width'], '?') self.assertEqual(s.sizeForDisplay().mapping['height'], '?') --- ./src/zope/app/file/tests/test_functional_put.py (original) +++ ./src/zope/app/file/tests/test_functional_put.py (refactored) @@ -34,13 +34,13 @@ This is just a test.""") - self.assertEquals(response.getStatus(), 201) - self.assertEquals(response.getHeader("Location"), + self.assertEqual(response.getStatus(), 201) + self.assertEqual(response.getHeader("Location"), "http://localhost/testfile.txt") response = http(r"""GET /testfRefactoringTool: No changes to ./src/zope/app/file/tests/test_file.py RefactoringTool: No changes to ./src/zope/app/file/testing.py RefactoringTool: Refactored ./src/zope/app/file/interfaces.py RefactoringTool: Refactored ./src/zope/app/file/image.py RefactoringTool: No changes to ./src/zope/app/file/i18n.py RefactoringTool: Refactored ./src/zope/app/file/file.py RefactoringTool: No changes to ./src/zope/app/file/browser/tests/test_imagedata.py RefactoringTool: Refactored ./src/zope/app/file/browser/tests/test_functional.py ile.txt HTTP/1.1 Authorization: Basic globalmgr:globalmgrpw""") - self.assertEquals(response.getBody(), "This is just a test.") + self.assertEqual(response.getBody(), "This is just a test.") # now modify it response = http(r"""PUT /testfile.txt HTTP/1.1 @@ -49,12 +49,12 @@ Content-Type: text/plain And now it is modified.""") - self.assertEquals(response.getStatus(), 200) - self.assertEquals(response.getBody(), "") + self.assertEqual(response.getStatus(), 200) + self.assertEqual(response.getBody(), "") response = http(r"""GET /testfile.txt HTTP/1.1 Authorization: Basic globalmgr:globalmgrpw""") - self.assertEquals(response.getBody(), "And now it is modified.") + self.assertEqual(response.getBody(), "And now it is modified.") def test_suite(): --- ./src/zope/app/file/interfaces.py (original) +++ ./src/zope/app/file/interfaces.py (refactored) @@ -25,16 +25,16 @@ class IFile(Interface): contentType = BytesLine( - title = _(u'Content Type'), - description=_(u'The content type identifies the type of data.'), + title = _('Content Type'), + description=_('The content type identifies the type of data.'), default='', required=False, missing_value='' ) data = Bytes( - title=_(u'Data'), - description=_(u'The actual content of the object.'), + title=_('Data'), + description=_('The actual content of the object.'), default='', missing_value='', required=False, --- ./src/zope/app/file/image.py (original) +++ ./src/zope/app/file/image.py (refactored) @@ -18,7 +18,7 @@ __docformat__ = 'restructuredtext' import struct -from cStringIO import StringIO +from io import StringIO from zope.interface import implements from zope.size.interfaces import ISized --- ./src/zope/app/file/file.py (original) +++ ./src/zope/app/file/file.py (refactored) @@ -131,7 +131,7 @@ def _setData(self, data) : # Handle case when data is a string - if isinstance(data, unicode): + if isinstance(data, str): data = data.encode('UTF-8') if isinstance(data, str): @@ -233,7 +233,7 @@ return len(data) def __str__(self): - next = self.next + next = self.__next__ if next is None: return self._data @@ -241,7 +241,7 @@ while next is not None: self = next result.append(self._data) - next = self.next + next = self.__next__ return ''.join(result) --- ./src/zope/app/file/browser/tests/test_functional.py (original) +++ ./src/zope/app/file/browser/tests/test_functional.py (refactored) @@ -19,7 +19,7 @@ import re import unittest from xml.sax.saxutils import escape -from StringIO import StringIO +from io import StringIO from zope.testing import renormalizing from zope.app.testing import functional @@ -32,7 +32,7 @@ class FileTest(BrowserTestCase): - content = u'File ' + content = 'File ' def addFile(self): file = File(self.content) @@ -46,28 +46,28 @@ basic='mgr:mgrpw') self.assertEqual(response.getStatus(), 200) body = response.getBody() - self.assert_('Add a File' in body) - self.assert_('Content Type' in body) - self.assert_('Data' in body) - self.assert_('Object Name' in body) - self.assert_('"Add"' in body) + self.assertTrue('Add a File' in body) + self.assertTrue('Content Type' in body) + self.assertTrue('Data' in body) + self.assertTrue('Object Name' in body) + self.assertTrue('"Add"' in body) self.checkForBrokenLinks(body, '/+/zope.app.file.File=', 'mgr:mgrpw') def testAdd(self): response = self.publish( '/+/zope.app.file.File=', - form={'type_name': u'zope.app.file.File', + form={'type_name': 'zope.app.file.File', 'field.data': StringIO('A file'), 'field.data.used': '', - 'add_input_name': u'file', - 'UPDATE_SUBMIT': u'Add'}, + 'add_input_name': 'file', + 'UPDATE_SUBMIT': 'Add'}, basic='mgr:mgrpw') self.assertEqual(response.getStatus(), 302) self.assertEqual(response.getHeader('Location'), 'http://localhost/@@contents.html') root = self.getRootFolder() - self.assert_('file' in root) + self.assertTrue('file' in root) file = root['file'] self.assertEqual(file.data, 'A file') @@ -76,16 +76,16 @@ data.filename="test.txt" response = self.publish( '/+/zope.app.file.File=', - form={'type_name': u'zope.app.file.File', + form={'type_name': 'zope.app.file.File', 'field.data': data, 'field.data.used': '', - 'UPDATE_SUBMIT': u'Add'}, + 'UPDATE_SUBMIT': 'Add'}, basic='mgr:mgrpw') self.assertEqual(response.getStatus(), 302) self.assertEqual(response.getHeader('Location'), 'http://localhost/@@contents.html') root = self.getRootFolder() - self.assert_('test.txt' in root) + self.assertTrue('test.txt' in root) file = root['test.txt'] self.assertEqual(file.data, 'File Contents') @@ -96,27 +96,27 @@ basic='mgr:mgrpw') self.assertEqual(response.getStatus(), 200) body = response.getBody() - self.assert_('Change a file' in body) - self.assert_('Content Type' in body) - self.assert_('Data' in body) - self.assert_(escape(self.content) in body) + self.assertTrue('Change a file' in body) + self.assertTrue('Content Type' in body) + self.assertTrue('Data' in body) + self.assertTrue(escape(self.content) in body) self.checkForBrokenLinks(body, '/file/@@edit.html', 'mgr:mgrpw') def testEdit(self): self.addFile() response = self.publish( '/file/@@edit.html', - form={'field.data': u'

A File

', - 'field.data.used': '', - 'field.contentType': u'text/plain', - 'UPDATE_SUBMIT': u'Edit'}, - basic='mgr:mgrpw') - self.assertEqual(response.getStatus(), 200) - body = response.getBody() - self.assert_('Change a file' in body) - self.assert_('Content Type' in body) - self.assert_('Data' in body) - self.assert_(escape(u'

A File

') in body) + form={'field.data': '

A File

', + 'field.data.used': '', + 'field.contentType': 'text/plain', + 'UPDATE_SUBMIT': 'Edit'}, + basic='mgr:mgrpw') + self.assertEqual(response.getStatus(), 200) + body = response.getBody() + self.assertTrue('Change a file' in body) + self.assertTrue('Content Type' in body) + self.assertTrue('Data' in body) + self.assertTrue(escape('

A File

') in body) root = self.getRootFolder() file = root['file'] self.assertEqual(file.data, '

A File

') @@ -129,10 +129,10 @@ basic='mgr:mgrpw') self.assertEqual(response.getStatus(), 200) body = response.getBody() - self.assert_('Upload a file' in body) - self.assert_('Content Type' in body) - self.assert_('Data' in body) - self.failIf(escape(self.content) in body) + self.assertTrue('Upload a file' in body) + self.assertTrue('Content Type' in body) + self.assertTrue('Data' in body) + self.assertFalse(escape(self.content) in body) self.checkForBrokenLinks(body, '/file/@@upload.html', 'mgr:mgrpw') def testUpload(self): @@ -141,15 +141,15 @@ '/file/@@upload.html', form={'field.data': StringIO('

A file

'), 'field.data.used': '', - 'field.contentType': u'text/plain', - 'UPDATE_SUBMIT': u'Change'}, - basic='mgr:mgrpw') - self.assertEqual(response.getStatus(), 200) - body = response.getBody() - self.assert_('Upload a file' in body) - self.assert_('Content Type' in body) - self.assert_('Data' in body) - self.failIf(escape(u'

A File

') in body) + 'field.contentType': 'text/plain', + 'UPDATE_SUBMIT': 'Change'}, + basic='mgr:mgrpw') + self.assertEqual(response.getStatus(), 200) + body = response.getBody() + self.assertTrue('Upload a file' in body) + self.assertTrue('Content Type' in body) + self.assertTrue('Data' in body) + self.assertFalse(escape('

A File

') in body) root = self.getRootFolder() file = root['file'] self.assertEqual(file.data, '

A file

') @@ -172,7 +172,7 @@ basic='mgr:mgrpw') self.assertEqual(response.getStatus(), 200) body = response.getBody() - self.assert_('