<86>May 24 13:59:37 userdel[1365208]: delete user 'rooter' <86>May 24 13:59:37 userdel[1365208]: removed group 'rooter' owned by 'rooter' <86>May 24 13:59:37 groupadd[1365213]: group added to /etc/group: name=rooter, GID=663 <86>May 24 13:59:37 groupadd[1365213]: group added to /etc/gshadow: name=rooter <86>May 24 13:59:37 groupadd[1365213]: new group: name=rooter, GID=663 <86>May 24 13:59:37 useradd[1365217]: new user: name=rooter, UID=663, GID=663, home=/root, shell=/bin/bash <86>May 24 13:59:37 userdel[1365225]: delete user 'builder' <86>May 24 13:59:37 userdel[1365225]: removed group 'builder' owned by 'builder' <86>May 24 13:59:37 groupadd[1365230]: group added to /etc/group: name=builder, GID=664 <86>May 24 13:59:37 groupadd[1365230]: group added to /etc/gshadow: name=builder <86>May 24 13:59:37 groupadd[1365230]: new group: name=builder, GID=664 <86>May 24 13:59:37 useradd[1365236]: new user: name=builder, UID=664, GID=664, home=/usr/src, shell=/bin/bash <13>May 24 13:59:39 rpmi: libgdbm-1.8.3-alt10 1454943334 installed <13>May 24 13:59:39 rpmi: libexpat-2.2.4-alt1 1503305345 installed <13>May 24 13:59:39 rpmi: libp11-kit-0.23.15-alt1 sisyphus+226408.100.2.1 1554288204 installed <13>May 24 13:59:39 rpmi: libtasn1-4.14-alt1 p9+235792.100.2.1 1565425233 installed <13>May 24 13:59:39 rpmi: rpm-macros-alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>May 24 13:59:39 rpmi: alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>May 24 13:59:39 rpmi: ca-certificates-2020.01.23-alt1 p9+245253.100.3.1 1580749631 installed <13>May 24 13:59:39 rpmi: ca-trust-0.1.2-alt1 p9+233349.100.1.1 1561655062 installed <13>May 24 13:59:39 rpmi: p11-kit-trust-0.23.15-alt1 sisyphus+226408.100.2.1 1554288204 installed <13>May 24 13:59:39 rpmi: libcrypto1.1-1.1.1g-alt1 p9+250580.100.5.1 1588175266 installed <13>May 24 13:59:39 rpmi: libssl1.1-1.1.1g-alt1 p9+250580.100.5.1 1588175266 installed <13>May 24 13:59:39 rpmi: python3-3.7.4-alt3 p9+249932.100.2.1 1587127349 installed <13>May 24 13:59:39 rpmi: libpython3-3.7.4-alt3 p9+249932.100.2.1 1587127349 installed <13>May 24 13:59:40 rpmi: python3-base-3.7.4-alt3 p9+249932.100.2.1 1587127349 installed <13>May 24 13:59:40 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>May 24 13:59:40 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>May 24 13:59:44 rpmi: python3-module-six-1.12.0-alt1 sisyphus+219665.100.2.1 1548148570 installed <13>May 24 13:59:44 rpmi: python3-module-pluggy-0.11.0-alt1 sisyphus+229116.100.1.1 1557316655 installed <13>May 24 13:59:44 rpmi: python3-module-pkg_resources-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>May 24 13:59:44 rpmi: python3-module-more-itertools-7.0.0-alt3 sisyphus+226536.100.1.1 1554329928 installed <13>May 24 13:59:44 rpmi: python3-module-iniconfig-1.0.0-alt1 sisyphus+227494.1100.1.3 1555839106 installed <13>May 24 13:59:44 rpmi: python3-module-attrs-19.1.0-alt1 sisyphus+227473.2100.1.2 1555756986 installed <13>May 24 13:59:44 rpmi: python3-module-atomicwrites-1.3.0-alt1 sisyphus+227473.2000.1.3 1555763467 installed <13>May 24 13:59:44 rpmi: python3-module-apipkg-1.5-alt1 sisyphus+227465.1100.1.2 1555756555 installed <13>May 24 13:59:44 rpmi: python3-module-py-1.8.0-alt2 sisyphus+228349.1400.4.1 1556631070 installed <13>May 24 13:59:44 rpmi: python-module-iniconfig-1.0.0-alt1 sisyphus+227494.1100.1.3 1555839106 installed <13>May 24 13:59:44 rpmi: python-module-apipkg-1.5-alt1 1531926894 installed <13>May 24 13:59:44 rpmi: python-modules-curses-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>May 24 13:59:44 rpmi: libverto-0.3.0-alt1_7 sisyphus+225932.100.1.1 1553994919 installed <13>May 24 13:59:44 rpmi: libtinfo-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686226 installed <13>May 24 13:59:44 rpmi: libncurses-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686226 installed <13>May 24 13:59:44 rpmi: libkeyutils-1.6-alt2 sisyphus+226520.100.2.1 1554512089 installed <13>May 24 13:59:44 rpmi: libcom_err-1.44.6-alt1 sisyphus+224154.100.1.1 1552091678 installed <86>May 24 13:59:44 groupadd[1371305]: group added to /etc/group: name=_keytab, GID=499 <86>May 24 13:59:44 groupadd[1371305]: group added to /etc/gshadow: name=_keytab <86>May 24 13:59:44 groupadd[1371305]: new group: name=_keytab, GID=499 <13>May 24 13:59:44 rpmi: libkrb5-1.17.1-alt1 p9+242852.100.2.1 1576572639 installed <13>May 24 13:59:44 rpmi: libtirpc-1.0.3-alt1 1532008017 installed <13>May 24 13:59:44 rpmi: libnsl2-1.1.0-alt1_1 1511548749 installed <13>May 24 13:59:44 rpmi: python-modules-compiler-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>May 24 13:59:44 rpmi: python-modules-email-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>May 24 13:59:44 rpmi: python-modules-unittest-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>May 24 13:59:44 rpmi: python-modules-encodings-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>May 24 13:59:45 rpmi: python-modules-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>May 24 13:59:45 rpmi: python-modules-nis-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>May 24 13:59:45 rpmi: python-module-six-1.12.0-alt1 sisyphus+219665.100.2.1 1548148570 installed <13>May 24 13:59:45 rpmi: python-modules-ctypes-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>May 24 13:59:45 rpmi: python-modules-multiprocessing-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>May 24 13:59:45 rpmi: python-modules-logging-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>May 24 13:59:45 rpmi: python-module-more-itertools-1:5.0.0-alt2 sisyphus+226536.200.1.1 1554329977 installed <13>May 24 13:59:45 rpmi: python-modules-xml-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>May 24 13:59:45 rpmi: python-modules-hotshot-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>May 24 13:59:45 rpmi: python-modules-bsddb-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>May 24 13:59:45 rpmi: python-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>May 24 13:59:45 rpmi: python-strict-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867164 installed <13>May 24 13:59:45 rpmi: python-module-attrs-19.1.0-alt1 sisyphus+227473.2100.1.2 1555756986 installed <13>May 24 13:59:45 rpmi: python-modules-distutils-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>May 24 13:59:45 rpmi: python-module-atomicwrites-1.3.0-alt1 sisyphus+227473.2000.1.3 1555763467 installed <13>May 24 13:59:45 rpmi: python-module-funcsigs-1.0.2-alt2 sisyphus+228355.2600.2.1 1556560236 installed <13>May 24 13:59:45 rpmi: python-module-scandir-1.10.0-alt1 sisyphus+225192.100.1.2 1552968870 installed <13>May 24 13:59:45 rpmi: python-module-pathlib2-2.3.3-alt1 sisyphus+228364.300.4.1 1556886257 installed <13>May 24 13:59:45 rpmi: python-module-pkg_resources-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>May 24 13:59:45 rpmi: python-module-py-1.8.0-alt2 sisyphus+228349.1400.4.1 1556631070 installed <13>May 24 13:59:45 rpmi: python-modules-json-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>May 24 13:59:45 rpmi: python-module-pluggy-0.11.0-alt1 sisyphus+229116.100.1.1 1557316655 installed <13>May 24 13:59:45 rpmi: python-module-pytest-3.10.1-alt5 sisyphus+228366.2000.2.3 1556707871 installed <13>May 24 13:59:45 rpmi: python3-dev-3.7.4-alt3 p9+249932.100.2.1 1587127349 installed <13>May 24 13:59:45 rpmi: python3-module-pytest-3.10.1-alt5 sisyphus+228366.2000.2.3 1556707871 installed Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/python-module-llist-0.4-alt1.git20130101.1.1.1.nosrc.rpm <13>May 24 13:59:47 rpmi: python-tools-2to3-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>May 24 13:59:47 rpmi: libnsl2-devel-1.1.0-alt1_1 1511548749 installed <13>May 24 13:59:47 rpmi: python-dev-2.7.16-alt1.M90P.1 p9+244933.100.1.1 1579867218 installed <13>May 24 13:59:48 rpmi: python-module-setuptools-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>May 24 13:59:48 rpmi: python3-module-setuptools-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed Installing python-module-llist-0.4-alt1.git20130101.1.1.1.src.rpm Building target platforms: i586 Building for target i586 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.1537 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python-module-llist-0.4 + echo 'Source #0 (python-module-llist-0.4.tar):' Source #0 (python-module-llist-0.4.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/python-module-llist-0.4.tar + cd python-module-llist-0.4 + /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/tests/speed_test.py RefactoringTool: Refactored ../python3/tests/llist_test.py --- ../python3/tests/speed_test.py (original) +++ ../python3/tests/speed_test.py (refactored) @@ -43,12 +43,12 @@ for container in [deque, dllist, sllist]: for operation in [append, appendleft, pop, popleft, remove]: - c = container(range(num)) + c = container(list(range(num))) start = time.time() operation(c) elapsed = time.time() - start - print "Completed %s/%s in \t\t%.8f seconds:\t %.1f ops/sec" % ( + print("Completed %s/%s in \t\t%.8f seconds:\t %.1f ops/sec" % ( container.__name__, operation.__name__, elapsed, - num / elapsed) + num / elapsed)) --- ../python3/tests/llist_test.py (original) +++ ../python3/tests/llist_test.py (refactored) @@ -15,7 +15,7 @@ # python 3 compatibility wrappers def py23_xrange(*args): - return range(*args) + return list(range(*args)) def py23_range(*args): return list(range(*args)) @@ -32,10 +32,10 @@ # python 2 compatibility wrappers def py23_xrange(*args): - return xrange(*args) + return range(*args) def py23_range(*args): - return range(*args) + return list(range(*args)) @@ -330,8 +330,8 @@ new_node = ll.insertafter(arg_node, ll.nodeat(2)) self.assertNotEqual(new_node, arg_node) self.assertEqual(new_node.value, 10) - self.assertEqual(new_node.next, next) - self.assertEqual(prev.next, new_node) + self.assertEqual(new_node.__next__, next) + self.assertEqual(prev.__next__, new_node) self.assertEqual(ll, ref) def test_insert_value_after_last(self): @@ -342,8 +342,8 @@ new_node = ll.insertafter(arg_node, ll.nodeat(-1)) self.assertNotEqual(new_node, arg_node) self.assertEqual(new_node.value, 10) - self.assertEqual(new_node.next, None) - self.assertEqual(prev.next, new_node) + self.assertEqual(new_node.__next__, None) + self.assertEqual(prev.__next__, new_node) self.assertEqual(new_node, ll.last) self.assertEqual(ll, ref) @@ -356,8 +356,8 @@ new_node = ll.insertbefore(arg_node, ll.nodeat(2)) self.assertNotEqual(new_node, arg_node) self.assertEqual(new_node.value, 10) - self.assertEqual(new_node.next, next) - self.assertEqual(prev.next, new_node) + self.assertEqual(new_node.__next__, next) + self.assertEqual(prev.__next__, new_node) self.assertEqual(ll, ref) def test_insert_value_before_first(self): @@ -368,7 +368,7 @@ new_node = ll.insertbefore(arg_node, ll.nodeat(0)) self.assertNotEqual(new_node, arg_node) self.assertEqual(new_node.value, 10) - self.assertEqual(new_node.next, next) + self.assertEqual(new_node.__next__, next) self.assertEqual(new_node, ll.first) self.assertEqual(ll, ref) @@ -391,8 +391,8 @@ new_node = ll.append(arg_node) self.assertNotEqual(new_node, arg_node) self.assertEqual(new_node.value, 10) - self.assertEqual(new_node.next, None) - self.assertEqual(prev.next, new_node) + self.assertEqual(new_node.__next__, None) + self.assertEqual(prev.__next__, new_node) self.assertEqual(ll.last, new_node) self.assertEqual(ll, ref) @@ -404,7 +404,7 @@ new_node = ll.appendleft(arg_node) self.assertNotEqual(new_node, arg_node) self.assertEqual(new_node.value, 10) - self.assertEqual(new_node.next, next) + self.assertEqual(new_node.__next__, next) self.assertEqual(ll.first, new_node) self.assertEqual(ll, ref) @@ -416,8 +416,8 @@ new_node = ll.appendright(arg_node) self.assertNotEqual(new_node, arg_node) self.assertEqual(new_node.value, 10) - self.assertEqual(new_node.next, None) - self.assertEqual(prev.next, new_node) + self.assertEqual(new_node.__next__, None) + self.assertEqual(prev.__next__, new_node) self.assertEqual(ll.last, new_node) self.assertEqual(ll, ref) @@ -539,7 +539,7 @@ self.assertEqual(ll.last, None) self.assertEqual(ll.size, 0) self.assertEqual(list(ll), []) - self.assertEqual(del_node.next, None) + self.assertEqual(del_node.__next__, None) def test_pop(self): ref = py23_range(0, 1024, 4) @@ -551,7 +551,7 @@ self.assertEqual(ll.size, len(ref) - 1) self.assertEqual(ll.last.value, ref[-2]) self.assertEqual(list(ll), ref[:-1]) - self.assertEqual(del_node.next, None) + self.assertEqual(del_node.__next__, None) def test_popleft(self): ref = py23_range(0, 1024, 4) @@ -563,7 +563,7 @@ self.assertEqual(ll.size, len(ref) - 1) self.assertEqual(ll.first.value, ref[1]) self.assertEqual(list(ll), ref[1:]) - self.assertEqual(del_node.next, None) + self.assertEqual(del_node.__next__, None) def test_popright(self): ref = py23_range(0, 1024, 4) @@ -575,7 +575,7 @@ self.assertEqual(ll.size, len(ref) - 1) self.assertEqual(ll.last.value, ref[-2]) self.assertEqual(list(ll), ref[:-1]) - self.assertEqual(del_node.next, None) + self.assertEqual(del_node.__next__, None) def test_pop_from_empty_list(self): ll = sllist() @@ -596,8 +596,8 @@ self.assertEqual(result, ref_result) self.assertEqual(len(ll), len(ref)) self.assertEqual(ll.size, len(ref)) - self.assertEqual(prev_node.next, next_node) - self.assertEqual(del_node.next, None) + self.assertEqual(prev_node.__next__, next_node) + self.assertEqual(del_node.__next__, None) def test_remove_from_empty_list(self): ll = sllist() @@ -626,7 +626,7 @@ self.assertEqual(ll.first, new_first) self.assertEqual(ll.last, new_last) self.assertEqual(ll.size, len(ref)) - self.assertEqual(ll.last.next, None) + self.assertEqual(ll.last.__next__, None) def test_rotate_right(self): for n in py23_xrange(128): @@ -642,7 +642,7 @@ self.assertEqual(ll.first, new_first) self.assertEqual(ll.last, new_last) self.assertEqual(ll.size, len(ref)) - self.assertEqual(ll.last.next, None) + self.assertEqual(ll.last.__next__, None) def test_rotate_left_empty(self): for n in py23_xrange(4): @@ -1055,8 +1055,8 @@ self.assertNotEqual(new_node, arg_node) self.assertEqual(new_node.value, 10) self.assertEqual(new_node.prev, prev) - self.assertEqual(new_node.next, None) - self.assertEqual(prev.next, new_node) + self.assertEqual(new_node.__next__, None) + self.assertEqual(prev.__next__, new_node) self.assertEqual(new_node, ll.last) self.assertEqual(ll, ref) @@ -1070,8 +1070,8 @@ self.assertNotEqual(new_node, arg_node) self.assertEqual(new_node.value, 10) self.assertEqual(new_node.prev, prev) - self.assertEqual(new_node.next, next) - self.assertEqual(prev.next, new_node) + self.assertEqual(new_node.__next__, next) + self.assertEqual(prev.__next__, new_node) self.assertEqual(next.prev, new_node) self.assertEqual(ll, ref) @@ -1084,7 +1084,7 @@ self.assertNotEqual(new_node, arg_node) self.assertEqual(new_node.value, 10) self.assertEqual(new_node.prev, None) - self.assertEqual(new_node.next, next) + self.assertEqual(new_node.__next__, next) self.assertEqual(next.prev, new_node) self.assertEqual(new_node, ll.first) self.assertEqual(ll, ref) @@ -1105,8 +1105,8 @@ self.assertNotEqual(new_node, arg_node) self.assertEqual(new_node.value, 10); self.assertEqual(new_node.prev, prev) - self.assertEqual(new_node.next, None) - self.assertEqual(prev.next, new_node) + self.assertEqual(new_node.__next__, None) + self.asRefactoringTool: No changes to ../python3/setup.py RefactoringTool: Refactored ../python3/examples/lucky_numbers.py sertEqual(prev.__next__, new_node) self.assertEqual(ll.last, new_node) self.assertEqual(ll, ref) @@ -1119,7 +1119,7 @@ self.assertNotEqual(new_node, arg_node) self.assertEqual(new_node.value, 10); self.assertEqual(new_node.prev, None) - self.assertEqual(new_node.next, next) + self.assertEqual(new_node.__next__, next) self.assertEqual(next.prev, new_node) self.assertEqual(ll.first, new_node) self.assertEqual(ll, ref) @@ -1133,8 +1133,8 @@ self.assertNotEqual(new_node, arg_node) self.assertEqual(new_node.value, 10); self.assertEqual(new_node.prev, prev) - self.assertEqual(new_node.next, None) - self.assertEqual(prev.next, new_node) + self.assertEqual(new_node.__next__, None) + self.assertEqual(prev.__next__, new_node) self.assertEqual(ll.last, new_node) self.assertEqual(ll, ref) @@ -1257,7 +1257,7 @@ self.assertEqual(ll.size, 0) self.assertEqual(list(ll), []) self.assertEqual(del_node.prev, None) - self.assertEqual(del_node.next, None) + self.assertEqual(del_node.__next__, None) def test_pop(self): ref = py23_range(0, 1024, 4) @@ -1270,7 +1270,7 @@ self.assertEqual(ll.last.value, ref[-2]) self.assertEqual(list(ll), ref[:-1]) self.assertEqual(del_node.prev, None) - self.assertEqual(del_node.next, None) + self.assertEqual(del_node.__next__, None) def test_popleft(self): ref = py23_range(0, 1024, 4) @@ -1283,7 +1283,7 @@ self.assertEqual(ll.first.value, ref[1]) self.assertEqual(list(ll), ref[1:]) self.assertEqual(del_node.prev, None) - self.assertEqual(del_node.next, None) + self.assertEqual(del_node.__next__, None) def test_popright(self): ref = py23_range(0, 1024, 4) @@ -1296,7 +1296,7 @@ self.assertEqual(ll.last.value, ref[-2]) self.assertEqual(list(ll), ref[:-1]) self.assertEqual(del_node.prev, None) - self.assertEqual(del_node.next, None) + self.assertEqual(del_node.__next__, None) def test_pop_from_empty_list(self): ll = dllist() @@ -1317,10 +1317,10 @@ self.assertEqual(result, ref_result) self.assertEqual(len(ll), len(ref)) self.assertEqual(ll.size, len(ref)) - self.assertEqual(prev_node.next, next_node) + self.assertEqual(prev_node.__next__, next_node) self.assertEqual(next_node.prev, prev_node) self.assertEqual(del_node.prev, None) - self.assertEqual(del_node.next, None) + self.assertEqual(del_node.__next__, None) def test_remove_from_empty_list(self): ll = dllist() @@ -1354,8 +1354,8 @@ self.assertEqual(ll.size, len(ref)) self.assertEqual(ll.first.prev, None) self.assertEqual(ll.first.next.prev, ll.first) - self.assertEqual(ll.last.next, None) - self.assertEqual(ll.last.prev.next, ll.last) + self.assertEqual(ll.last.__next__, None) + self.assertEqual(ll.last.prev.__next__, ll.last) # check if cached index is updated correctly self.assertEqual(ll[len(ll) // 2], ref_result[len(ref_result) // 2]) @@ -1378,8 +1378,8 @@ self.assertEqual(ll.size, len(ref)) self.assertEqual(ll.first.prev, None) self.assertEqual(ll.first.next.prev, ll.first) - self.assertEqual(ll.last.next, None) - self.assertEqual(ll.last.prev.next, ll.last) + self.assertEqual(ll.last.__next__, None) + self.assertEqual(ll.last.prev.__next__, ll.last) # check if cached index is updated correctly self.assertEqual(ll[len(ll) // 2], ref_result[len(ref_result) // 2]) --- ../python3/examples/lucky_numbers.py (original) +++ ../python3/examples/lucky_numbers.py (refactored) @@ -16,7 +16,7 @@ def generate_lucky_deque(max_num): - lucky_numbers = deque(xrange(1, max_num RefactoringTool: Refactored ../python3/docs/conf.py WARNING: couldn't encode ../python3/docs/conf.py's diff for your terminal RefactoringTool: Files that were modified: RefactoringTool: ../python3/tests/speed_test.py RefactoringTool: ../python3/tests/llist_test.py RefactoringTool: ../python3/setup.py RefactoringTool: ../python3/examples/lucky_numbers.py RefactoringTool: ../python3/docs/conf.py + 1, 2)) + lucky_numbers = deque(range(1, max_num + 1, 2)) multiple_node = lucky_numbers[1] multiple_pos = 2 @@ -38,7 +38,7 @@ def generate_lucky_list(max_num): - lucky_numbers = dllist(xrange(1, max_num + 1, 2)) + lucky_numbers = dllist(range(1, max_num + 1, 2)) multiple_node = lucky_numbers.nodeat(1) @@ -52,7 +52,7 @@ del lucky_numbers[removed_pos] removed_pos += removed_multiple - 1 - multiple_node = multiple_node.next + multiple_node = multiple_node.__next__ return lucky_numbers @@ -65,17 +65,17 @@ if __name__ == '__main__': - print 'Calculating lucky numbers using deque...', + print('Calculating lucky numbers using deque...', end=' ') sys.stdout.flush() result_deque, time_deque = time_execution(lambda: generate_lucky_deque(N)) - print '%gs' % time_deque + print('%gs' % time_deque) - print 'Calculating lucky numbers using dllist...', + print('Calculating lucky numbers using dllist...', end=' ') sys.stdout.flush() result_list, time_list = time_execution(lambda: generate_lucky_list(N)) - print '%gs' % time_list + print('%gs' % time_list) if list(result_deque) == list(result_list): - print 'Both results are equal.' + print('Both results are equal.') else: - print 'Results differ, you might have found a bug!' + print('Results differ, you might have found a bug!') --- ../python3/docs/conf.py (original) +++ ../python3/docs/conf.py (refactored) @@ -40,8 +40,8 @@ master_doc = 'index' # General information about the project. -project = u'llist' + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.45174 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python-module-llist-0.4 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fno-strict-aliasing' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fno-strict-aliasing' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fno-strict-aliasing' + export FFLAGS + /usr/bin/python setup.py build --debug running build running build_ext building 'llist' extension creating build creating build/temp.linux-i686-2.7 creating build/temp.linux-i686-2.7/src 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 -fno-strict-aliasing -fPIC -g -I/usr/include/python2.7 -c src/llist.c -o build/temp.linux-i686-2.7/src/llist.o 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 -fno-strict-aliasing -fPIC -g -I/usr/include/python2.7 -c src/dllist.c -o build/temp.linux-i686-2.7/src/dllist.o src/dllist.c:1306:1: warning: missing braces around initializer [-Wmissing-braces] { ^ dllist_len, /* sq_length */ { src/dllist.c:1317:1: }; } 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 -fno-strict-aliasing -fPIC -g -I/usr/include/python2.7 -c src/sllist.c -o build/temp.linux-i686-2.7/src/sllist.o creating build/lib.linux-i686-2.7 i586-alt-linux-gcc -pthread -shared -L/usr/lib/nsl -lnsl -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fno-strict-aliasing -g build/temp.linux-i686-2.7/src/llist.o build/temp.linux-i686-2.7/src/dllist.o build/temp.linux-i686-2.7/src/sllist.o -lpython2.7 -o build/lib.linux-i686-2.7/llist.so + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/python-module-llist-0.4 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fno-strict-aliasing' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fno-strict-aliasing' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fno-strict-aliasing' + export FFLAGS + /usr/bin/python3 setup.py build --debug running build running build_ext building 'llist' extension creating build creating build/temp.linux-i686-3.7 creating build/temp.linux-i686-3.7/src i586-alt-linux-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -pipe -frecord-gcc-switches -Wall -g -O3 -march=i586 -mtune=generic -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fno-strict-aliasing -fPIC -g -I/usr/include/python3.7m -c src/llist.c -o build/temp.linux-i686-3.7/src/llist.o i586-alt-linux-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -pipe -frecord-gcc-switches -Wall -g -O3 -march=i586 -mtune=generic -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fno-strict-aliasing -fPIC -g -I/usr/include/python3.7m -c src/dllist.c -o build/temp.linux-i686-3.7/src/dllist.o src/dllist.c:1306:1: warning: missing braces around initializer [-Wmissing-braces] { ^ dllist_len, /* sq_length */ { src/dllist.c:1317:1: }; } i586-alt-linux-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -pipe -frecord-gcc-switches -Wall -g -O3 -march=i586 -mtune=generic -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fno-strict-aliasing -fPIC -g -I/usr/include/python3.7m -c src/sllist.c -o build/temp.linux-i686-3.7/src/sllist.o creating build/lib.linux-i686-3.7 i586-alt-linux-gcc -pthread -shared -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fno-strict-aliasing -g build/temp.linux-i686-3.7/src/llist.o build/temp.linux-i686-3.7/src/dllist.o build/temp.linux-i686-3.7/src/sllist.o -L/usr/lib -lpython3.7m -o build/lib.linux-i686-3.7/llist.cpython-37m.so + popd ~/RPM/BUILD/python-module-llist-0.4 + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.65359 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python-module-llist-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python-module-llist-buildroot + cd python-module-llist-0.4 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fno-strict-aliasing' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fno-strict-aliasing' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fno-strict-aliasing' + export FFLAGS + /usr/bin/python setup.py install --skip-build --root=/usr/src/tmp/python-module-llist-buildroot --force running install running install_lib creating /usr/src/tmp/python-module-llist-buildroot creating /usr/src/tmp/python-module-llist-buildroot/usr creating /usr/src/tmp/python-module-llist-buildroot/usr/lib creating /usr/src/tmp/python-module-llist-buildroot/usr/lib/python2.7 creating /usr/src/tmp/python-module-llist-buildroot/usr/lib/python2.7/site-packages copying build/lib.linux-i686-2.7/llist.so -> /usr/src/tmp/python-module-llist-buildroot/usr/lib/python2.7/site-packages running install_egg_info Writing /usr/src/tmp/python-module-llist-buildroot/usr/lib/python2.7/site-packages/llist-0.4-py2.7.egg-info + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/python-module-llist-0.4 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fno-strict-aliasing' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fno-strict-aliasing' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fno-strict-aliasing' + export FFLAGS + /usr/bin/python3 setup.py install --skip-build --root=/usr/src/tmp/python-module-llist-buildroot --force running install running install_lib creating /usr/src/tmp/python-module-llist-buildroot/usr/lib/python3 creating /usr/src/tmp/python-module-llist-buildroot/usr/lib/python3/site-packages copying build/lib.linux-i686-3.7/llist.cpython-37m.so -> /usr/src/tmp/python-module-llist-buildroot/usr/lib/python3/site-packages running install_egg_info Writing /usr/src/tmp/python-module-llist-buildroot/usr/lib/python3/site-packages/llist-0.4-py3.7.egg-info + popd ~/RPM/BUILD/python-module-llist-0.4 + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python-module-llist-buildroot (auto) mode of './usr/lib/python3/site-packages/llist.cpython-37m.so' changed from 0755 (rwxr-xr-x) to 0644 (rw-r--r--) mode of './usr/lib/python2.7/site-packages/llist.so' changed from 0755 (rwxr-xr-x) to 0644 (rw-r--r--) Verifying and fixing files in /usr/src/tmp/python-module-llist-buildroot (binconfig,pkgconfig,libtool,desktop) Checking contents of files in /usr/src/tmp/python-module-llist-buildroot/ (default) Compressing files in /usr/src/tmp/python-module-llist-buildroot (auto) Adjusting library links in /usr/src/tmp/python-module-llist-buildroot ./usr/lib: Verifying ELF objects in /usr/src/tmp/python-module-llist-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal) Hardlinking identical .pyc and .opt-?.pyc files Hardlinking identical .pyc and .pyo files Executing(%check): /bin/sh -e /usr/src/tmp/rpm-tmp.51087 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python-module-llist-0.4 + export PYTHONPATH=/usr/src/tmp/python-module-llist-buildroot/usr/lib/python2.7/site-packages + PYTHONPATH=/usr/src/tmp/python-module-llist-buildroot/usr/lib/python2.7/site-packages + py.test ============================= test session starts ============================== platform linux2 -- Python 2.7.16, pytest-3.10.1, py-1.8.0, pluggy-0.11.0 rootdir: /usr/src/RPM/BUILD/python-module-llist-0.4, inifile: gc: collecting generation 1... gc: objects in each generation: 841 0 23442 gc: done, 21 unreachable, 0 uncollectable, 0.0003s elapsed. gc: collecting generation 0... gc: objects in each generation: 431 0 24053 gc: done, 0.0001s elapsed. gc: collecting generation 0... gc: objects in each generation: 486 422 24013 gc: done, 21 unreachable, 0 uncollectable, 0.0002s elapsed. gc: collecting generation 0... gc: objects in each generation: 434 870 24013 gc: done, 0.0001s elapsed. gc: collecting generation 0... gc: objects in each generation: 622 1251 23998 gc: done, 475 unreachable, 0 uncollectable, 0.0003s elapsed. gc: collecting generation 0... gc: objects in each generation: 806 1364 23998 gc: done, 332 unreachable, 0 uncollectable, 0.0004s elapsed. gc: collecting generation 0... gc: objects in each generation: 789 1820 23998 gc: done, 392 unreachable, 0 uncollectable, 0.0003s elapsed. collected 134 items tests/llist_test.py .................................................... [ 38%] .................................................................gc: collecting generation 0... gc: objects in each generation: 887 3317 23909 gc: done, 0.0002s elapsed. ....... [ 92%] .......... [100%] ========================== 134 passed in 5.40 seconds ========================== gc: collecting generation 2... gc: objects in each generation: 344 3961 23842 gc: done, 1155 unreachable, 0 uncollectable, 0.0115s elapsed. + exit 0 Processing files: python-module-llist-0.4-alt1.git20130101.1.1.1 Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.7164 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python-module-llist-0.4 + DOCDIR=/usr/src/tmp/python-module-llist-buildroot/usr/share/doc/python-module-llist-0.4 + export DOCDIR + rm -rf /usr/src/tmp/python-module-llist-buildroot/usr/share/doc/python-module-llist-0.4 + /bin/mkdir -p /usr/src/tmp/python-module-llist-buildroot/usr/share/doc/python-module-llist-0.4 + cp -prL CHANGES README docs/index.rst examples /usr/src/tmp/python-module-llist-buildroot/usr/share/doc/python-module-llist-0.4 + chmod -R go-w /usr/src/tmp/python-module-llist-buildroot/usr/share/doc/python-module-llist-0.4 + chmod -R a+rX /usr/src/tmp/python-module-llist-buildroot/usr/share/doc/python-module-llist-0.4 + exit 0 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.9vN4YB find-provides: running scripts (alternatives,debuginfo,lib,pam,perl,pkgconfig,python,python3,shell) Finding Requires (using /usr/lib/rpm/find-requires) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.aAzO9v find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks,systemd-services) Provides: python2.7(llist) Requires: /usr/lib/python2.7/site-packages, libc.so.6(GLIBC_2.1.3), libc.so.6(GLIBC_2.4), libpython2.7.so.1.0 >= set:oiYNdDZFyqHOgw0p6VwwSNitrZ5NK0JZ5ViAClu8IJ5LScIUsHZyExLz0yF7MbJsMEes9YtconKNt1AQh5ZooxOzZxNZgG0mmLS2uE6, rtld(GNU_HASH) Requires(rpmlib): rpmlib(SetVersions) Finding debuginfo files (using /usr/lib/rpm/find-debuginfo-files) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.ECW2s0 Creating python-module-llist-debuginfo package Processing files: python3-module-llist-0.4-alt1.git20130101.1.1.1 Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.10230 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python-module-llist-0.4 + DOCDIR=/usr/src/tmp/python-module-llist-buildroot/usr/share/doc/python3-module-llist-0.4 + export DOCDIR + rm -rf /usr/src/tmp/python-module-llist-buildroot/usr/share/doc/python3-module-llist-0.4 + /bin/mkdir -p /usr/src/tmp/python-module-llist-buildroot/usr/share/doc/python3-module-llist-0.4 + cp -prL CHANGES README docs/index.rst examples /usr/src/tmp/python-module-llist-buildroot/usr/share/doc/python3-module-llist-0.4 + chmod -R go-w /usr/src/tmp/python-module-llist-buildroot/usr/share/doc/python3-module-llist-0.4 + chmod -R a+rX /usr/src/tmp/python-module-llist-buildroot/usr/share/doc/python3-module-llist-0.4 + exit 0 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.WGAfaV find-provides: running scripts (alternatives,debuginfo,lib,pam,perl,pkgconfig,python,python3,shell) Finding Requires (using /usr/lib/rpm/find-requires) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.lcRcdY find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks,systemd-services) Provides: python3(llist) Requires: /usr/lib/python3/site-packages, libc.so.6(GLIBC_2.1.3), libc.so.6(GLIBC_2.4), libpython3.7m.so.1.0 >= set:oiYNdDZF5zrzyOYEcZGysggXoJM3mz9Fl65ENafcczvWAURCx57KfUX8woW1Yib7cG3n2v73SBrsn09t4Y8tNZEovghL1qXjwqq0, python3.7-ABI, rtld(GNU_HASH) Requires(rpmlib): rpmlib(SetVersions) Finding debuginfo files (using /usr/lib/rpm/find-debuginfo-files) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.28NUrP Creating python3-module-llist-debuginfo package Processing files: python-module-llist-debuginfo-0.4-alt1.git20130101.1.1.1 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.kYtsQp find-provides: running scripts (debuginfo) Finding Requires (using /usr/lib/rpm/find-requires) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.EYrkiA find-requires: running scripts (debuginfo) Requires: python-module-llist = 0.4-alt1.git20130101.1.1.1, debug(libc.so.6), debug(libpython2.7.so.1.0) Processing files: python3-module-llist-debuginfo-0.4-alt1.git20130101.1.1.1 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.RKfVAD find-provides: running scripts (debuginfo) Finding Requires (using /usr/lib/rpm/find-requires) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.5Daux8 find-requires: running scripts (debuginfo) Requires: python3-module-llist = 0.4-alt1.git20130101.1.1.1, debug(libc.so.6), debug(libpython3.7m.so.1.0) Adding to python-module-llist-debuginfo a strict dependency on python-module-llist Adding to python3-module-llist-debuginfo a strict dependency on python3-module-llist Wrote: /usr/src/RPM/RPMS/i586/python-module-llist-0.4-alt1.git20130101.1.1.1.i586.rpm Wrote: /usr/src/RPM/RPMS/i586/python3-module-llist-0.4-alt1.git20130101.1.1.1.i586.rpm Wrote: /usr/src/RPM/RPMS/i586/python-module-llist-debuginfo-0.4-alt1.git20130101.1.1.1.i586.rpm Wrote: /usr/src/RPM/RPMS/i586/python3-module-llist-debuginfo-0.4-alt1.git20130101.1.1.1.i586.rpm 20.87user 1.59system 1:06.25elapsed 33%CPU (0avgtext+0avgdata 32396maxresident)k 0inputs+0outputs (0major+435458minor)pagefaults 0swaps 29.05user 5.39system 1:22.40elapsed 41%CPU (0avgtext+0avgdata 115520maxresident)k 0inputs+0outputs (0major+979698minor)pagefaults 0swaps --- python-module-llist-0.4-alt1.git20130101.1.1.1.i586.rpm.repo 2019-04-15 00:44:47.000000000 +0000 +++ python-module-llist-0.4-alt1.git20130101.1.1.1.i586.rpm.hasher 2020-05-24 14:00:58.526621974 +0000 @@ -9,2 +9,4 @@ Requires: /usr/lib/python2.7/site-packages +Requires: libc.so.6(GLIBC_2.1.3) +Requires: libc.so.6(GLIBC_2.4) Requires: libpython2.7.so.1.0 >= set:oiYNdDZFyqHOgw0p6VwwSNitrZ5NK0JZ5ViAClu8IJ5LScIUsHZyExLz0yF7MbJsMEes9YtconKNt1AQh5ZooxOzZxNZgG0mmLS2uE6 --- python-module-llist-debuginfo-0.4-alt1.git20130101.1.1.1.i586.rpm.repo 2019-04-15 00:44:47.000000000 +0000 +++ python-module-llist-debuginfo-0.4-alt1.git20130101.1.1.1.i586.rpm.hasher 2020-05-24 14:00:58.567621880 +0000 @@ -10,2 +10,3 @@ /usr/src/debug/python-module-llist-0.4/src/sllist.h 100644 +Requires: debug(libc.so.6) Requires: debug(libpython2.7.so.1.0) --- python3-module-llist-0.4-alt1.git20130101.1.1.1.i586.rpm.repo 2019-04-15 00:44:47.000000000 +0000 +++ python3-module-llist-0.4-alt1.git20130101.1.1.1.i586.rpm.hasher 2020-05-24 14:00:58.653621683 +0000 @@ -9,2 +9,4 @@ Requires: /usr/lib/python3/site-packages +Requires: libc.so.6(GLIBC_2.1.3) +Requires: libc.so.6(GLIBC_2.4) Requires: libpython3.7m.so.1.0 >= set:oiYNdDZF5zrzyOYEcZGysggXoJM3mz9Fl65ENafcczvWAURCx57KfUX8woW1Yib7cG3n2v73SBrsn09t4Y8tNZEovghL1qXjwqq0 --- python3-module-llist-debuginfo-0.4-alt1.git20130101.1.1.1.i586.rpm.repo 2019-04-15 00:44:47.000000000 +0000 +++ python3-module-llist-debuginfo-0.4-alt1.git20130101.1.1.1.i586.rpm.hasher 2020-05-24 14:00:58.769621416 +0000 @@ -10,2 +10,3 @@ /usr/src/debug/python3/src/sllist.h 100644 +Requires: debug(libc.so.6) Requires: debug(libpython3.7m.so.1.0)