<86>Dec 6 03:09:00 userdel[2265739]: delete user 'rooter' <86>Dec 6 03:09:00 userdel[2265739]: removed group 'rooter' owned by 'rooter' <86>Dec 6 03:09:00 userdel[2265739]: removed shadow group 'rooter' owned by 'rooter' <86>Dec 6 03:09:00 groupadd[2265747]: group added to /etc/group: name=rooter, GID=690 <86>Dec 6 03:09:00 groupadd[2265747]: group added to /etc/gshadow: name=rooter <86>Dec 6 03:09:00 groupadd[2265747]: new group: name=rooter, GID=690 <86>Dec 6 03:09:00 useradd[2265763]: new user: name=rooter, UID=690, GID=690, home=/root, shell=/bin/bash <86>Dec 6 03:09:01 userdel[2265777]: delete user 'builder' <86>Dec 6 03:09:01 userdel[2265777]: removed group 'builder' owned by 'builder' <86>Dec 6 03:09:01 userdel[2265777]: removed shadow group 'builder' owned by 'builder' <86>Dec 6 03:09:01 groupadd[2265792]: group added to /etc/group: name=builder, GID=691 <86>Dec 6 03:09:01 groupadd[2265792]: group added to /etc/gshadow: name=builder <86>Dec 6 03:09:01 groupadd[2265792]: new group: name=builder, GID=691 <86>Dec 6 03:09:01 useradd[2265800]: new user: name=builder, UID=691, GID=691, home=/usr/src, shell=/bin/bash <13>Dec 6 03:09:03 rpmi: libgdbm-1.8.3-alt10 1454943313 installed <13>Dec 6 03:09:03 rpmi: libexpat-2.2.10-alt1 p9+261554.100.1.1 1605103332 installed <13>Dec 6 03:09:03 rpmi: libp11-kit-0.23.15-alt2 p9+254920.2400.19.1 1601385869 installed <13>Dec 6 03:09:03 rpmi: libtasn1-4.14-alt1 p9+235792.100.2.1 1565425233 installed <13>Dec 6 03:09:03 rpmi: rpm-macros-alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Dec 6 03:09:03 rpmi: alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Dec 6 03:09:03 rpmi: ca-certificates-2020.06.29-alt1 p9+258899.100.3.1 1601998604 installed <13>Dec 6 03:09:03 rpmi: ca-trust-0.1.2-alt1 p9+233349.100.1.1 1561655062 installed <13>Dec 6 03:09:03 rpmi: p11-kit-trust-0.23.15-alt2 p9+254920.2400.19.1 1601385869 installed <13>Dec 6 03:09:03 rpmi: libcrypto1.1-1.1.1g-alt1 p9+250580.100.5.1 1588175208 installed <13>Dec 6 03:09:03 rpmi: libssl1.1-1.1.1g-alt1 p9+250580.100.5.1 1588175208 installed <13>Dec 6 03:09:03 rpmi: python3-3.7.4-alt3 p9+249932.100.2.1 1587126956 installed <13>Dec 6 03:09:03 rpmi: libpython3-3.7.4-alt3 p9+249932.100.2.1 1587126956 installed <13>Dec 6 03:09:04 rpmi: python3-base-3.7.4-alt3 p9+249932.100.2.1 1587126956 installed <13>Dec 6 03:09:04 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>Dec 6 03:09:04 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>Dec 6 03:09:07 rpmi: python3-module-six-1.12.0-alt1 sisyphus+219665.100.2.1 1548148570 installed <13>Dec 6 03:09:07 rpmi: python3-module-pluggy-0.11.0-alt1 sisyphus+229116.100.1.1 1557316655 installed <13>Dec 6 03:09:07 rpmi: python3-module-pkg_resources-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>Dec 6 03:09:07 rpmi: python3-module-more-itertools-7.0.0-alt3 sisyphus+226536.100.1.1 1554329928 installed <13>Dec 6 03:09:07 rpmi: python3-module-iniconfig-1.0.0-alt1 sisyphus+227494.1100.1.3 1555839106 installed <13>Dec 6 03:09:07 rpmi: python3-module-attrs-19.1.0-alt1 sisyphus+227473.2100.1.2 1555756986 installed <13>Dec 6 03:09:07 rpmi: python3-module-atomicwrites-1.3.0-alt1 sisyphus+227473.2000.1.3 1555763467 installed <13>Dec 6 03:09:07 rpmi: python3-module-apipkg-1.5-alt1 sisyphus+227465.1100.1.2 1555756555 installed <13>Dec 6 03:09:07 rpmi: python3-module-py-1.8.0-alt2 sisyphus+228349.1400.4.1 1556631070 installed <13>Dec 6 03:09:07 rpmi: python-module-iniconfig-1.0.0-alt1 sisyphus+227494.1100.1.3 1555839106 installed <13>Dec 6 03:09:07 rpmi: python-module-apipkg-1.5-alt1 1531926894 installed <13>Dec 6 03:09:07 rpmi: python-modules-curses-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:07 rpmi: libverto-0.3.0-alt1_7 sisyphus+225932.100.1.1 1553994917 installed <13>Dec 6 03:09:07 rpmi: libtinfo-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686221 installed <13>Dec 6 03:09:08 rpmi: libncurses-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686221 installed <13>Dec 6 03:09:08 rpmi: libkeyutils-1.6-alt2 sisyphus+226520.100.2.1 1554512088 installed <13>Dec 6 03:09:08 rpmi: libcom_err-1.44.6-alt1 sisyphus+224154.100.1.1 1552091653 installed <86>Dec 6 03:09:08 groupadd[2280909]: group added to /etc/group: name=_keytab, GID=499 <86>Dec 6 03:09:08 groupadd[2280909]: group added to /etc/gshadow: name=_keytab <86>Dec 6 03:09:08 groupadd[2280909]: new group: name=_keytab, GID=499 <13>Dec 6 03:09:08 rpmi: libkrb5-1.17.2-alt1 p9+262110.100.3.1 1606242396 installed <13>Dec 6 03:09:08 rpmi: libtirpc-1.0.3-alt1 1532008015 installed <13>Dec 6 03:09:08 rpmi: libnsl2-1.1.0-alt1_1 1511548748 installed <13>Dec 6 03:09:08 rpmi: python-modules-compiler-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:08 rpmi: python-modules-email-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:08 rpmi: python-modules-unittest-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:08 rpmi: python-modules-encodings-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:08 rpmi: python-modules-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:08 rpmi: python-modules-nis-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:08 rpmi: python-module-six-1.12.0-alt1 sisyphus+219665.100.2.1 1548148570 installed <13>Dec 6 03:09:08 rpmi: python-modules-ctypes-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:08 rpmi: python-modules-multiprocessing-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:08 rpmi: python-modules-logging-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:08 rpmi: python-module-more-itertools-1:5.0.0-alt2 sisyphus+226536.200.1.1 1554329977 installed <13>Dec 6 03:09:08 rpmi: python-modules-xml-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:08 rpmi: python-modules-hotshot-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:08 rpmi: python-modules-bsddb-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:08 rpmi: python-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:08 rpmi: python-strict-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:08 rpmi: python-module-attrs-19.1.0-alt1 sisyphus+227473.2100.1.2 1555756986 installed <13>Dec 6 03:09:08 rpmi: python-modules-distutils-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:08 rpmi: python-module-atomicwrites-1.3.0-alt1 sisyphus+227473.2000.1.3 1555763467 installed <13>Dec 6 03:09:08 rpmi: python-module-funcsigs-1.0.2-alt2 sisyphus+228355.2600.2.1 1556560236 installed <13>Dec 6 03:09:08 rpmi: python-module-scandir-1.10.0-alt1 sisyphus+225192.100.1.2 1552968852 installed <13>Dec 6 03:09:08 rpmi: python-module-pathlib2-2.3.3-alt1 sisyphus+228364.300.4.1 1556886257 installed <13>Dec 6 03:09:09 rpmi: python-module-pkg_resources-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>Dec 6 03:09:09 rpmi: python-module-py-1.8.0-alt2 sisyphus+228349.1400.4.1 1556631070 installed <13>Dec 6 03:09:09 rpmi: python-modules-json-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:09 rpmi: python-module-pluggy-0.11.0-alt1 sisyphus+229116.100.1.1 1557316655 installed <13>Dec 6 03:09:09 rpmi: python-module-pytest-3.10.1-alt5 sisyphus+228366.2000.2.3 1556707871 installed <13>Dec 6 03:09:09 rpmi: python3-dev-3.7.4-alt3 p9+249932.100.2.1 1587126956 installed <13>Dec 6 03:09:09 rpmi: python3-module-pytest-3.10.1-alt5 sisyphus+228366.2000.2.3 1556707871 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>Dec 6 03:09:12 rpmi: python-tools-2to3-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:12 rpmi: libnsl2-devel-1.1.0-alt1_1 1511548748 installed <13>Dec 6 03:09:12 rpmi: python-dev-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Dec 6 03:09:12 rpmi: python-module-setuptools-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>Dec 6 03:09:12 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: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.19522 + 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.10927 + 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.7 creating build/temp.linux-x86_64-3.7/src x86_64-alt-linux-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -pipe -frecord-gcc-switches -Wall -g -O3 -pipe -frecord-gcc-switches -Wall -g -O2 -fno-strict-aliasing -fPIC -g -I/usr/include/python3.7m -c src/llist.c -o build/temp.linux-x86_64-3.7/src/llist.o x86_64-alt-linux-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -pipe -frecord-gcc-switches -Wall -g -O3 -pipe -frecord-gcc-switches -Wall -g -O2 -fno-strict-aliasing -fPIC -g -I/usr/include/python3.7m -c src/dllist.c -o build/temp.linux-x86_64-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: }; } x86_64-alt-linux-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -pipe -frecord-gcc-switches -Wall -g -O3 -pipe -frecord-gcc-switches -Wall -g -O2 -fno-strict-aliasing -fPIC -g -I/usr/include/python3.7m -c src/sllist.c -o build/temp.linux-x86_64-3.7/src/sllist.o creating build/lib.linux-x86_64-3.7 x86_64-alt-linux-gcc -pthread -shared -pipe -frecord-gcc-switches -Wall -g -O2 -fno-strict-aliasing -g build/temp.linux-x86_64-3.7/src/llist.o build/temp.linux-x86_64-3.7/src/dllist.o build/temp.linux-x86_64-3.7/src/sllist.o -L/usr/lib64 -lpython3.7m -o build/lib.linux-x86_64-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.30812 + 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.7/llist.cpython-37m.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.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/lib64/python3/site-packages/llist.cpython-37m.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.91502 + 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.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 23443 gc: done, 21 unreachable, 0 uncollectable, 0.0002s elapsed. gc: collecting generation 0... gc: objects in each generation: 431 0 24054 gc: done, 0.0001s elapsed. gc: collecting generation 0... gc: objects in each generation: 486 422 24014 gc: done, 21 unreachable, 0 uncollectable, 0.0001s elapsed. gc: collecting generation 0... gc: objects in each generation: 434 870 24014 gc: done, 0.0001s elapsed. gc: collecting generation 0... gc: objects in each generation: 622 1251 23999 gc: done, 475 unreachable, 0 uncollectable, 0.0001s elapsed. gc: collecting generation 0... gc: objects in each generation: 806 1364 23999 gc: done, 332 unreachable, 0 uncollectable, 0.0002s elapsed. gc: collecting generation 0... gc: objects in each generation: 789 1820 23999 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 23910 gc: done, 0.0004s elapsed. ....... [ 92%] .......... [100%] ========================== 134 passed in 3.84 seconds ========================== gc: collecting generation 2... gc: objects in each generation: 344 3961 23843 gc: done, 1155 unreachable, 0 uncollectable, 0.0261s 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.99830 + 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.LdgBTy 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.7IuB2X 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/lib64/python2.7/site-packages, libc.so.6(GLIBC_2.2.5)(64bit), libc.so.6(GLIBC_2.4)(64bit), 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.BoGNzt 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.13750 + 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.5xX2F6 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.17oCmO 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/lib64/python3/site-packages, libc.so.6(GLIBC_2.2.5)(64bit), libc.so.6(GLIBC_2.4)(64bit), libpython3.7m.so.1.0()(64bit) >= set:oiYNdDZF5zrzyOYEcZGysggXoJM3mz9Fl65ENafcczvWAURCx57KfUX8woW1Yib7cG3n2v73SBrsn09t4Y8tNZEovghL1qXjwqq0, python3.7-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.5VhSxA 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.5NhZAs find-provides: running scripts (debuginfo) Finding Requires (using /usr/lib/rpm/find-requires) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.7iFQZn find-requires: running scripts (debuginfo) Requires: python-module-llist = 0.4-alt1.git20130101.1.1.1, debug64(libc.so.6), 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.zrw1Jm find-provides: running scripts (debuginfo) Finding Requires (using /usr/lib/rpm/find-requires) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.p0ykQo find-requires: running scripts (debuginfo) Requires: python3-module-llist = 0.4-alt1.git20130101.1.1.1, debug64(libc.so.6), debug64(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/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 23.17user 3.20system 0:33.55elapsed 78%CPU (0avgtext+0avgdata 44308maxresident)k 0inputs+0outputs (0major+532429minor)pagefaults 0swaps 33.57user 7.58system 0:48.69elapsed 84%CPU (0avgtext+0avgdata 119340maxresident)k 0inputs+0outputs (0major+1076075minor)pagefaults 0swaps --- python-module-llist-0.4-alt1.git20130101.1.1.1.x86_64.rpm.repo 2019-04-15 01:07:08.000000000 +0000 +++ python-module-llist-0.4-alt1.git20130101.1.1.1.x86_64.rpm.hasher 2020-12-06 03:09:47.455830420 +0000 @@ -9,2 +9,4 @@ Requires: /usr/lib64/python2.7/site-packages +Requires: libc.so.6(GLIBC_2.2.5)(64bit) +Requires: libc.so.6(GLIBC_2.4)(64bit) Requires: libpython2.7.so.1.0()(64bit) >= set:oiYNdDZFyqHOgw0p6VwwSNitrZ5NK0JZ5ViAClu8IJ5LScIUsHZyExLz0yF7MbJsMEes9YtconKNt1AQh5ZooxOzZxNZgaz4xdx3Ygd --- python-module-llist-debuginfo-0.4-alt1.git20130101.1.1.1.x86_64.rpm.repo 2019-04-15 01:07:08.000000000 +0000 +++ python-module-llist-debuginfo-0.4-alt1.git20130101.1.1.1.x86_64.rpm.hasher 2020-12-06 03:09:47.478830630 +0000 @@ -10,2 +10,3 @@ /usr/src/debug/python-module-llist-0.4/src/sllist.h 100644 +Requires: debug64(libc.so.6) Requires: debug64(libpython2.7.so.1.0) --- python3-module-llist-0.4-alt1.git20130101.1.1.1.x86_64.rpm.repo 2019-04-15 01:07:08.000000000 +0000 +++ python3-module-llist-0.4-alt1.git20130101.1.1.1.x86_64.rpm.hasher 2020-12-06 03:09:47.517830986 +0000 @@ -9,2 +9,4 @@ Requires: /usr/lib64/python3/site-packages +Requires: libc.so.6(GLIBC_2.2.5)(64bit) +Requires: libc.so.6(GLIBC_2.4)(64bit) Requires: libpython3.7m.so.1.0()(64bit) >= set:oiYNdDZF5zrzyOYEcZGysggXoJM3mz9Fl65ENafcczvWAURCx57KfUX8woW1Yib7cG3n2v73SBrsn09t4Y8tNZEovghL1qXjwqq0 --- python3-module-llist-debuginfo-0.4-alt1.git20130101.1.1.1.x86_64.rpm.repo 2019-04-15 01:07:08.000000000 +0000 +++ python3-module-llist-debuginfo-0.4-alt1.git20130101.1.1.1.x86_64.rpm.hasher 2020-12-06 03:09:47.556831343 +0000 @@ -10,2 +10,3 @@ /usr/src/debug/python3/src/sllist.h 100644 +Requires: debug64(libc.so.6) Requires: debug64(libpython3.7m.so.1.0)