<86>Oct 11 09:14:38 userdel[2943973]: delete user 'rooter' <86>Oct 11 09:14:38 userdel[2943973]: removed group 'rooter' owned by 'rooter' <86>Oct 11 09:14:38 userdel[2943973]: removed shadow group 'rooter' owned by 'rooter' <86>Oct 11 09:14:38 groupadd[2944682]: group added to /etc/group: name=rooter, GID=663 <86>Oct 11 09:14:38 groupadd[2944682]: group added to /etc/gshadow: name=rooter <86>Oct 11 09:14:38 groupadd[2944682]: new group: name=rooter, GID=663 <86>Oct 11 09:14:38 useradd[2944770]: new user: name=rooter, UID=663, GID=663, home=/root, shell=/bin/bash <86>Oct 11 09:14:39 userdel[2945028]: delete user 'builder' <86>Oct 11 09:14:39 userdel[2945028]: removed group 'builder' owned by 'builder' <86>Oct 11 09:14:39 userdel[2945028]: removed shadow group 'builder' owned by 'builder' <86>Oct 11 09:14:39 groupadd[2946291]: group added to /etc/group: name=builder, GID=664 <86>Oct 11 09:14:39 groupadd[2946291]: new group: name=builder, GID=664 <86>Oct 11 09:14:39 useradd[2946433]: new user: name=builder, UID=664, GID=664, home=/usr/src, shell=/bin/bash <13>Oct 11 09:14:41 rpmi: libgdbm-1.8.3-alt10 1454943334 installed <13>Oct 11 09:14:41 rpmi: libexpat-2.2.4-alt1 1503305345 installed <13>Oct 11 09:14:41 rpmi: libp11-kit-0.23.15-alt2 p9+254920.2400.19.1 1601385903 installed <13>Oct 11 09:14:41 rpmi: libtasn1-4.14-alt1 p9+235792.100.2.1 1565425233 installed <13>Oct 11 09:14:41 rpmi: rpm-macros-alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Oct 11 09:14:41 rpmi: alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Oct 11 09:14:42 rpmi: ca-certificates-2020.06.29-alt1 p9+258899.100.3.1 1601998604 installed <13>Oct 11 09:14:42 rpmi: ca-trust-0.1.2-alt1 p9+233349.100.1.1 1561655062 installed <13>Oct 11 09:14:42 rpmi: p11-kit-trust-0.23.15-alt2 p9+254920.2400.19.1 1601385903 installed <13>Oct 11 09:14:42 rpmi: libcrypto1.1-1.1.1g-alt1 p9+250580.100.5.1 1588175266 installed <13>Oct 11 09:14:42 rpmi: libssl1.1-1.1.1g-alt1 p9+250580.100.5.1 1588175266 installed <13>Oct 11 09:14:42 rpmi: python3-3.7.4-alt3 p9+249932.100.2.1 1587127349 installed <13>Oct 11 09:14:42 rpmi: libpython3-3.7.4-alt3 p9+249932.100.2.1 1587127349 installed <13>Oct 11 09:14:43 rpmi: python3-base-3.7.4-alt3 p9+249932.100.2.1 1587127349 installed <13>Oct 11 09:14:43 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>Oct 11 09:14:43 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>Oct 11 09:14:47 rpmi: python3-module-pkg_resources-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>Oct 11 09:14:48 rpmi: python-modules-curses-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>Oct 11 09:14:48 rpmi: libtinfo-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686226 installed <13>Oct 11 09:14:48 rpmi: libncurses-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686226 installed <13>Oct 11 09:14:48 rpmi: python3-dev-3.7.4-alt3 p9+249932.100.2.1 1587127349 installed <13>Oct 11 09:14:48 rpmi: libverto-0.3.0-alt1_7 sisyphus+225932.100.1.1 1553994919 installed <13>Oct 11 09:14:48 rpmi: libkeyutils-1.6-alt2 sisyphus+226520.100.2.1 1554512089 installed <13>Oct 11 09:14:48 rpmi: libcom_err-1.44.6-alt1 sisyphus+224154.100.1.1 1552091678 installed <86>Oct 11 09:14:48 groupadd[3011490]: group added to /etc/group: name=_keytab, GID=499 <86>Oct 11 09:14:48 groupadd[3011490]: group added to /etc/gshadow: name=_keytab <86>Oct 11 09:14:48 groupadd[3011490]: new group: name=_keytab, GID=499 <13>Oct 11 09:14:48 rpmi: libkrb5-1.17.1-alt1 p9+242852.100.2.1 1576572639 installed <13>Oct 11 09:14:48 rpmi: libtirpc-1.0.3-alt1 1532008017 installed <13>Oct 11 09:14:48 rpmi: libnsl2-1.1.0-alt1_1 1511548749 installed <13>Oct 11 09:14:48 rpmi: python-modules-compiler-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>Oct 11 09:14:48 rpmi: python-modules-email-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>Oct 11 09:14:48 rpmi: python-modules-unittest-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>Oct 11 09:14:48 rpmi: python-modules-encodings-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>Oct 11 09:14:48 rpmi: python-modules-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>Oct 11 09:14:48 rpmi: python-modules-nis-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>Oct 11 09:14:48 rpmi: python-modules-ctypes-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>Oct 11 09:14:48 rpmi: python-modules-multiprocessing-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>Oct 11 09:14:48 rpmi: python-modules-logging-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>Oct 11 09:14:48 rpmi: python-tools-2to3-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>Oct 11 09:14:48 rpmi: python-modules-xml-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>Oct 11 09:14:48 rpmi: python-modules-hotshot-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>Oct 11 09:14:48 rpmi: python-modules-bsddb-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>Oct 11 09:14:48 rpmi: python-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>Oct 11 09:14:49 rpmi: python-modules-distutils-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>Oct 11 09:14:49 rpmi: python-module-pkg_resources-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>Oct 11 09:14:49 rpmi: libnsl2-devel-1.1.0-alt1_1 1511548749 installed <13>Oct 11 09:14:49 rpmi: python-dev-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>Oct 11 09:14:49 rpmi: python-module-setuptools-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>Oct 11 09:14:49 rpmi: python3-module-setuptools-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/python-module-infrae.testbrowser-2.0.2-alt2.2.nosrc.rpm Installing python-module-infrae.testbrowser-2.0.2-alt2.2.src.rpm Building target platforms: i586 Building for target i586 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.43097 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python-module-infrae.testbrowser-2.0.2 + echo 'Source #0 (python-module-infrae.testbrowser-2.0.2.tar):' Source #0 (python-module-infrae.testbrowser-2.0.2.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/python-module-infrae.testbrowser-2.0.2.tar + cd python-module-infrae.testbrowser-2.0.2 + /bin/chmod -c -Rf u+rwX,go-w . + cp -fR . ../python3 + 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/src/infrae/testbrowser/wsgi.py RefactoringTool: Refactored ../python3/src/infrae/testbrowser/utils.py --- ../python3/src/infrae/testbrowser/wsgi.py (original) +++ ../python3/src/infrae/testbrowser/wsgi.py (refactored) @@ -2,7 +2,7 @@ # Copyright (c) 2010-2013 Infrae. All rights reserved. # See also LICENSE.txt -import urllib2 +import urllib.request, urllib.error, urllib.parse import io from zope.interface import implements @@ -70,7 +70,7 @@ uri, query = uri.split('?', 1) if '#' in uri: uri, _ = uri.split('#', 1) - environ['PATH_INFO'] = urllib2.unquote(uri) + environ['PATH_INFO'] = urllib.parse.unquote(uri) environ['QUERY_STRING'] = query if data is not None and data_type is not None: environ['wsgi.input'].write(data) --- ../python3/src/infrae/testbrowser/utils.py (original) +++ ../python3/src/infrae/testbrowser/utils.py (refactored) @@ -7,8 +7,9 @@ import mimetypes import operator import os -import urllib -import urlparse +import urllib.request, urllib.parse, urllib.error +import urllib.parse +from functools import reduce _marker = object() @@ -33,40 +34,39 @@ return None return None - return filter(lambda c: c != None, - map(resolve_charset, + return [c for c in map(resolve_charset, reduce(operator.add, - map(lambda c: c.split(), charsets.split(','))))) + [c.split() for c in charsets.split(',')])) if c != None] def charset_encoder(charset, value): """Encoder a value in the given charset. """ - if isinstance(value, unicode): + if isinstance(value, str): return value.encode(charset, 'ignore') return str(value) def resolve_url(url, browser): """Resolve an absolute url given the current browser location. """ - parsed = urlparse.urlparse(urllib.unquote(url)) + parsed = urllib.parse.urlparse(urllib.parse.unquote(url)) if (parsed.scheme in ('', 'http', 'https') and not parsed.path.startswith('/')): # Be sure to always not have any relative links parsed = list(parsed) base = '/'.join(browser.location.split('/')[:-1]) parsed[2] = '/'.join((base, parsed[2])) - return urlparse.urlunparse(parsed) + return urllib.parse.urlunparse(parsed) def resolve_location(url): """Resolve a location out of an url. It does the opposite of resolve_url. """ - parsed = urlparse.urlparse(urllib.unquote(url)) + parsed = urllib.parse.urlparse(urllib.parse.unquote(url)) if parsed.netloc: parsed = list(parsed) parsed[1] = '' parsed[0] = '' - return urlparse.urlunparse(parsed) + return urllib.parse.urlunparse(parsed) def format_auth(user, password): return 'Basic ' + ':'.join((user, password)).encode('base64').strip() @@ -77,20 +77,20 @@ BOUNDARY = '------------uCtemt3iWu00F3QDhiwZ2nIQ$' data = [] if isinstance(fields, dict): - fields = fields.iteritems() + fields = iter(fields.items()) for key, value in fields: data.append('--' + BOUNDARY) - if isinstance(key, unicode): + if isinstance(key, str): key = key.encode(charset) if isinstance(value, File): data.append( 'Content-Disposition: form-data; name="%s"; filename="%s"' % ( - key, unicode(value.filename).encode(charset))) + key, str(value.filename).encode(charset))) data.append('Content-Type: %s' % value.content_type) else: data.append('Content-Disposition: form-data; name="%s"' % key) data.append('') - if isinstance(data, unicode): + if isinstance(data, str): data.append(value.encode(charset)) else: data.append(str(value)) @@ -156,13 +156,13 @@ self._values = values def keys(self): - return map(operator.itemgetter(1), self._values) + return list(map(operator.itemgetter(1), self._values)) def items(self): - return map(operator.itemgeRefactoringTool: No changes to ../python3/src/infrae/testbrowser/tests/test_utils.py RefactoringTool: Refactored ../python3/src/infrae/testbrowser/tests/test_headers.py tter(1, 2), self._values) + return list(map(operator.itemgetter(1, 2), self._values)) def values(self): - return map(operator.itemgetter(2), self._values) + return list(map(operator.itemgetter(2), self._values)) iteritems = items iterkeys = keys @@ -170,16 +170,16 @@ def get(self, key, default=None, multiple=False): key = key.lower() - matches = filter(lambda item: key in item[0], self._values) + matches = [item for item in self._values if key in item[0]] if not matches: return default if len(matches) == 1: if multiple: return [matches[0][2]] return matches[0][2] - exact_matches = map( + exact_matches = list(map( operator.itemgetter(2), - filter(lambda item: key == item[0], matches)) + [item for item in matches if key == item[0]])) if multiple: return exact_matches if len(exact_matches) == 1: @@ -206,16 +206,16 @@ def __eq__(self, other): if isinstance(other, ResultSet): - other = other.keys() - return self.keys() == other + other = list(other.keys()) + return list(self.keys()) == other def __ne__(self, other): if isinstance(other, ResultSet): - other = other.keys() - return self.keys() != other + other = list(other.keys()) + return list(self.keys()) != other def __repr__(self): - return repr(map(operator.itemgetter(1), self._values)) + return repr(list(map(operator.itemgetter(1), self._values))) class Handlers(object): --- ../python3/src/infrae/testbrowser/tests/test_headers.py (original) +++ ../python3/src/infrae/testbrowser/tests/test_headers.py (refactored) @@ -14,17 +14,17 @@ headers = HTTPHeaders() headers['content-type'] = 'text/plain' - self.assertEquals(headers['content-type'], 'text/plain') - self.assertEquals(headers['Content-Type'], 'text/plain') + self.assertEqual(headers['content-type'], 'text/plain') + self.assertEqual(headers['Content-Type'], 'text/plain') headers['Content-Type'] = 'application/octet-stream' - self.assertEquals(headers['content-type'], 'application/octet-stream') - self.assertEquals(headers['Content-Type'], 'application/octet-stream') + self.assertEqual(headers['content-type'], 'application/octet-stream') + self.assertEqual(headers['Content-Type'], 'application/octet-stream') headers.update( - {'Content-Type': 'text/html', 'Content-Length': '42'}.items()) - self.assertEquals(headers['content-type'], 'text/html') - self.assertEquals(headers['content-length'], '42') + list({'Content-Type': 'text/html', 'Content-Length': '42'}.items())) + self.assertEqual(headers['content-type'], 'text/html') + self.assertEqual(headers['content-length'], '42') def test_non_existing_get(self): """Looking a non existing key raises KeyError. @@ -41,15 +41,15 @@ headers = HTTPHeaders() headers['Content-Length'] = '42' - self.assertEquals(headers.has_key('Content-Length'), True) - self.assertEquals(headers.has_key('content-length'), True) - self.failUnless('Content-Length' in headers) - self.failUnless('content-length' in headers) + self.assertEqual('Content-Length' in headers, True) + self.assertEqual('content-length' in headers, True) + self.assertTrue('Content-Length' in headers) + self.assertTrue('content-length' in headers) - self.assertEquals(headers.has_key('Server'), False) - self.assertEquals(headers.has_key('server'), False) - self.failIf('Server' in headers) - self.failIf('server' in headers) + self.assertEqual('Server' in headers, False) + self.assertEqual('server' in headers, False) + self.assertFalse('Server' in headers) + self.assertFalse('server' in headers)RefactoringTool: No changes to ../python3/src/infrae/testbrowser/tests/test_form.py RefactoringTool: Refactored ../python3/src/infrae/testbrowser/tests/test_expressions.py WARNING: couldn't encode ../python3/src/infrae/testbrowser/tests/test_expressions.py's diff for your terminal RefactoringTool: Refactored ../python3/src/infrae/testbrowser/tests/test_browsing.py WARNING: couldn't encode ../python3/src/infrae/testbrowser/tests/test_browsing.py's diff for your terminal RefactoringTool: Refactored ../python3/src/infrae/testbrowser/tests/form.py RefactoringTool: Refactored ../python3/src/infrae/testbrowser/tests/expressions.py WARNING: couldn't encode ../python3/src/infrae/testbrowser/tests/expressions.py's diff for your terminal RefactoringTool: Refactored ../python3/src/infrae/testbrowser/tests/browser.py def test_items(self): """items return a list of tuples containing all headers. Header @@ -59,10 +59,10 @@ headers['content-type'] = 'text/plain' headers['Content-length'] = 42 - self.assertEquals( - headers.items(), + self.assertEqual( + list(headers.items()), [('Content-Length', '42'), ('Content-Type', 'text/plain')]) - self.assertEquals( - list(headers.iteritems()), + self.assertEqual( + list(headers.items()), [('Content-Length', '42'), ('Content-Type', 'text/plain')]) --- ../python3/src/infrae/testbrowser/tests/test_expressions.py (original) +++ ../python3/src/infrae/testbrowser/tests/test_expressions.py (refactored) @@ -29,7 +29,7 @@ browser.inspect.add('values', '//p') # we get a latin1 interpretation of utf-8 self.assertEqual(browser.inspect.values, --- ../python3/src/infrae/testbrowser/tests/test_browsing.py (original) +++ ../python3/src/infrae/testbrowser/tests/test_browsing.py (refactored) @@ -157,7 +157,7 @@ 'application/json') self.assertEqual(browser.html, None) self.assertEqual(browser.xml, None) - self.assertEqual(browser.json, [True, False, 1, u'a']) + self.assertEqual(browser.json, [True, False, 1, 'a']) def test_history(self): with Browser(app.test_app_iter) as browser: @@ -308,7 +308,7 @@ self.assertNotEqual(browser.html, None) self.assertEqual( browser.html.xpath('//li/text()'), --- ../python3/src/infrae/testbrowser/tests/form.py (original) +++ ../python3/src/infrae/testbrowser/tests/form.py (refactored) @@ -82,7 +82,7 @@ # Can only set string values self.assertRaises( AssertionError, setattr, password_field, 'value', ['something']) - password_field.value = u'secret' + password_field.value = 'secret' submit_field = form.get_control('save') self.assertNotEqual(submit_field, None) --- ../python3/src/infrae/testbrowser/tests/expressions.py (original) +++ ../python3/src/infrae/testbrowser/tests/expressions.py (refactored) @@ -74,27 +74,27 @@ ['Home', 'Contact', 'Contact Abroad', 'python']) self.assertEqual( browser.inspect.breadcrumbs, - [u'Home ...', - u'Development ...', - u'Advanced Lisp ...', --- ../python3/src/infrae/testbrowser/tests/browser.py (original) +++ ../python3/src/infrae/testbrowser/tests/browser.py (refactored) @@ -20,7 +20,7 @@ with self.Browser(app.test_app_cookies_server) as browser: self.assertTrue(verifyObject(ICookies, browser.cookies)) self.assertEqual(len(browser.cookies), 0) - self.assertEqual(browser.cookies.keys(), []) + self.assertEqual(list(browser.cookies.keys()), []) self.assertNotIn('browser', browser.cookies) self.assertEqual(repr(browser.cookies), '') browser.open('/page.html') @@ -49,11 +49,11 @@ """ with self.Browser(app.test_app_cookies_client) as browser: self.assertEqual(len(browser.cookies), 0) - self.assertEqual(browser.cookies.keys(), []) + self.assertEqual(list(browser.cookies.keys()), []) self.assertNotIn('food', browser.cookies) browser.open('/page.html') self.assertEqual(len(browser.cookies), 0) - self.assertEqual(browser.cookies.keys(), []) + self.assertEqual(list(browser.cookies.keys()), []) self.assertNotIn('food', browser.cookies) # No cookies are visible self.assertNotEqual(browser.html, None) @@ -84,7 +84,7 @@ # You can clear all cookies browser.cookies.clear() self.assertEqual(len(browser.cookies), 0) - self.assertEqual(browser.cookies.keys(), []) + self.asserRefactoringTool: Refactored ../python3/src/infrae/testbrowser/tests/app.py RefactoringTool: Refactored ../python3/src/infrae/testbrowser/selenium/utils.py tEqual(list(browser.cookies.keys()), []) self.assertNotIn('food', browser.cookies) self.assertNotIn('drink', browser.cookies) browser.reload() @@ -110,6 +110,6 @@ browser.login('admin', 'admin') browser.logout() - self.assertEquals( + self.assertEqual( called, [('login', 'admin', 'admin'), ('logout',), ('close',)]) --- ../python3/src/infrae/testbrowser/tests/app.py (original) +++ ../python3/src/infrae/testbrowser/tests/app.py (refactored) @@ -3,10 +3,10 @@ # See also LICENSE.txt import os -import urlparse +import urllib.parse def encode(value): - if isinstance(value, unicode): + if isinstance(value, str): return value.encode('utf-8') return str(value) @@ -35,9 +35,7 @@ def test_app_headers(environ, start_response): start_response('200 Ok', [('Content-type', 'text/html'),]) - headers = map(lambda k: '
  • %s:%s
  • ' % (k, environ[k]), - filter(lambda k: k.startswith('HTTP_'), - environ.keys())) + headers = ['
  • %s:%s
  • ' % (k, environ[k]) for k in [k for k in list(environ.keys()) if k.startswith('HTTP_')]] return [''] @@ -81,12 +79,12 @@ def test_app_cookies_server(environ, start_response): headers = [('Content-type', 'text/html')] - if 'HTTP_COOKIE' not in environ.keys(): + if 'HTTP_COOKIE' not in list(environ.keys()): # No cookies, set cookies ! headers.append(('Set-Cookie', 'browser=testing;Path=/')) start_response('200 Ok', headers) yield '