<86>Apr 1 01:44:32 userdel[12431]: delete user 'rooter' <86>Apr 1 01:44:32 userdel[12431]: removed shadow group 'rooter' owned by 'rooter' <86>Apr 1 01:44:32 groupadd[12441]: group added to /etc/group: name=rooter, GID=609 <86>Apr 1 01:44:32 groupadd[12441]: group added to /etc/gshadow: name=rooter <86>Apr 1 01:44:32 groupadd[12441]: new group: name=rooter, GID=609 <86>Apr 1 01:44:32 useradd[12447]: new user: name=rooter, UID=609, GID=609, home=/root, shell=/bin/bash <86>Apr 1 01:44:32 userdel[12455]: delete user 'builder' <86>Apr 1 01:44:32 userdel[12455]: removed group 'builder' owned by 'builder' <86>Apr 1 01:44:32 userdel[12455]: removed shadow group 'builder' owned by 'builder' <86>Apr 1 01:44:32 groupadd[12460]: group added to /etc/group: name=builder, GID=610 <86>Apr 1 01:44:32 groupadd[12460]: group added to /etc/gshadow: name=builder <86>Apr 1 01:44:32 groupadd[12460]: new group: name=builder, GID=610 <86>Apr 1 01:44:32 useradd[12464]: new user: name=builder, UID=610, GID=610, home=/usr/src, shell=/bin/bash <13>Apr 1 01:44:35 rpmi: libgdbm-1.8.3-alt10 1454943313 installed <13>Apr 1 01:44:35 rpmi: libexpat-2.2.4-alt1 1503305341 installed <13>Apr 1 01:44:35 rpmi: libtasn1-4.13-alt2 1521133848 installed <13>Apr 1 01:44:35 rpmi: libp11-kit-0.23.9-alt5 1525798241 installed <13>Apr 1 01:44:35 rpmi: rpm-macros-alternatives-0.5.0-alt1 sisyphus+221902.300.4.1 1550587121 installed <13>Apr 1 01:44:35 rpmi: alternatives-0.5.0-alt1 sisyphus+221902.300.4.1 1550587121 installed <13>Apr 1 01:44:35 rpmi: ca-certificates-2019.02.01-alt1 sisyphus+220384.200.1.1 1549032756 installed <13>Apr 1 01:44:35 rpmi: ca-trust-0.1.1-alt2 1515595785 installed <13>Apr 1 01:44:35 rpmi: p11-kit-trust-0.23.9-alt5 1525798241 installed <13>Apr 1 01:44:35 rpmi: libcrypto1.1-1.1.1b-alt1 sisyphus+225327.200.2.1 1553099246 installed <13>Apr 1 01:44:36 rpmi: libssl1.1-1.1.1b-alt1 sisyphus+225327.200.2.1 1553099246 installed <13>Apr 1 01:44:36 rpmi: python3-3.6.8-alt1 sisyphus+220164.200.3.1 1548842470 installed <13>Apr 1 01:44:36 rpmi: python3-base-3.6.8-alt1 sisyphus+220164.200.3.1 1548842470 installed <13>Apr 1 01:44:36 rpmi: libpython3-3.6.8-alt1 sisyphus+220164.200.3.1 1548842470 installed <13>Apr 1 01:44:36 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>Apr 1 01:44:36 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>Apr 1 01:44:41 rpmi: python3-module-six-1.12.0-alt1 sisyphus+219665.100.2.1 1548148570 installed <13>Apr 1 01:44:41 rpmi: python3-module-more-itertools-5.0.0-alt1 sisyphus.218699.100 1545980609 installed <13>Apr 1 01:44:41 rpmi: python3-module-pluggy-0.9.0-alt1 sisyphus+225174.100.1.1 1552829122 installed <13>Apr 1 01:44:41 rpmi: python3-module-pkg_resources-1:40.8.0-alt1 sisyphus+221229.100.2.1 1550559950 installed <13>Apr 1 01:44:41 rpmi: python3-module-iniconfig-1.0.0-alt1 sisyphus+225153.100.1.1 1552826442 installed <13>Apr 1 01:44:41 rpmi: python3-module-attrs-19.1.0-alt1 sisyphus+224963.100.1.1 1552501935 installed <13>Apr 1 01:44:41 rpmi: python3-module-atomicwrites-1.3.0-alt1 sisyphus+221237.100.1.2 1549921064 installed <13>Apr 1 01:44:41 rpmi: python3-module-apipkg-1.5-alt1 1531926938 installed <13>Apr 1 01:44:41 rpmi: python3-module-py-1.8.0-alt2 sisyphus+225173.100.1.1 1552828593 installed <13>Apr 1 01:44:41 rpmi: python-module-iniconfig-1.0.0-alt1 sisyphus+225153.100.1.1 1552826442 installed <13>Apr 1 01:44:41 rpmi: python-module-apipkg-1.5-alt1 1531926894 installed <13>Apr 1 01:44:41 rpmi: python-modules-curses-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:41 rpmi: libverto-0.3.0-alt1_7 sisyphus+225932.100.1.1 1553994917 installed <13>Apr 1 01:44:41 rpmi: libtinfo-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686221 installed <13>Apr 1 01:44:41 rpmi: libncurses-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686221 installed <13>Apr 1 01:44:41 rpmi: libkeyutils-1.6-alt2 sisyphus.217337.100 1544003165 installed <13>Apr 1 01:44:41 rpmi: libcom_err-1.44.6-alt1 sisyphus+224154.100.1.1 1552091653 installed <86>Apr 1 01:44:41 groupadd[23867]: group added to /etc/group: name=_keytab, GID=499 <86>Apr 1 01:44:41 groupadd[23867]: group added to /etc/gshadow: name=_keytab <86>Apr 1 01:44:41 groupadd[23867]: new group: name=_keytab, GID=499 <13>Apr 1 01:44:41 rpmi: libkrb5-1.16.3-alt1 sisyphus+223678.100.1.1 1551746443 installed <13>Apr 1 01:44:41 rpmi: libtirpc-1.0.3-alt1 1532008015 installed <13>Apr 1 01:44:41 rpmi: libnsl2-1.1.0-alt1_1 1511548748 installed <13>Apr 1 01:44:41 rpmi: python-modules-compiler-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:41 rpmi: python-modules-email-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:41 rpmi: python-modules-unittest-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:41 rpmi: python-modules-encodings-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:42 rpmi: python-modules-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:42 rpmi: python-modules-nis-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:42 rpmi: python-module-six-1.12.0-alt1 sisyphus+219665.100.2.1 1548148570 installed <13>Apr 1 01:44:42 rpmi: python-modules-ctypes-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:42 rpmi: python-modules-multiprocessing-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:42 rpmi: python-modules-logging-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:42 rpmi: python-module-more-itertools-5.0.0-alt1 sisyphus.218699.100 1545980609 installed <13>Apr 1 01:44:42 rpmi: python-modules-xml-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:42 rpmi: python-modules-hotshot-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:42 rpmi: python-modules-bsddb-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:42 rpmi: python-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:42 rpmi: python-strict-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:42 rpmi: python-module-attrs-19.1.0-alt1 sisyphus+224963.100.1.1 1552501935 installed <13>Apr 1 01:44:42 rpmi: python-modules-distutils-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:42 rpmi: python-module-atomicwrites-1.3.0-alt1 sisyphus+221237.100.1.2 1549921064 installed <13>Apr 1 01:44:42 rpmi: python-module-funcsigs-1.0.2-alt2 sisyphus+220258.100.1.1 1548882900 installed <13>Apr 1 01:44:42 rpmi: python-module-scandir-1.10.0-alt1 sisyphus+225192.100.1.2 1552968852 installed <13>Apr 1 01:44:42 rpmi: python-module-pathlib2-2.3.3-alt1 sisyphus.218098.100 1545218863 installed <13>Apr 1 01:44:42 rpmi: python-module-pkg_resources-1:40.8.0-alt1 sisyphus+221229.100.2.1 1550559950 installed <13>Apr 1 01:44:42 rpmi: python-module-py-1.8.0-alt2 sisyphus+225173.100.1.1 1552828593 installed <13>Apr 1 01:44:42 rpmi: python-modules-json-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:42 rpmi: python-module-pluggy-0.9.0-alt1 sisyphus+225174.100.1.1 1552829122 installed <13>Apr 1 01:44:42 rpmi: python-module-pytest-3.10.1-alt5 sisyphus+226322.100.1.1 1554061369 installed <13>Apr 1 01:44:42 rpmi: python3-dev-3.6.8-alt1 sisyphus+220164.200.3.1 1548842470 installed <13>Apr 1 01:44:42 rpmi: python3-module-pytest-3.10.1-alt5 sisyphus+226322.100.1.1 1554061369 installed Building target platforms: x86_64 Building for target x86_64 Wrote: /usr/src/in/nosrpm/python-module-llist-0.4-alt1.git20130101.1.1.1.nosrc.rpm <13>Apr 1 01:44:46 rpmi: python-tools-2to3-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:46 rpmi: libnsl2-devel-1.1.0-alt1_1 1511548748 installed <13>Apr 1 01:44:46 rpmi: python-dev-2.7.15-alt1 sisyphus.217364.100 1544022396 installed <13>Apr 1 01:44:46 rpmi: python-module-setuptools-1:40.8.0-alt1 sisyphus+221229.100.2.1 1550559950 installed <13>Apr 1 01:44:46 rpmi: python3-module-setuptools-1:40.8.0-alt1 sisyphus+221229.100.2.1 1550559950 installed Installing python-module-llist-0.4-alt1.git20130101.1.1.1.src.rpm Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.48732 + 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.32110 + 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 -fno-strict-aliasing' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -fno-strict-aliasing' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -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-x86_64-2.7 creating build/temp.linux-x86_64-2.7/src x86_64-alt-linux-gcc -pthread -DNDEBUG -pipe -frecord-gcc-switches -Wall -g -O3 -fwrapv -pipe -frecord-gcc-switches -Wall -g -O2 -fno-strict-aliasing -fPIC -g -I/usr/include/python2.7 -c src/llist.c -o build/temp.linux-x86_64-2.7/src/llist.o x86_64-alt-linux-gcc -pthread -DNDEBUG -pipe -frecord-gcc-switches -Wall -g -O3 -fwrapv -pipe -frecord-gcc-switches -Wall -g -O2 -fno-strict-aliasing -fPIC -g -I/usr/include/python2.7 -c src/dllist.c -o build/temp.linux-x86_64-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: }; } x86_64-alt-linux-gcc -pthread -DNDEBUG -pipe -frecord-gcc-switches -Wall -g -O3 -fwrapv -pipe -frecord-gcc-switches -Wall -g -O2 -fno-strict-aliasing -fPIC -g -I/usr/include/python2.7 -c src/sllist.c -o build/temp.linux-x86_64-2.7/src/sllist.o creating build/lib.linux-x86_64-2.7 x86_64-alt-linux-gcc -pthread -shared -L/usr/lib64/nsl -lnsl -pipe -frecord-gcc-switches -Wall -g -O2 -fno-strict-aliasing -g build/temp.linux-x86_64-2.7/src/llist.o build/temp.linux-x86_64-2.7/src/dllist.o build/temp.linux-x86_64-2.7/src/sllist.o -lpython2.7 -o build/lib.linux-x86_64-2.7/llist.so + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/python-module-llist-0.4 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -fno-strict-aliasing' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -fno-strict-aliasing' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -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-x86_64-3.6 creating build/temp.linux-x86_64-3.6/src x86_64-alt-linux-gcc -pthread -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -g -fwrapv -O3 -Wall -pipe -frecord-gcc-switches -Wall -g -O2 -fno-strict-aliasing -fPIC -g -I/usr/include/python3.6m -c src/llist.c -o build/temp.linux-x86_64-3.6/src/llist.o x86_64-alt-linux-gcc -pthread -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -g -fwrapv -O3 -Wall -pipe -frecord-gcc-switches -Wall -g -O2 -fno-strict-aliasing -fPIC -g -I/usr/include/python3.6m -c src/dllist.c -o build/temp.linux-x86_64-3.6/src/dllist.o src/dllist.c:1306:1: warning: missing braces around initializer [-Wmissing-braces] { ^ dllist_len, /* sq_length */ { src/dllist.c:1317:1: }; } x86_64-alt-linux-gcc -pthread -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -g -fwrapv -O3 -Wall -pipe -frecord-gcc-switches -Wall -g -O2 -fno-strict-aliasing -fPIC -g -I/usr/include/python3.6m -c src/sllist.c -o build/temp.linux-x86_64-3.6/src/sllist.o creating build/lib.linux-x86_64-3.6 x86_64-alt-linux-gcc -pthread -shared -pipe -frecord-gcc-switches -Wall -g -O2 -fno-strict-aliasing -g build/temp.linux-x86_64-3.6/src/llist.o build/temp.linux-x86_64-3.6/src/dllist.o build/temp.linux-x86_64-3.6/src/sllist.o -L/usr/lib64 -lpython3.6m -o build/lib.linux-x86_64-3.6/llist.cpython-36m.so + popd ~/RPM/BUILD/python-module-llist-0.4 + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.61727 + 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 -fno-strict-aliasing' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -fno-strict-aliasing' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -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/lib64 creating /usr/src/tmp/python-module-llist-buildroot/usr/lib64/python2.7 creating /usr/src/tmp/python-module-llist-buildroot/usr/lib64/python2.7/site-packages copying build/lib.linux-x86_64-2.7/llist.so -> /usr/src/tmp/python-module-llist-buildroot/usr/lib64/python2.7/site-packages running install_egg_info Writing /usr/src/tmp/python-module-llist-buildroot/usr/lib64/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 -fno-strict-aliasing' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -fno-strict-aliasing' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -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/lib64/python3 creating /usr/src/tmp/python-module-llist-buildroot/usr/lib64/python3/site-packages copying build/lib.linux-x86_64-3.6/llist.cpython-36m.so -> /usr/src/tmp/python-module-llist-buildroot/usr/lib64/python3/site-packages running install_egg_info Writing /usr/src/tmp/python-module-llist-buildroot/usr/lib64/python3/site-packages/llist-0.4-py3.6.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/lib64/python3/site-packages/llist.cpython-36m.so' changed from 0755 (rwxr-xr-x) to 0644 (rw-r--r--) mode of './usr/lib64/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/lib64: 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.20379 + 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/lib64/python2.7/site-packages + PYTHONPATH=/usr/src/tmp/python-module-llist-buildroot/usr/lib64/python2.7/site-packages + py.test ============================= test session starts ============================== platform linux2 -- Python 2.7.15, pytest-3.10.1, py-1.8.0, pluggy-0.9.0 rootdir: /usr/src/RPM/BUILD/python-module-llist-0.4, inifile: gc: collecting generation 1... gc: objects in each generation: 841 0 23438 gc: done, 21 unreachable, 0 uncollectable, 0.0003s elapsed. gc: collecting generation 0... gc: objects in each generation: 431 0 24049 gc: done, 0.0002s elapsed. gc: collecting generation 0... gc: objects in each generation: 486 422 24009 gc: done, 21 unreachable, 0 uncollectable, 0.0002s elapsed. gc: collecting generation 0... gc: objects in each generation: 434 870 24009 gc: done, 0.0002s elapsed. gc: collecting generation 0... gc: objects in each generation: 622 1251 23994 gc: done, 475 unreachable, 0 uncollectable, 0.0002s elapsed. gc: collecting generation 0... gc: objects in each generation: 806 1364 23994 gc: done, 332 unreachable, 0 uncollectable, 0.0002s elapsed. gc: collecting generation 0... gc: objects in each generation: 789 1820 23994 gc: done, 392 unreachable, 0 uncollectable, 0.0002s elapsed. collected 134 items tests/llist_test.py .................................................... [ 38%] .................................................................gc: collecting generation 0... gc: objects in each generation: 887 3317 23905 gc: done, 0.0003s elapsed. ....... [ 92%] .......... [100%] ========================== 134 passed in 4.19 seconds ========================== gc: collecting generation 2... gc: objects in each generation: 344 3961 23838 gc: done, 1155 unreachable, 0 uncollectable, 0.0180s 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.18026 + 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.VfybnW 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.UGyPxT find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks) Provides: python2.7(llist) Requires: /usr/lib64/python2.7/site-packages, libpython2.7.so.1.0()(64bit) >= set:oiYNdDZFyqHOgw0p6VwwSNitrZ5NK0JZ5ViAClu8IJ5LScIUsHZyExLz0yF7MbJsMEes9YtconKNt1AQh5ZooxOzZxNZgaz4xdx3Ygd, 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.Mu50kW 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.11747 + 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.dHcS56 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.WJnGen find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks) Provides: python3(llist) Requires: /usr/lib64/python3/site-packages, libpython3.6m.so.1.0()(64bit) >= set:oiYNdDZF5zrzyOYEcZGysggXoJM3mz9Fl65ENafcczvWAURCx57KfUX8woW1Yib7cG3n2v73SBrsn09t4Y8tNZEovghL1qXjwqq0, python3.6-ABI(64bit), 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.0qKt8K 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.e6jZYd find-provides: running scripts (debuginfo) Finding Requires (using /usr/lib/rpm/find-requires) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.hP5O1L find-requires: running scripts (debuginfo) Requires: python-module-llist = 0.4-alt1.git20130101.1.1.1, debug64(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.Xrhn7o find-provides: running scripts (debuginfo) Finding Requires (using /usr/lib/rpm/find-requires) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.HHfz96 find-requires: running scripts (debuginfo) Requires: python3-module-llist = 0.4-alt1.git20130101.1.1.1, debug64(libpython3.6m.so.1.0) Wrote: /usr/src/RPM/RPMS/x86_64/python-module-llist-0.4-alt1.git20130101.1.1.1.x86_64.rpm Wrote: /usr/src/RPM/RPMS/x86_64/python3-module-llist-0.4-alt1.git20130101.1.1.1.x86_64.rpm Wrote: /usr/src/RPM/RPMS/x86_64/python-module-llist-debuginfo-0.4-alt1.git20130101.1.1.1.x86_64.rpm Wrote: /usr/src/RPM/RPMS/x86_64/python3-module-llist-debuginfo-0.4-alt1.git20130101.1.1.1.x86_64.rpm 32.09user 3.25system 0:46.66elapsed 75%CPU (0avgtext+0avgdata 44372maxresident)k 0inputs+0outputs (0major+571827minor)pagefaults 0swaps 45.27user 10.40system 1:06.54elapsed 83%CPU (0avgtext+0avgdata 118084maxresident)k 0inputs+0outputs (0major+1116746minor)pagefaults 0swaps --- python3-module-llist-0.4-alt1.git20130101.1.1.1.x86_64.rpm.repo 2018-05-02 06:40:22.000000000 +0000 +++ python3-module-llist-0.4-alt1.git20130101.1.1.1.x86_64.rpm.hasher 2019-04-01 01:45:35.437716016 +0000 @@ -15,3 +15,2 @@ Provides: python3(llist) -Provides: python3.3(llist) Provides: python3-module-llist = 0.4-alt1.git20130101.1.1.1