<86>Dec 4 17:33:42 userdel[3044490]: delete user 'rooter' <86>Dec 4 17:33:42 userdel[3044490]: removed group 'rooter' owned by 'rooter' <86>Dec 4 17:33:42 userdel[3044490]: removed shadow group 'rooter' owned by 'rooter' <86>Dec 4 17:33:42 groupadd[3044497]: group added to /etc/group: name=rooter, GID=699 <86>Dec 4 17:33:42 groupadd[3044497]: group added to /etc/gshadow: name=rooter <86>Dec 4 17:33:42 groupadd[3044497]: new group: name=rooter, GID=699 <86>Dec 4 17:33:42 useradd[3044501]: new user: name=rooter, UID=699, GID=699, home=/root, shell=/bin/bash <86>Dec 4 17:33:42 userdel[3044507]: delete user 'builder' <86>Dec 4 17:33:42 userdel[3044507]: removed group 'builder' owned by 'builder' <86>Dec 4 17:33:42 userdel[3044507]: removed shadow group 'builder' owned by 'builder' <86>Dec 4 17:33:42 groupadd[3044513]: group added to /etc/group: name=builder, GID=700 <86>Dec 4 17:33:42 groupadd[3044513]: group added to /etc/gshadow: name=builder <86>Dec 4 17:33:42 groupadd[3044513]: new group: name=builder, GID=700 <86>Dec 4 17:33:42 useradd[3044519]: new user: name=builder, UID=700, GID=700, home=/usr/src, shell=/bin/bash <13>Dec 4 17:33:44 rpmi: rpm-build-compat-2.2.6-alt2 sisyphus+262205.100.1.1 1605912726 installed <13>Dec 4 17:33:44 rpmi: libgdbm-1.8.3-alt10 1454943334 installed <13>Dec 4 17:33:44 rpmi: libexpat-2.2.10-alt1 sisyphus+259966.100.1.1 1602824518 installed <13>Dec 4 17:33:44 rpmi: libp11-kit-0.23.15-alt2 sisyphus+252784.100.2.2 1591274901 installed <13>Dec 4 17:33:44 rpmi: libtasn1-4.16.0-alt1 sisyphus+245480.100.1.1 1580825062 installed <13>Dec 4 17:33:44 rpmi: rpm-macros-alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Dec 4 17:33:44 rpmi: alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Dec 4 17:33:44 rpmi: ca-certificates-2020.10.22-alt1 sisyphus+260224.300.2.1 1603549301 installed <13>Dec 4 17:33:44 rpmi: ca-trust-0.1.2-alt1 sisyphus+233348.100.1.1 1561653823 installed <13>Dec 4 17:33:44 rpmi: p11-kit-trust-0.23.15-alt2 sisyphus+252784.100.2.2 1591274901 installed <13>Dec 4 17:33:44 rpmi: libcrypto1.1-1.1.1g-alt1 sisyphus+249982.60.8.1 1587743711 installed <13>Dec 4 17:33:44 rpmi: libssl1.1-1.1.1g-alt1 sisyphus+249982.60.8.1 1587743711 installed <13>Dec 4 17:33:44 rpmi: python3-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed <13>Dec 4 17:33:45 rpmi: python3-base-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed <13>Dec 4 17:33:45 rpmi: libpython3-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed <13>Dec 4 17:33:45 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>Dec 4 17:33:45 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>Dec 4 17:33:45 rpmi: rpm-build-intro-2.2.6-alt2 sisyphus+262205.100.1.1 1605912726 installed <13>Dec 4 17:33:47 rpmi: libverto-0.3.0-alt1_7 sisyphus+225932.100.1.1 1553994919 installed <13>Dec 4 17:33:47 rpmi: liblmdb-0.9.23-alt1 sisyphus+225277.100.2.1 1553001679 installed <13>Dec 4 17:33:47 rpmi: libkeyutils-1.6.1-alt1 sisyphus+256015.100.1.1 1596820124 installed <13>Dec 4 17:33:47 rpmi: libcom_err-1.45.6.0.24.af1a-alt1 sisyphus+262279.100.1.1 1606088229 installed <86>Dec 4 17:33:47 groupadd[3050127]: group added to /etc/group: name=_keytab, GID=499 <86>Dec 4 17:33:47 groupadd[3050127]: group added to /etc/gshadow: name=_keytab <86>Dec 4 17:33:47 groupadd[3050127]: new group: name=_keytab, GID=499 <13>Dec 4 17:33:47 rpmi: libkrb5-1.18.3-alt1 sisyphus+262109.100.1.1 1605777180 installed <13>Dec 4 17:33:47 rpmi: libtirpc-1.2.6-alt1 sisyphus+250076.100.1.1 1587038270 installed <13>Dec 4 17:33:47 rpmi: libnsl2-1.1.0-alt1_1 1511548749 installed <13>Dec 4 17:33:47 rpmi: python-modules-encodings-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed <13>Dec 4 17:33:47 rpmi: python-modules-compiler-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed <13>Dec 4 17:33:47 rpmi: python-modules-email-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed <13>Dec 4 17:33:47 rpmi: python-modules-unittest-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed <13>Dec 4 17:33:47 rpmi: python-modules-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed <13>Dec 4 17:33:47 rpmi: python-modules-nis-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed <13>Dec 4 17:33:47 rpmi: python-modules-ctypes-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed <13>Dec 4 17:33:47 rpmi: python-modules-multiprocessing-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed <13>Dec 4 17:33:47 rpmi: python-modules-logging-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed <13>Dec 4 17:33:47 rpmi: python-tools-2to3-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/python3-module-txredis-2.3-alt3.nosrc.rpm <13>Dec 4 17:33:49 rpmi: python3-module-pkg_resources-1:46.1.3-alt2 sisyphus+260458.600.6.1 1603876498 installed <13>Dec 4 17:33:49 rpmi: libtinfo-devel-6.2.20201107-alt1 sisyphus+261749.100.1.1 1605292929 installed <13>Dec 4 17:33:49 rpmi: libncurses-devel-6.2.20201107-alt1 sisyphus+261749.100.1.1 1605292929 installed <13>Dec 4 17:33:49 rpmi: python3-dev-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed <13>Dec 4 17:33:49 rpmi: python3-module-setuptools-1:46.1.3-alt2 sisyphus+260458.600.6.1 1603876498 installed Installing python3-module-txredis-2.3-alt3.src.rpm Building target platforms: i586 Building for target i586 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.32432 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf txredis-2.3 + echo 'Source #0 (txredis-2.3.tar):' Source #0 (txredis-2.3.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/txredis-2.3.tar + cd txredis-2.3 + /bin/chmod -c -Rf u+rwX,go-w . + find ./ -type f -name '*.py' -exec 2to3 -w -n '{}' + RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: No changes to ./txredis/tests/test_hiredis.py RefactoringTool: Refactored ./txredis/tests/test_client.py --- ./txredis/tests/test_client.py (original) +++ ./txredis/tests/test_client.py (refactored) @@ -149,13 +149,13 @@ ex = 'OK' t(a, ex) a = yield r.keys('a*') - ex = [u'a'] + ex = ['a'] t(a, ex) a = yield r.set('a2', 'a') ex = 'OK' t(a, ex) a = yield r.keys('a*') - ex = [u'a', u'a2'] + ex = ['a', 'a2'] t(a, ex) a = yield r.delete('a2') ex = 1 @@ -211,7 +211,7 @@ r = self.redis t = self.assertTrue a = yield r.dbsize() - t(isinstance(a, int) or isinstance(a, long)) + t(isinstance(a, int) or isinstance(a, int)) @defer.inlineCallbacks def test_expire(self): @@ -371,7 +371,7 @@ ex = 'OK' t(a, ex) a = yield r.get('a') - ex = u'a' + ex = 'a' t(a, ex) a = yield r.select(9) ex = 'OK' @@ -503,14 +503,14 @@ yield self.redis.set('a', "") r = yield self.redis.get('a') - self.assertEquals("", r) + self.assertEqual("", r) @defer.inlineCallbacks def test_set(self): a = yield self.redis.set('a', 'pippo') self.assertEqual(a, 'OK') - unicode_str = u'pippo \u3235' + unicode_str = 'pippo \u3235' a = yield self.redis.set('a', unicode_str) self.assertEqual(a, 'OK') @@ -544,14 +544,14 @@ t(a, 'OK') a = yield r.get('a') - t(a, u'pippo') + t(a, 'pippo') a = yield r.get('b') ex = '15' t(a, ex) a = yield r.get('d') - ex = u'\\r\\n' + ex = '\\r\\n' t(a, ex) a = yield r.get('b') @@ -559,7 +559,7 @@ t(a, ex) a = yield r.get('c') - ex = u' \\r\\naaa\\nbbb\\r\\ncccc\\nddd\\r\\n ' + ex = ' \\r\\naaa\\nbbb\\r\\ncccc\\nddd\\r\\n ' t(a, ex) a = yield r.get('ajhsd') @@ -576,7 +576,7 @@ t(a, ex) a = yield r.getset('a', 2) - ex = u'pippo' + ex = 'pippo' t(a, ex) @defer.inlineCallbacks @@ -597,8 +597,8 @@ ex = 'OK' t(a, ex) a = yield r.mget('a', 'b', 'c', 'd') - ex = [u'pippo', '15', - u'\\r\\naaa\\nbbb\\r\\ncccc\\nddd\\r\\n', u'\\r\\n'] + ex = ['pippo', '15', + '\\r\\naaa\\nbbb\\r\\ncccc\\nddd\\r\\n', '\\r\\n'] t(a, ex) @defer.inlineCallbacks @@ -698,7 +698,7 @@ yield self.redis.push(key, char) r = yield self.redis.lrange(key, 0, len(chars)) - self.assertEquals(["c", "", "a"], r) + self.assertEqual(["c", "", "a"], r) @defer.inlineCallbacks def test_concurrent(self): @@ -723,7 +723,7 @@ # 3. Wait on all responses and make sure we got them all r = yield defer.DeferredList(ds) - self.assertEquals(len(r), num_lists) + self.assertEqual(len(r), num_lists) @defer.inlineCallbacks def test_push(self): @@ -795,22 +795,22 @@ ex = 1 t(a, ex) a = yield r.lrange('l', 0, 1) - ex = [u'aaa'] + ex = ['aaa'] t(a, ex) a = yield r.push('l', 'bbb') ex = 2 t(a, ex) a = yield r.lrange('l', 0, 0) - ex = [u'bbb'] + ex = ['bbb'] t(a, ex) a = yield r.lrange('l', 0, 1) - ex = [u'bbb', u'aaa'] + ex = ['bbb', 'aaa'] t(a, ex) a = yield r.lrange('l', -1, 0) ex = [] t(a, ex) a = yield r.lrange('l', -1, -1) - ex = [u'aaa'] + ex = ['aaa'] t(a, ex) @defer.inlineCallbacks @@ -855,17 +855,17 @@ ex = 1 t(a, ex) a = yield r.lindex('l', 0) - ex = u'aaa' + ex = 'aaa' t(a, ex) yield r.lindex('l', 2) a = yield r.push('l', 'ccc') ex = 2 t(a, ex) a = yield r.lindex('l', 1) - ex = u'aaa' + ex = 'aaa' t(a, ex) a = yield r.lindex('l', -1) - ex = u'aaa' + ex = 'aaa' t(a, ex) @defer.inlineCallbacks @@ -882,10 +882,10 @@ ex = 2 t(a, ex) a = yield r.pop('l') - ex = u'bbb' + ex = 'bbb' t(a, ex) a = yield r.pop('l') - ex = u'aaa' + ex = 'aaa' t(a, ex) yield r.pop('l') a = yield r.push('l', 'aaa') @@ -895,10 +895,10 @@ ex = 2 t(a, ex) a = yield r.pop('l', tail=True) - ex = u'aaa' + ex = 'aaa' t(a, ex) a = yield r.pop('l') - ex = u'bbb' + ex = 'bbb' t(a, ex) a = yield r.pop('l') ex = None @@ -960,7 +960,7 @@ ex = 'OK' t(a, ex) a = yield r.lrange('l', 0, 1) - ex = [u'bbb'] + ex = ['bbb'] t(a, ex) @defer.inlineCallbacks @@ -982,7 +982,7 @@ ex = 2 t(a, ex) a = yield r.lrange('l', 0, 10) - ex = [u'bbb'] + ex = ['bbb'] t(a, ex) a = yield r.push('l', 'aaa') ex = 2 @@ -1139,7 +1139,7 @@ t(a, ex) a = yield r.spop('s') - ex = u'a' + ex = 'a' t(a, ex) @defer.inlineCallbacks @@ -1197,7 +1197,7 @@ ex = set([]) t(a, ex) a = yield r.sinter('s1', 's2') - ex = set([u'a']) + ex = set(['a']) t(a, ex) @defer.inlineCallbacks @@ -1224,7 +1224,7 @@ ex = 1 t(a, ex) a = yield r.smembers('s_s') - ex = set([u'a']) + ex = set(['a']) t(a, ex) @defer.inlineCallbacks @@ -1242,7 +1242,7 @@ ex = 1 t(a, ex) a = yield r.smembers('s') - ex = set([u'a', u'b']) + ex = set(['a', 'b']) t(a, ex) @defer.inlineCallbacks @@ -1263,13 +1263,13 @@ ex = 1 t(a, ex) a = yield r.sunion('s1', 's2', 's3') - ex = set([u'a', u'b']) + ex = set(['a', 'b']) t(a, ex) a = yield r.sadd('s2', 'c') ex = 1 t(a, ex) a = yield r.sunion('s1', 's2', 's3') - ex = set([u'a', u'c', u'b']) + ex = set(['a', 'c', 'b']) t(a, ex) @defer.inlineCallbacks @@ -1293,7 +1293,7 @@ ex = 2 t(a, ex) a = yield r.smembers('s4') - ex = set([u'a', u'b']) + ex = set(['a', 'b']) t(a, ex) @defer.inlineCallbacks @@ -1307,18 +1307,18 @@ r = self.redis t = self.assertEqual yield r.delete('l') - items = [007, 10, -5, 0.1, 100, -3, 20, 0.02, -3.141] + items = [0o07, 10, -5, 0.1, 100, -3, 20, 0.02, -3.141] for i in items: yield r.push('l', i, tail=True) a = yield r.sort('l') - ex = map(str, sorted(items)) + ex = list(map(str, sorted(items))) t(a, ex) @defer.inlineCallbacks def test_sort(self): r = self.redis t = self.assertEqual - s = lambda l: map(str, l) + s = lambda l: list(map(str, l)) yield r.delete('l') a = yield r.push('l', 'ccc') @@ -1334,7 +1334,7 @@ ex = 4 t(a, ex) a = yield r.sort('l', alpha=True) - ex = [u'aaa', u'bbb', u'ccc', u'ddd'] + ex = ['aaa', 'bbb', 'ccc', 'ddd'] t(a, ex) a = yield r.delete('l') ex = 1 @@ -1393,9 +1393,9 @@ yield self.redis.delete('h') yield self.redis.hset('h', 'blank', "") a = yield self.redis.hget('h', 'blank') - self.assertEquals(a, '') + self.assertEqual(a, '') a = yield self.redis.hgetall('h') - self.assertEquals(a, {'blank': ''}) + self.assertEqual(a, {'blank': ''}) @defer.inlineCallbacks def test_cas(self): @@ -1565,7 +1565,7 @@ t = self.assertEqual yield r.delete('s') - data = set(xrange(1, 100000)) + data = set(range(1, 100000)) for i in data: r.sadd('s', i) res = yield r.smembers('s') @@ -2085,20 +2085,20 @@ self.assertFailureRefactoringTool: No changes to ./txredis/testing.py RefactoringTool: Refactored ./txredis/protocol.py (d, RuntimeError) def checkMessage(error): - self.assertEquals(str(error), 'Not connected') + self.assertEqual(str(error), 'Not connected') return d.addCallback(checkMessage) def test_disconnect_during_request(self): d1 = self.proto.get("foo") d2 = self.proto.get("bar") - self.assertEquals(len(self.proto._request_queue), 2) + self.assertEqual(len(self.proto._request_queue), 2) self.transport.loseConnection() done = defer.DeferredList([d1, d2], consumeErrors=True) def checkFailures(results): - self.assertEquals(len(self.proto._request_queue), 0) + self.assertEqual(len(self.proto._request_queue), 0) for success, result in results: self.assertFalse(success) result.trap(error.ConnectionDone) @@ -2120,49 +2120,49 @@ def test_error_response(self): # pretending 'foo' is a set, so get is incorrect d = self.proto.get("foo") - self.assertEquals(self.transport.value(), + self.assertEqual(self.transport.value(), '*2\r\n$3\r\nGET\r\n$3\r\nfoo\r\n') msg = "Operation against a key holding the wrong kind of value" self.sendResponse("-%s\r\n" % msg) self.failUnlessFailure(d, ResponseError) def check_err(r): - self.assertEquals(str(r), msg) + self.assertEqual(str(r), msg) return d @defer.inlineCallbacks def test_singleline_response(self): d = self.proto.ping() - self.assertEquals(self.transport.value(), '*1\r\n$4\r\nPING\r\n') + self.assertEqual(self.transport.value(), '*1\r\n$4\r\nPING\r\n') self.sendResponse("+PONG\r\n") r = yield d - self.assertEquals(r, 'PONG') + self.assertEqual(r, 'PONG') @defer.inlineCallbacks def test_bulk_response(self): d = self.proto.get("foo") - self.assertEquals(self.transport.value(), + self.assertEqual(self.transport.value(), '*2\r\n$3\r\nGET\r\n$3\r\nfoo\r\n') self.sendResponse("$3\r\nbar\r\n") r = yield d - self.assertEquals(r, 'bar') + self.assertEqual(r, 'bar') @defer.inlineCallbacks def test_multibulk_response(self): d = self.proto.lrange("foo", 0, 1) expected = '*4\r\n$6\r\nLRANGE\r\n$3\r\nfoo\r\n$1\r\n0\r\n$1\r\n1\r\n' - self.assertEquals(self.transport.value(), expected) + self.assertEqual(self.transport.value(), expected) self.sendResponse("*2\r\n$3\r\nbar\r\n$6\r\nlolwut\r\n") r = yield d - self.assertEquals(r, ['bar', 'lolwut']) + self.assertEqual(r, ['bar', 'lolwut']) @defer.inlineCallbacks def test_integer_response(self): d = self.proto.dbsize() - self.assertEquals(self.transport.value(), '*1\r\n$6\r\nDBSIZE\r\n') + self.assertEqual(self.transport.value(), '*1\r\n$6\r\nDBSIZE\r\n') self.sendResponse(":1234\r\n") r = yield d - self.assertEquals(r, 1234) + self.assertEqual(r, 1234) class TestFactory(CommandsBaseTestCase): --- ./txredis/protocol.py (original) +++ ./txredis/protocol.py (refactored) @@ -280,10 +280,10 @@ """Encode a value for sending to the server.""" if isinstance(s, str): return s - if isinstance(s, unicode): + if isinstance(s, str): try: return s.encode(self.charset, self.errors) - except UnicodeEncodeError, e: + except UnicodeEncodeError as e: raise exceptions.InvalidData( "Error encoding unicode value '%s': %s" % ( s.encode(self.charset, 'replace'), e)) @@ -323,7 +323,7 @@ if isinstance(res, exceptions.ResponseError): self._request_queue.popleft().errback(res) else: - if isinstance(res, basestring) and res == 'none': + if isinstance(resRefactoringTool: No changes to ./txredis/exceptions.py RefactoringTool: Refactored ./txredis/client.py , str) and res == 'none': res = None self._request_queue.popleft().callback(res) res = self._reader.gets() --- ./txredis/client.py (original) +++ ./txredis/client.py (refactored) @@ -74,7 +74,7 @@ res = {} if not values: return res - for i in xrange(0, len(values) - 1, 2): + for i in range(0, len(values) - 1, 2): res[values[i]] = values[i + 1] return res return self.getResponse().addCallback(post_process) @@ -131,7 +131,7 @@ unchanged. """ - self._send('msetnx', *list(itertools.chain(*mapping.iteritems()))) + self._send('msetnx', *list(itertools.chain(*iter(mapping.items())))) return self.getResponse() def mset(self, mapping, preserve=False): @@ -142,7 +142,7 @@ command = 'MSETNX' else: command = 'MSET' - self._send(command, *list(itertools.chain(*mapping.iteritems()))) + self._send(command, *list(itertools.chain(*iter(mapping.items())))) return self.getResponse() def append(self, key, value): @@ -963,7 +963,7 @@ stmt.extend(['LIMIT', start, num]) if get is None: pass - elif isinstance(get, basestring): + elif isinstance(get, str): stmt.extend(['GET', get]) elif isinstance(get, list) or isinstance(get, tuple): for g in get: @@ -1029,7 +1029,7 @@ at key. This command overwrites any existing fields in the hash. If key does not exist, a new key holding a hash is created. """ - fields = list(itertools.chain(*in_dict.iteritems())) + fields = list(itertools.chain(*iter(in_dict.items()))) self._send('HMSET', key, *fields) return self.getResponse() @@ -1058,7 +1058,7 @@ """ Returns the value associated with field in the hash stored at key. """ - if isinstance(field, basestring): + if isinstance(field, str): self._send('HGET', key, field) else: self._send('HMGET', *([key] + field)) @@ -1066,9 +1066,9 @@ def post_process(values): if not values: return values - if isinstance(field, basestring): + if isinstance(field, str): return {field: values} - return dict(itertools.izip(field, values)) + return dict(zip(field, values)) return self.getResponse().addCallback(post_process) hmget = hget @@ -1077,7 +1077,7 @@ """ Get the value of a hash field """ - assert isinstance(field, basestring) + assert isinstance(field, str) self._send('HGET', key, field) return self.getResponse() @@ -1189,7 +1189,7 @@ as (value, score) for backwards compatibility reasons. """ if not kwargs and len(item_tuples) == 2 and \ - isinstance(item_tuples[0], basestring): + isinstance(item_tuples[0], str): self._send('ZADD', key, item_tuples[1], item_tuples[0]) elif not kwargs: self._send('ZADD', key, *item_tuples) @@ -1240,9 +1240,9 @@ args = [op, dstkey, len(keys)] # add in key names, and optionally weights if isinstance(keys, dict): - args.extend(list(keys.iterkeys())) + args.extend(list(keys.keys())) args.append('WEIGHTS') - args.extend(list(keys.itervalues())) + args.extend(list(keys.values())) else: args.extend(keys) if aggregate: @@ -1482,22 +1482,22 @@ Overrides RedisBase.handleCompleteMultiBulkData to intercept published message events. """ - if reply[0] == u"message": + if reply[0] == "message": channel, message = reply[1:] self.messageReceived(channel, message) - elif reply[0] == u"pmessage": + elif reply[0] == "pmessage":RefactoringTool: Refactored ./txredis/__init__.py RefactoringTool: No changes to ./setup.py RefactoringTool: No changes to ./examples/pubsub.py RefactoringTool: Refactored ./examples/demo_hiredis.py RefactoringTool: Refactored ./examples/demo.py RefactoringTool: Files that were modified: RefactoringTool: ./txredis/tests/test_hiredis.py RefactoringTool: ./txredis/tests/test_client.py RefactoringTool: ./txredis/testing.py RefactoringTool: ./txredis/protocol.py RefactoringTool: ./txredis/exceptions.py RefactoringTool: ./txredis/client.py RefactoringTool: ./txredis/__init__.py RefactoringTool: ./setup.py RefactoringTool: ./examples/pubsub.py RefactoringTool: ./examples/demo_hiredis.py RefactoringTool: ./examples/demo.py pattern, channel, message = reply[1:] self.messageReceived(channel, message) - elif reply[0] == u"subscribe": + elif reply[0] == "subscribe": channel, numSubscribed = reply[1:] self.channelSubscribed(channel, numSubscribed) - elif reply[0] == u"unsubscribe": + elif reply[0] == "unsubscribe": channel, numSubscribed = reply[1:] self.channelUnsubscribed(channel, numSubscribed) - elif reply[0] == u"psubscribe": + elif reply[0] == "psubscribe": channelPattern, numSubscribed = reply[1:] self.channelPatternSubscribed(channelPattern, numSubscribed) - elif reply[0] == u"punsubscribe": + elif reply[0] == "punsubscribe": channelPattern, numSubscribed = reply[1:] self.channelPatternUnsubscribed(channelPattern, numSubscribed) else: --- ./txredis/__init__.py (original) +++ ./txredis/__init__.py (refactored) @@ -35,6 +35,6 @@ @brief Twisted compatible version of redis.py """ # for backwards compatibility -from client import * -from exceptions import * -from protocol import * +from .client import * +from .exceptions import * +from .protocol import * --- ./examples/demo_hiredis.py (original) +++ ./examples/demo_hiredis.py (refactored) @@ -15,16 +15,16 @@ redis = yield clientCreator.connectTCP(HOST, PORT) res = yield redis.ping() - print res + print(res) info = yield redis.info() - print info + print(info) res = yield redis.set('test', 42) - print res + print(res) test = yield redis.get('test') - print test + print(test) if __name__ == "__main__": main() --- ./examples/demo.py (original) +++ ./examples/demo.py (refactored) @@ -15,16 +15,16 @@ redis = yield clientCreator.connectTCP(HOST, PORT) res = yield redis.ping() - print res + print(res) info = yield redis.info() - print info + print(info) res = yield redis.set('test', 42) - print res + print(res) test = yield redis.get('test') - print test + print(test) if __name__ == "__main__": main() ++ find ./ -name '*.py' + sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python3|' ./txredis/tests/test_hiredis.py ./txredis/tests/test_client.py ./txredis/tests/__init__.py ./txredis/testing.py ./txredis/protocol.py ./txredis/exceptions.py ./txredis/client.py ./txredis/__init__.py ./setup.py ./examples/pubsub.py ./examples/demo_hiredis.py ./examples/demo.py + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.88319 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd txredis-2.3 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export FFLAGS + /usr/bin/python3 setup.py build running build running build_py creating build creating build/lib creating build/lib/txredis copying txredis/__init__.py -> build/lib/txredis copying txredis/client.py -> build/lib/txredis copying txredis/exceptions.py -> build/lib/txredis copying txredis/protocol.py -> build/lib/txredis copying txredis/testing.py -> build/lib/txredis + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.88319 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python3-module-txredis-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python3-module-txredis-buildroot + cd txredis-2.3 + mkdir -p /usr/src/tmp/python3-module-txredis-buildroot//etc/bash_completion.d + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export FFLAGS + /usr/bin/python3 setup.py install --skip-build --root=/usr/src/tmp/python3-module-txredis-buildroot --force running install running install_lib creating /usr/src/tmp/python3-module-txredis-buildroot/usr creating /usr/src/tmp/python3-module-txredis-buildroot/usr/lib creating /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3 creating /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages creating /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis copying build/lib/txredis/testing.py -> /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis copying build/lib/txredis/protocol.py -> /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis copying build/lib/txredis/exceptions.py -> /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis copying build/lib/txredis/client.py -> /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis copying build/lib/txredis/__init__.py -> /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis byte-compiling /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/testing.py to testing.cpython-38.pyc byte-compiling /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/protocol.py to protocol.cpython-38.pyc byte-compiling /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/exceptions.py to exceptions.cpython-38.pyc byte-compiling /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/client.py to client.cpython-38.pyc byte-compiling /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/__init__.py to __init__.cpython-38.pyc running install_egg_info running egg_info writing txredis.egg-info/PKG-INFO writing dependency_links to txredis.egg-info/dependency_links.txt writing top-level names to txredis.egg-info/top_level.txt reading manifest file 'txredis.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'txredis.egg-info/SOURCES.txt' Copying txredis.egg-info to /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis-2.3-py3.8.egg-info running install_scripts + for i in /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/ /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/ + find /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/ -name tests -type d -print0 + xargs -0 rm -rfv + find /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/ -name test -type d -print0 + xargs -0 rm -rfv + for i in /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/ /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/ + find /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/ -name tests -type d -print0 + xargs -0 rm -rfv + find /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/ -name test -type d -print0 + xargs -0 rm -rfv + rm -fv /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/testing.py removed '/usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/testing.py' + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python3-module-txredis-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python3-module-txredis-buildroot (binconfig,pkgconfig,libtool,desktop) Checking contents of files in /usr/src/tmp/python3-module-txredis-buildroot/ (default) Compressing files in /usr/src/tmp/python3-module-txredis-buildroot (auto) Adjusting library links in /usr/src/tmp/python3-module-txredis-buildroot ./usr/lib: Verifying ELF objects in /usr/src/tmp/python3-module-txredis-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal) Bytecompiling python modules in /usr/src/tmp/python3-module-txredis-buildroot using /usr/bin/python2.7 Bytecompiling python modules with optimization in /usr/src/tmp/python3-module-txredis-buildroot using /usr/bin/python2.7 -O Bytecompiling python3 modules in /usr/src/tmp/python3-module-txredis-buildroot using /usr/bin/python3 unlink /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/__pycache__/__init__.cpython-38.pyc unlink /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/__pycache__/client.cpython-38.pyc unlink /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/__pycache__/exceptions.cpython-38.pyc unlink /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/__pycache__/protocol.cpython-38.pyc unlink /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/__pycache__/testing.cpython-38.pyc compile /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/__init__.py compile /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/client.py compile /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/exceptions.py compile /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/protocol.py Bytecompiling python3 modules with optimization in /usr/src/tmp/python3-module-txredis-buildroot using /usr/bin/python3 -O compile /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/__init__.py compile /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/client.py compile /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/exceptions.py compile /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/protocol.py Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python3-module-txredis-buildroot using /usr/bin/python3 -OO compile /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/__init__.py compile /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/client.py compile /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/exceptions.py compile /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/protocol.py Hardlinking identical .pyc and .opt-?.pyc files './usr/lib/python3/site-packages/txredis/__pycache__/protocol.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/txredis/__pycache__/protocol.cpython-38.pyc' './usr/lib/python3/site-packages/txredis/__pycache__/exceptions.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/txredis/__pycache__/exceptions.cpython-38.pyc' './usr/lib/python3/site-packages/txredis/__pycache__/__init__.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/txredis/__pycache__/__init__.cpython-38.pyc' Hardlinking identical .pyc and .pyo files Processing files: python3-module-txredis-2.3-alt3 Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.73620 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd txredis-2.3 + DOCDIR=/usr/src/tmp/python3-module-txredis-buildroot/usr/share/doc/python3-module-txredis-2.3 + export DOCDIR + rm -rf /usr/src/tmp/python3-module-txredis-buildroot/usr/share/doc/python3-module-txredis-2.3 + /bin/mkdir -p /usr/src/tmp/python3-module-txredis-buildroot/usr/share/doc/python3-module-txredis-2.3 + cp -prL LICENSE.txt README.rst /usr/src/tmp/python3-module-txredis-buildroot/usr/share/doc/python3-module-txredis-2.3 + chmod -R go-w /usr/src/tmp/python3-module-txredis-buildroot/usr/share/doc/python3-module-txredis-2.3 + chmod -R a+rX /usr/src/tmp/python3-module-txredis-buildroot/usr/share/doc/python3-module-txredis-2.3 + exit 0 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.77dRwV 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.Yd2qoR find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks,systemd-services) /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/__init__.py: line=38 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/__init__.py: line=39 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/__init__.py: line=40 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/client.py: skipping itertools /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/client.py: line=10 IGNORE (for REQ=slight and deep=8) module=hiredis /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-txredis-buildroot/usr/lib/python3/site-packages/txredis/client.py: line=1593 IGNORE (for REQ=slight and deep=11) module=twisted.internet Provides: python3(txredis), python3(txredis.client), python3(txredis.exceptions), python3(txredis.protocol) Requires: /usr/lib/python3/site-packages, python3(collections) < 0, python3(twisted.internet) < 0, python3(twisted.internet.protocol) < 0, python3(twisted.protocols) < 0 Wrote: /usr/src/RPM/RPMS/noarch/python3-module-txredis-2.3-alt3.noarch.rpm 9.22user 0.46system 0:11.42elapsed 84%CPU (0avgtext+0avgdata 32032maxresident)k 0inputs+0outputs (0major+138681minor)pagefaults 0swaps 15.91user 4.11system 0:21.69elapsed 92%CPU (0avgtext+0avgdata 114796maxresident)k 0inputs+0outputs (0major+594221minor)pagefaults 0swaps