<86>Dec 21 10:45:34 userdel[13562]: delete user 'rooter' <86>Dec 21 10:45:34 userdel[13562]: removed group 'rooter' owned by 'rooter' <86>Dec 21 10:45:34 userdel[13562]: removed shadow group 'rooter' owned by 'rooter' <86>Dec 21 10:45:34 groupadd[13578]: group added to /etc/group: name=rooter, GID=693 <86>Dec 21 10:45:34 groupadd[13578]: group added to /etc/gshadow: name=rooter <86>Dec 21 10:45:34 groupadd[13578]: new group: name=rooter, GID=693 <86>Dec 21 10:45:34 useradd[13590]: new user: name=rooter, UID=693, GID=693, home=/root, shell=/bin/bash <86>Dec 21 10:45:34 userdel[13615]: delete user 'builder' <86>Dec 21 10:45:34 userdel[13615]: removed group 'builder' owned by 'builder' <86>Dec 21 10:45:34 userdel[13615]: removed shadow group 'builder' owned by 'builder' <86>Dec 21 10:45:34 groupadd[13630]: group added to /etc/group: name=builder, GID=694 <86>Dec 21 10:45:34 groupadd[13630]: group added to /etc/gshadow: name=builder <86>Dec 21 10:45:34 groupadd[13630]: new group: name=builder, GID=694 <86>Dec 21 10:45:34 useradd[13639]: new user: name=builder, UID=694, GID=694, home=/usr/src, shell=/bin/bash /usr/src/in/srpm/python3-module-avro-1.7.7-alt2.src.rpm: license not found in '/usr/share/license' directory: ASLv2.0 <13>Dec 21 10:45:36 rpmi: libgdbm-1.8.3-alt10 1454943334 installed <13>Dec 21 10:45:36 rpmi: libexpat-2.2.4-alt1 1503305345 installed <13>Dec 21 10:45:36 rpmi: libp11-kit-0.23.15-alt1 sisyphus+226408.100.2.1 1554288204 installed <13>Dec 21 10:45:36 rpmi: libtasn1-4.15.0-alt1 sisyphus+241940.100.1.1 1574959866 installed <13>Dec 21 10:45:36 rpmi: rpm-macros-alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Dec 21 10:45:36 rpmi: alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Dec 21 10:45:36 rpmi: ca-certificates-2019.10.28-alt1 sisyphus+239875.300.1.1 1572267834 installed <13>Dec 21 10:45:36 rpmi: ca-trust-0.1.2-alt1 sisyphus+233348.100.1.1 1561653823 installed <13>Dec 21 10:45:36 rpmi: p11-kit-trust-0.23.15-alt1 sisyphus+226408.100.2.1 1554288204 installed <13>Dec 21 10:45:36 rpmi: libcrypto1.1-1.1.1d-alt1.1 sisyphus+237931.100.2.1 1569235729 installed <13>Dec 21 10:45:36 rpmi: libssl1.1-1.1.1d-alt1.1 sisyphus+237931.100.2.1 1569235729 installed <13>Dec 21 10:45:36 rpmi: python3-3.7.4-alt2 sisyphus+239418.100.1.1 1571389913 installed <13>Dec 21 10:45:36 rpmi: libpython3-3.7.4-alt2 sisyphus+239418.100.1.1 1571389913 installed <13>Dec 21 10:45:37 rpmi: python3-base-3.7.4-alt2 sisyphus+239418.100.1.1 1571389913 installed <13>Dec 21 10:45:37 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>Dec 21 10:45:37 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>Dec 21 10:45:40 rpmi: python3-module-pkg_resources-1:41.4.0-alt1 sisyphus+238787.100.2.1 1570608044 installed <13>Dec 21 10:45:40 rpmi: python3-module-pycparser-2.19-alt1 sisyphus+228366.1000.2.3 1556706938 installed <13>Dec 21 10:45:40 rpmi: python3-module-cffi-1.13.2-alt1 sisyphus+240882.100.2.1 1573892898 installed <13>Dec 21 10:45:40 rpmi: libsnappy-1.1.7-alt1 sisyphus+227320.100.1.3 1555618694 installed <13>Dec 21 10:45:40 rpmi: libverto-0.3.0-alt1_7 sisyphus+225932.100.1.1 1553994919 installed <13>Dec 21 10:45:40 rpmi: libtinfo-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686226 installed <13>Dec 21 10:45:40 rpmi: libncurses-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686226 installed <13>Dec 21 10:45:40 rpmi: python3-dev-3.7.4-alt2 sisyphus+239418.100.1.1 1571389913 installed <13>Dec 21 10:45:40 rpmi: libkeyutils-1.6-alt2 sisyphus+226520.100.2.1 1554512089 installed <13>Dec 21 10:45:40 rpmi: libcom_err-1.44.6-alt1 sisyphus+224154.100.1.1 1552091678 installed <86>Dec 21 10:45:40 groupadd[25879]: group added to /etc/group: name=_keytab, GID=499 <86>Dec 21 10:45:40 groupadd[25879]: group added to /etc/gshadow: name=_keytab <86>Dec 21 10:45:40 groupadd[25879]: new group: name=_keytab, GID=499 <13>Dec 21 10:45:40 rpmi: libkrb5-1.17.1-alt1 sisyphus+242784.100.1.1 1576137330 installed <13>Dec 21 10:45:40 rpmi: libtirpc-1.0.3-alt1 1532008017 installed <13>Dec 21 10:45:40 rpmi: libnsl2-1.1.0-alt1_1 1511548749 installed <13>Dec 21 10:45:40 rpmi: python-modules-encodings-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Dec 21 10:45:40 rpmi: python-modules-compiler-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Dec 21 10:45:40 rpmi: python-modules-email-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Dec 21 10:45:40 rpmi: python-modules-unittest-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Dec 21 10:45:40 rpmi: python-modules-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Dec 21 10:45:40 rpmi: python-modules-nis-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Dec 21 10:45:40 rpmi: python-modules-ctypes-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Dec 21 10:45:40 rpmi: python-modules-multiprocessing-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Dec 21 10:45:40 rpmi: python-modules-logging-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Dec 21 10:45:40 rpmi: python-tools-2to3-2.7.17-alt3 sisyphus+240580.200.5.1 1573517321 installed <13>Dec 21 10:45:40 rpmi: python3-module-setuptools-1:41.4.0-alt1 sisyphus+238787.100.2.1 1570608044 installed <13>Dec 21 10:45:40 rpmi: python3-module-snappy-0.5.3-alt3 sisyphus+235493.5300.8.1 1565463464 installed Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/python3-module-avro-1.7.7-alt2.nosrc.rpm Installing python3-module-avro-1.7.7-alt2.src.rpm Building target platforms: i586 Building for target i586 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.30439 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python3-module-avro-1.7.7 + echo 'Source #0 (python3-module-avro-1.7.7.tar):' Source #0 (python3-module-avro-1.7.7.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/python3-module-avro-1.7.7.tar + cd python3-module-avro-1.7.7 + /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: Refactored ./test/test_script.py RefactoringTool: Refactored ./test/test_schema.py RefactoringTool: Refactored ./test/test_protocol.py RefactoringTool: No changes to ./test/test_ipc.py RefactoringTool: Refactored ./test/test_io.py --- ./test/test_script.py (original) +++ ./test/test_script.py (refactored) @@ -15,7 +15,7 @@ # limitations under the License. import unittest import csv -from cStringIO import StringIO +from io import StringIO try: import json except ImportError: @@ -204,7 +204,7 @@ def load_avro(self, filename): out = check_output([SCRIPT, "cat", filename]) - return map(json.loads, out.splitlines()) + return list(map(json.loads, out.splitlines())) def test_version(self): check_call([SCRIPT, "write", "--version"]) --- ./test/test_schema.py (original) +++ ./test/test_schema.py (refactored) @@ -20,10 +20,10 @@ from avro import schema def print_test_name(test_name): - print '' - print test_name - print '=' * len(test_name) - print '' + print('') + print(test_name) + print('=' * len(test_name)) + print('') class ExampleSchema(object): def __init__(self, schema_string, valid, name='', comment=''): --- ./test/test_protocol.py (original) +++ ./test/test_protocol.py (refactored) @@ -354,7 +354,7 @@ num_correct += 1 else: self.fail("Parsed invalid protocol: %s" % (example.name,)) - except Exception, e: + except Exception as e: if not example.valid: num_correct += 1 else: @@ -365,10 +365,10 @@ self.assertEqual(num_correct, len(EXAMPLES), fail_msg) def test_inner_namespace_set(self): - print '' - print 'TEST INNER NAMESPACE' - print '===================' - print '' + print('') + print('TEST INNER NAMESPACE') + print('===================') + print('') proto = protocol.parse(HELLO_WORLD.protocol_string) self.assertEqual(proto.namespace, "com.acme") greeting_type = proto.types_dict['Greeting'] @@ -386,10 +386,10 @@ Test that the string generated by an Avro Protocol object is, in fact, a valid Avro protocol. """ - print '' - print 'TEST CAST TO STRING' - print '===================' - print '' + print('') + print('TEST CAST TO STRING') + print('===================') + print('') num_correct = 0 for example in VALID_EXAMPLES: @@ -402,7 +402,7 @@ except: debug_msg = "%s: STRING CAST FAILURE" % example.name finally: - print debug_msg + print(debug_msg) fail_msg = "Cast to string success on %d out of %d protocols" % \ (num_correct, len(VALID_EXAMPLES)) @@ -415,10 +415,10 @@ to generate Avro protocol "round trip". 3. Ensure "original" and "round trip" protocols are equivalent. """ - print '' - print 'TEST ROUND TRIP' - print '===============' - print '' + print('') + print('TEST ROUND TRIP') + print('===============') + print('') num_correct = 0 for example in VALID_EXAMPLES: --- ./test/test_io.py (original) +++ ./test/test_io.py (refactored) @@ -15,9 +15,9 @@ # limitations under the License. import unittest try: - from cStringIO import StringIO + from io import StringIO except ImportError: - from StringIO import StringIO + from io import StringIO from binascii import hexlify from avro import schema from avro import io @@ -25,7 +25,7 @@ SCHEMAS_TO_VALIDATE = ( ('"null"', None), ('"boolean"', True), - ('"string"', unicode('adsfasdf09809dsf-=adsf')), + ('"string"', str('adsfasdf09809dsf-=adsf')), ('"bytes"', '12345abcd'), ('"int"', 1234), ('"long"', 1234), @@ -68,13 +68,13 @@ DEFAULT_VALUE_EXAMPLES = ( ('"null"', 'null', None), ('"boolean"', 'true', True), - ('"string"', '"foo"', u'foo'), - ('"bytes"', '"\u00FF\u00FF"', u'\xff\xff'), + ('"string"', '"foo"', 'foo'), + ('"bytes"', '"\\u00FF\\u00FF"', '\xff\xff'), ('"int"', '5', 5), - ('"long"', '5', 5L), + ('"long"', '5', 5), ('"float"', '1.1', 1.1), ('"double"', '1.1', 1.1), - ('{"type": "fixed", "name": "F", "size": 2}', '"\u00FF\u00FF"', u'\xff\xff'), + ('{"type": "fixed", "name": "F", "size": 2}', '"\\u00FF\\u00FF"', '\xff\xff'), ('{"type": "enum", "name": "F", "symbols": ["FOO", "BAR"]}', '"FOO"', 'FOO'), ('{"type": "array", "items": "int"}', '[1, 2, 3]', [1, 2, 3]), ('{"type": "map", "values": "int"}', '{"a": 1, "b": 2}', {'a': 1, 'b': 2}), @@ -107,10 +107,10 @@ return ' '.join(bytes) def print_test_name(test_name): - print '' - print test_name - print '=' * len(test_name) - print '' + print('') + print(test_name) + print('=' * len(test_name)) + print('') def write_datum(datum, writers_schema): writer = StringIO() @@ -129,17 +129,17 @@ print_test_name('TEST BINARY %s ENCODING' % number_type.upper()) correct = 0 for datum, hex_encoding in BINARY_ENCODINGS: - print 'Datum: %d' % datum - print 'Correct Encoding: %s' % hex_encoding + print('Datum: %d' % datum) + print('Correct Encoding: %s' % hex_encoding) writers_schema = schema.parse('"%s"' % number_type.lower()) writer, encoder, datum_writer = write_datum(datum, writers_schema) writer.seek(0) hex_val = avro_hexlify(writer) - print 'Read Encoding: %s' % hex_val + print('Read Encoding: %s' % hex_val) if hex_encoding == hex_val: correct += 1 - print '' + print('') return correct def check_skip_number(number_type): @@ -147,7 +147,7 @@ correct = 0 for value_to_skip, hex_encoding in BINARY_ENCODINGS: VALUE_TO_READ = 6253 - print 'Value to Skip: %d' % value_to_skip + print('Value to Skip: %d' % value_to_skip) # write the value to skip and a known value writers_schema = schema.parse('"%s"' % number_type.lower()) @@ -163,9 +163,9 @@ datum_reader = io.DatumReader(writers_schema) read_value = datum_reader.read(decoder) - print 'Read Value: %d' % read_value + print('Read Value: %d' % read_value) if read_value == VALUE_TO_READ: correct += 1 - print '' + print('') return correct class TestIO(unittest.TestCase): @@ -177,27 +177,27 @@ print_test_name('TEST VALIDATE') passed = 0 for example_schema, datum in SCHEMAS_TO_VALIDATE: - print 'Schema: %s' % example_schema - print 'Datum: %s' % datum + print('Schema: %s' % example_schema) + print('Datum: %s' % datum) validated = io.validate(schema.parse(example_schema), datum) - print 'Valid: %s' % validated + print('Valid: %s' % validated) if validated: passed += 1 - self.assertEquals(passed, len(SCHEMAS_TO_VALIDATE)) + self.assertEqual(passed, len(SCHEMAS_TO_VALIDATE)) def test_round_trip(self): print_test_name('TEST ROUND TRIP') correct = 0 for example_schema, datum in SCHEMAS_TO_VALIDATE: - print 'Schema: %s' % example_schema - print 'Datum: %s' % datum + print('Schema: %s' % example_schema) + print('Datum: %s' % datum) writers_schema = schema.parse(example_schema) writer, encoder, datum_writer = write_datum(datum, writers_schema) round_trip_datum = read_datum(writer, writers_schema) - print 'Round Trip Datum: %s' % round_trip_datum + print('Round Trip Datum: %s' % round_trip_datum) if datum == round_trip_datum: correct += 1 - self.assertEquals(correct, len(SCHEMAS_TO_VALIDATE)) + self.assertEqual(correct, len(SCHEMAS_TO_VALIDATE)) # # BINARY ENCODING OF INT AND LONG @@ -205,19 +205,19 @@ def test_binary_int_encoding(self): correct = check_binary_encoding('int') - self.assertEquals(correct, len(BINARY_ENCODINGS)) + self.assertEqual(correct, len(BINARY_ENCODINGS)) def test_binary_long_encoding(self): correct = check_binary_encoding('long') - self.assertEquals(correct, len(BINARY_ENCODINGS)) + self.assertEqual(correct, len(BINARY_ENCODINGS)) def test_skip_int(self): correct = check_skip_number('int') - self.assertEquals(correct, len(BINARY_ENCODINGS)) + self.assertEqual(correct, len(BINARY_ENCODINGS)) def test_skip_long(self): correct = check_skip_number('long') - self.assertEquals(correct, len(BINARY_ENCODINGS)) + self.assertEqual(correct, len(BINARY_ENCODINGS)) # # SCHEMA RESOLUTION @@ -236,10 +236,10 @@ readers_schema = schema.parse(rs) RefactoringTool: Refactored ./test/test_datafile_interop.py RefactoringTool: Refactored ./test/test_datafile.py writer, enc, dw = write_datum(datum_to_write, writers_schema) datum_read = read_datum(writer, writers_schema, readers_schema) - print 'Writer: %s Reader: %s' % (writers_schema, readers_schema) - print 'Datum Read: %s' % datum_read + print('Writer: %s Reader: %s' % (writers_schema, readers_schema)) + print('Datum Read: %s' % datum_read) if datum_read != datum_to_write: incorrect += 1 - self.assertEquals(incorrect, 0) + self.assertEqual(incorrect, 0) def test_unknown_symbol(self): print_test_name('TEST UNKNOWN SYMBOL') @@ -273,9 +273,9 @@ writer, encoder, datum_writer = write_datum(datum_to_write, writers_schema) datum_read = read_datum(writer, writers_schema, readers_schema) - print 'Datum Read: %s' % datum_read + print('Datum Read: %s' % datum_read) if datum_to_read == datum_read: correct += 1 - self.assertEquals(correct, len(DEFAULT_VALUE_EXAMPLES)) + self.assertEqual(correct, len(DEFAULT_VALUE_EXAMPLES)) def test_no_default_value(self): print_test_name('TEST NO DEFAULT VALUE') @@ -305,8 +305,8 @@ writer, encoder, datum_writer = write_datum(datum_to_write, writers_schema) datum_read = read_datum(writer, writers_schema, readers_schema) - print 'Datum Read: %s' % datum_read - self.assertEquals(datum_to_read, datum_read) + print('Datum Read: %s' % datum_read) + self.assertEqual(datum_to_read, datum_read) def test_field_order(self): print_test_name('TEST FIELD ORDER') @@ -321,8 +321,8 @@ writer, encoder, datum_writer = write_datum(datum_to_write, writers_schema) datum_read = read_datum(writer, writers_schema, readers_schema) - print 'Datum Read: %s' % datum_read - self.assertEquals(datum_to_read, datum_read) + print('Datum Read: %s' % datum_read) + self.assertEqual(datum_to_read, datum_read) def test_type_exception(self): print_test_name('TEST TYPE EXCEPTION') --- ./test/test_datafile_interop.py (original) +++ ./test/test_datafile_interop.py (refactored) @@ -21,13 +21,13 @@ class TestDataFileInterop(unittest.TestCase): def test_interop(self): return - print '' - print 'TEST INTEROP' - print '============' - print '' + print('') + print('TEST INTEROP') + print('============') + print('') for f in os.listdir('/home/cutting/src/avro/release-1.7.7-rc0/lang/py/../../build/interop/data'): - print 'READING %s' % f - print '' + print('READING %s' % f) + print('') # read data in binary from file reader = open(os.path.join('/home/cutting/src/avro/release-1.7.7-rc0/lang/py/../../build/interop/data', f), 'rb') --- ./test/test_datafile.py (original) +++ ./test/test_datafile.py (refactored) @@ -22,7 +22,7 @@ SCHEMAS_TO_VALIDATE = ( ('"null"', None), ('"boolean"', True), - ('"string"', unicode('adsfasdf09809dsf-=adsf')), + ('"string"', str('adsfasdf09809dsf-=adsf')), ('"bytes"', '12345abcd'), ('"int"', 1234), ('"long"', 1234), @@ -56,25 +56,25 @@ import snappy CODECS_TO_VALIDATE += ('snappy',) except ImportError: - print 'Snappy not present, will skip testing it.' + print('Snappy not present, will skip testing it.') # TODO(hammer): clean up written files with ant, not os.remove class TestDataFile(unittest.TestCase): def test_round_trip(self): - print '' - print 'TEST ROUND TRIP' - print '===============' - print '' + print('') + print('TEST ROUND TRIP') + print('===============') + print('') correct = 0 for i, (example_schema, datum) in enumerate(SCHEMAS_TO_VALIDATE): for codec in CODECS_TO_VALIDATE: - print '' - print 'SCHEMA NUMBER %d' % (i + 1) - print '================' - print '' - print 'Schema: %s' % example_schema - print 'Datum: %s' % datum - print 'Codec: %s' % codec + print('') + print('SCHEMA NUMBER %d' % (i + 1)) + print('================') + print('') + print('Schema: %s' % example_schema) + print('Datum: %s' RefactoringTool: Refactored ./src/avro/txipc.py RefactoringTool: Refactored ./src/avro/tool.py % datum) + print('Codec: %s' % codec) # write data in binary to file 10 times writer = open(FILENAME, 'wb') @@ -93,30 +93,30 @@ for datum in dfr: round_trip_data.append(datum) - print 'Round Trip Data: %s' % round_trip_data - print 'Round Trip Data Length: %d' % len(round_trip_data) + print('Round Trip Data: %s' % round_trip_data) + print('Round Trip Data Length: %d' % len(round_trip_data)) is_correct = [datum] * 10 == round_trip_data if is_correct: correct += 1 - print 'Correct Round Trip: %s' % is_correct - print '' + print('Correct Round Trip: %s' % is_correct) + print('') os.remove(FILENAME) - self.assertEquals(correct, len(CODECS_TO_VALIDATE)*len(SCHEMAS_TO_VALIDATE)) + self.assertEqual(correct, len(CODECS_TO_VALIDATE)*len(SCHEMAS_TO_VALIDATE)) def test_append(self): - print '' - print 'TEST APPEND' - print '===========' - print '' + print('') + print('TEST APPEND') + print('===========') + print('') correct = 0 for i, (example_schema, datum) in enumerate(SCHEMAS_TO_VALIDATE): for codec in CODECS_TO_VALIDATE: - print '' - print 'SCHEMA NUMBER %d' % (i + 1) - print '================' - print '' - print 'Schema: %s' % example_schema - print 'Datum: %s' % datum - print 'Codec: %s' % codec + print('') + print('SCHEMA NUMBER %d' % (i + 1)) + print('================') + print('') + print('Schema: %s' % example_schema) + print('Datum: %s' % datum) + print('Codec: %s' % codec) # write data in binary to file once writer = open(FILENAME, 'wb') @@ -141,21 +141,21 @@ for datum in dfr: appended_data.append(datum) - print 'Appended Data: %s' % appended_data - print 'Appended Data Length: %d' % len(appended_data) + print('Appended Data: %s' % appended_data) + print('Appended Data Length: %d' % len(appended_data)) is_correct = [datum] * 10 == appended_data if is_correct: correct += 1 - print 'Correct Appended: %s' % is_correct - print '' + print('Correct Appended: %s' % is_correct) + print('') os.remove(FILENAME) - self.assertEquals(correct, len(CODECS_TO_VALIDATE)*len(SCHEMAS_TO_VALIDATE)) + self.assertEqual(correct, len(CODECS_TO_VALIDATE)*len(SCHEMAS_TO_VALIDATE)) def test_context_manager(self): # Context manager was introduced as a first class # member only in Python 2.6 and above. import sys if sys.version_info < (2,6): - print 'Skipping context manager tests on this Python version.' + print('Skipping context manager tests on this Python version.') return # Test the writer with a 'with' statement. writer = open(FILENAME, 'wb') @@ -192,8 +192,8 @@ reader = open(FILENAME, 'rb') datum_reader = io.DatumReader() with datafile.DataFileReader(reader, datum_reader) as dfr: - self.assertEquals('foo', dfr.get_meta('test.string')) - self.assertEquals('1', dfr.get_meta('test.number')) + self.assertEqual('foo', dfr.get_meta('test.string')) + self.assertEqual('1', dfr.get_meta('test.number')) for datum in dfr: datums.append(datum) self.assertTrue(reader.closed) --- ./src/avro/txipc.py (original) +++ ./src/avro/txipc.py (refactored) @@ -16,9 +16,9 @@ # See the License for the specific language governing permissions and # limitations under the License. try: - from cStringIO import StringIO + from io import StringIO except ImportError: - from StringIO import StringIO + from io import StringIO from avro import ipc from avro import io --- ./src/avro/tool.py (original) +++ ./src/avro/tool.py (refactored) @@ -20,8 +20,8 @@ NOTE: The API for the command-line tool is experimental. """ import sys -from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler -import urlparse +from http.server import HTTPServer, BaseHTTPRequestHandleRefactoringTool: Refactored ./src/avro/schema.py r +import urllib.parse from avro import io from avro import datafile from avro import protocol @@ -36,7 +36,7 @@ def invoke(self, message, request): if message.name == self.msg: - print >> sys.stderr, "Message: %s Datum: %s" % (message.name, self.datum) + print("Message: %s Datum: %s" % (message.name, self.datum), file=sys.stderr) # server will shut down after processing a single Avro request global server_should_shutdown server_should_shutdown = True @@ -54,7 +54,7 @@ resp_writer = ipc.FramedWriter(self.wfile) resp_writer.write_framed_message(resp_body) if server_should_shutdown: - print >> sys.stderr, "Shutting down server." + print("Shutting down server.", file=sys.stderr) self.server.force_stop() class StoppableHTTPServer(HTTPServer): @@ -75,25 +75,25 @@ self.serve_forever() def run_server(uri, proto, msg, datum): - url_obj = urlparse.urlparse(uri) + url_obj = urllib.parse.urlparse(uri) server_addr = (url_obj.hostname, url_obj.port) global responder global server_should_shutdown server_should_shutdown = False responder = GenericResponder(proto, msg, datum) server = StoppableHTTPServer(server_addr, GenericHandler) - print "Port: %s" % server.server_port + print("Port: %s" % server.server_port) sys.stdout.flush() server.allow_reuse_address = True - print >> sys.stderr, "Starting server." + print("Starting server.", file=sys.stderr) server.serve_forever() def send_message(uri, proto, msg, datum): - url_obj = urlparse.urlparse(uri) + url_obj = urllib.parse.urlparse(uri) client = ipc.HTTPTransceiver(url_obj.hostname, url_obj.port) proto_json = file(proto, 'r').read() requestor = ipc.Requestor(protocol.parse(proto_json), client) - print requestor.request(msg, datum) + print(requestor.request(msg, datum)) def file_or_stdin(f): if f == "-": @@ -103,20 +103,20 @@ def main(args=sys.argv): if len(args) == 1: - print "Usage: %s [dump|rpcreceive|rpcsend]" % args[0] + print("Usage: %s [dump|rpcreceive|rpcsend]" % args[0]) return 1 if args[1] == "dump": if len(args) != 3: - print "Usage: %s dump input_file" % args[0] + print("Usage: %s dump input_file" % args[0]) return 1 for d in datafile.DataFileReader(file_or_stdin(args[2]), io.DatumReader()): - print repr(d) + print(repr(d)) elif args[1] == "rpcreceive": usage_str = "Usage: %s rpcreceive uri protocol_file " % args[0] usage_str += "message_name (-data d | -file f)" if len(args) not in [5, 7]: - print usage_str + print(usage_str) return 1 uri, proto, msg = args[2:5] datum = None @@ -125,19 +125,19 @@ reader = open(args[6], 'rb') datum_reader = io.DatumReader() dfr = datafile.DataFileReader(reader, datum_reader) - datum = dfr.next() + datum = next(dfr) elif args[5] == "-data": - print "JSON Decoder not yet implemented." + print("JSON Decoder not yet implemented.") return 1 else: - print usage_str + print(usage_str) return 1 run_server(uri, proto, msg, datum) elif args[1] == "rpcsend": usage_str = "Usage: %s rpcsend uri protocol_file " % args[0] usage_str += "message_name (-data d | -file f)" if len(args) not in [5, 7]: - print usage_str + print(usage_str) return 1 uri, proto, msg = args[2:5] datum = None @@ -146,12 +146,12 @@ reader = open(args[6], 'rb') datum_reader = io.DatumReader() dfr = datafile.DataFileReader(reader, datum_reader) - datum = dfr.next() + datum = next(dfr) elif args[5] == "-data": - print "JSON Decoder not yet implemented." + print("JSON Decoder not yet implemented.") return 1 else: - print usage_str + print(usage_str) return 1 send_message(uri, proto, msg, datum) return 0 --- ./src/avro/schema.py (original) +++ ./src/avro/schema.py (refactored) @@ -112,7 +112,7 @@ """Base class for all Schema classes.""" def __init__(self, type, other_props=None): # Ensure valid ctor args - if not isinstance(type, basestring): + if not isinstance(type, str): fail_msg = 'Schema type must be a string.' raise SchemaParseException(fail_msg) elif type not in VALID_TYPES: @@ -165,21 +165,21 @@ @ard default_space: the current default space or None. """ # Ensure valid ctor args - if not (isinstance(name_attr, basestring) or (name_attr is None)): + if not (isinstance(name_attr, str) or (name_attr is None)): fail_msg = 'Name must be non-empty string or None.' raise SchemaParseException(fail_msg) elif name_attr == "": fail_msg = 'Name must be non-empty string or None.' raise SchemaParseException(fail_msg) - if not (isinstance(space_attr, basestring) or (space_attr is None)): + if not (isinstance(space_attr, str) or (space_attr is None)): fail_msg = 'Space must be non-empty string or None.' raise SchemaParseException(fail_msg) elif name_attr == "": fail_msg = 'Space must be non-empty string or None.' raise SchemaParseException(fail_msg) - if not (isinstance(default_space, basestring) or (default_space is None)): + if not (isinstance(default_space, str) or (default_space is None)): fail_msg = 'Default space must be non-empty string or None.' raise SchemaParseException(fail_msg) elif name_attr == "": @@ -227,11 +227,11 @@ def has_name(self, name_attr, space_attr): test = Name(name_attr, space_attr, self.default_namespace).fullname - return self.names.has_key(test) + return test in self.names def get_name(self, name_attr, space_attr): test = Name(name_attr, space_attr, self.default_namespace).fullname - if not self.names.has_key(test): + if test not in self.names: return None return self.names[test] @@ -266,7 +266,7 @@ if to_add.fullname in VALID_TYPES: fail_msg = '%s is a reserved type name.' % to_add.fullname raise SchemaParseException(fail_msg) - elif self.names.has_key(to_add.fullname): + elif to_add.fullname in self.names: fail_msg = 'The name "%s" is already in use.' % to_add.fullname raise SchemaParseException(fail_msg) @@ -280,10 +280,10 @@ if not name: fail_msg = 'Named Schemas must have a non-empty name.' raise SchemaParseException(fail_msg) - elif not isinstance(name, basestring): + elif not isinstance(name, str): fail_msg = 'The name property must be a string.' raise SchemaParseException(fail_msg) - elif namespace is not None and not isinstance(namespace, basestring): + elif namespace is not None and not isinstance(namespace, str): fail_msg = 'The namespace property must be a string.' raise SchemaParseException(fail_msg) @@ -319,7 +319,7 @@ if not name: fail_msg = 'Fields must have a non-empty name.' raise SchemaParseException(fail_msg) - elif not isinstance(name, basestring): + elif not isinstance(name, str): fail_msg = 'The name property must be a string.' raise SchemaParseException(fail_msg) elif order is not None and order not in VALID_FIELD_SORT_ORDERS: @@ -331,13 +331,13 @@ self._has_default = has_default self._props.update(other_props or {}) - if (isinstance(type, basestring) and names is not None + if (isinstance(type, str) and names is not None and names.has_name(type, None)): type_schema = names.get_name(type, None) else: try: type_schema = make_avsc_object(type, names) - except Exception, e: + except Exception as e: fail_msg = 'Type property "%s" not a valid Avro schema: %s' % (type, e) raise SchemaParseException(fail_msg) self.set_prop('type', type_schema) @@ -442,7 +442,7 @@ if not isinstance(symbols, list): fail_msg = 'Enum Schema requires a JSON array for the symbols property.' raise AvroException(failRefactoringTool: Refactored ./src/avro/protocol.py _msg) - elif False in [isinstance(s, basestring) for s in symbols]: + elif False in [isinstance(s, str) for s in symbols]: fail_msg = 'Enum Schems requires All symbols to be JSON strings.' raise AvroException(fail_msg) elif len(set(symbols)) < len(symbols): @@ -482,13 +482,13 @@ Schema.__init__(self, 'array', other_props) # Add class members - if isinstance(items, basestring) and names.has_name(items, None): + if isinstance(items, str) and names.has_name(items, None): items_schema = names.get_name(items, None) else: try: items_schema = make_avsc_object(items, names) - except SchemaParseException, e: - fail_msg = 'Items schema (%s) not a valid Avro schema: %s (known names: %s)' % (items, e, names.names.keys()) + except SchemaParseException as e: + fail_msg = 'Items schema (%s) not a valid Avro schema: %s (known names: %s)' % (items, e, list(names.names.keys())) raise SchemaParseException(fail_msg) self.set_prop('items', items_schema) @@ -514,7 +514,7 @@ Schema.__init__(self, 'map',other_props) # Add class members - if isinstance(values, basestring) and names.has_name(values, None): + if isinstance(values, str) and names.has_name(values, None): values_schema = names.get_name(values, None) else: try: @@ -555,12 +555,12 @@ # Add class members schema_objects = [] for schema in schemas: - if isinstance(schema, basestring) and names.has_name(schema, None): + if isinstance(schema, str) and names.has_name(schema, None): new_schema = names.get_name(schema, None) else: try: new_schema = make_avsc_object(schema, names) - except Exception, e: + except Exception as e: raise SchemaParseException('Union item must be a valid Avro schema: %s' % str(e)) # check the new schema if (new_schema.type in VALID_TYPES and new_schema.type not in NAMED_TYPES @@ -616,7 +616,7 @@ # null values can have a default value of None has_default = False default = None - if field.has_key('default'): + if 'default' in field: has_default = True default = field.get('default') @@ -705,7 +705,7 @@ @args reserved_props: The set of reserved properties to exclude """ if hasattr(all_props, 'items') and callable(all_props.items): - return dict([(k,v) for (k,v) in all_props.items() if k not in + return dict([(k,v) for (k,v) in list(all_props.items()) if k not in reserved_props ]) --- ./src/avro/protocol.py (original) +++ ./src/avro/protocol.py (refactored) @@ -58,8 +58,8 @@ def _parse_messages(self, messages, names): message_objects = {} - for name, body in messages.iteritems(): - if message_objects.has_key(name): + for name, body in messages.items(): + if name in message_objects: fail_msg = 'Message name "%s" repeated.' % name raise ProtocolParseException(fail_msg) elif not(hasattr(body, 'get') and callable(body.get)): @@ -76,10 +76,10 @@ if not name: fail_msg = 'Protocols must have a non-empty name.' raise ProtocolParseException(fail_msg) - elif not isinstance(name, basestring): + elif not isinstance(name, str): fail_msg = 'The name property must be a string.' raise ProtocolParseException(fail_msg) - elif namespace is not None and not isinstance(namespace, basestring): + elif namespace is not None and not isinstance(namespace, str): fail_msg = 'The namespace property must be a string.' raise ProtocolParseException(fail_msg) elif types is not None and not isinstance(types, list): @@ -130,7 +130,7 @@ to_dump['types'] = [ t.to_json(names) for t in self.types ] if self.messages: messages_dict = {} - for name, body in self.messages.iteritems(): + for name, body in self.messages.items(): messages_dict[name] = body.to_json(names) to_dump['messages'] = messages_dict returRefactoringTool: Refactored ./src/avro/ipc.py RefactoringTool: Refactored ./src/avro/io.py n to_dump @@ -151,7 +151,7 @@ return schema.RecordSchema(None, None, request, names, 'request') def _parse_response(self, response, names): - if isinstance(response, basestring) and names.has_name(response, None): + if isinstance(response, str) and names.has_name(response, None): return names.get_name(response, None) else: return schema.make_avsc_object(response, names) --- ./src/avro/ipc.py (original) +++ ./src/avro/ipc.py (refactored) @@ -16,11 +16,11 @@ """ Support for inter-process calls. """ -import httplib +import http.client try: - from cStringIO import StringIO + from io import StringIO except ImportError: - from StringIO import StringIO + from io import StringIO from avro import io from avro import protocol from avro import schema @@ -322,9 +322,9 @@ # perform server logic try: response = self.invoke(local_message, request) - except AvroRemoteException, e: + except AvroRemoteException as e: error = e - except Exception, e: + except Exception as e: error = AvroRemoteException(str(e)) # write response using local protocol @@ -336,7 +336,7 @@ else: writers_schema = local_message.errors self.write_error(writers_schema, error, buffer_encoder) - except schema.AvroException, e: + except schema.AvroException as e: error = AvroRemoteException(str(e)) buffer_encoder = io.BinaryEncoder(StringIO()) META_WRITER.write(response_metadata, buffer_encoder) @@ -467,7 +467,7 @@ """ def __init__(self, host, port, req_resource='/'): self.req_resource = req_resource - self.conn = httplib.HTTPConnection(host, port) + self.conn = http.client.HTTPConnection(host, port) self.conn.connect() # read-only properties --- ./src/avro/io.py (original) +++ ./src/avro/io.py (refactored) @@ -106,17 +106,17 @@ elif schema_type == 'boolean': return isinstance(datum, bool) elif schema_type == 'string': - return isinstance(datum, basestring) + return isinstance(datum, str) elif schema_type == 'bytes': return isinstance(datum, str) elif schema_type == 'int': - return ((isinstance(datum, int) or isinstance(datum, long)) + return ((isinstance(datum, int) or isinstance(datum, int)) and INT_MIN_VALUE <= datum <= INT_MAX_VALUE) elif schema_type == 'long': - return ((isinstance(datum, int) or isinstance(datum, long)) + return ((isinstance(datum, int) or isinstance(datum, int)) and LONG_MIN_VALUE <= datum <= LONG_MAX_VALUE) elif schema_type in ['float', 'double']: - return (isinstance(datum, int) or isinstance(datum, long) + return (isinstance(datum, int) or isinstance(datum, int) or isinstance(datum, float)) elif schema_type == 'fixed': return isinstance(datum, str) and len(datum) == expected_schema.size @@ -127,9 +127,9 @@ False not in [validate(expected_schema.items, d) for d in datum]) elif schema_type == 'map': return (isinstance(datum, dict) and - False not in [isinstance(k, basestring) for k in datum.keys()] and + False not in [isinstance(k, str) for k in list(datum.keys())] and False not in - [validate(expected_schema.values, v) for v in datum.values()]) + [validate(expected_schema.values, v) for v in list(datum.values())]) elif schema_type in ['union', 'error_union']: return True in [validate(s, datum) for s in expected_schema.schemas] elif schema_type in ['record', 'error', 'request']: @@ -197,10 +197,10 @@ The float is converted into a 32-bit integer using a method equivalent to Java's floatToIntBits and then encoded in little-endian format. """ - bits = (((ord(self.read(1)) & 0xffL)) | - ((ord(self.read(1)) & 0xffL) << 8) | - ((ord(self.read(1)) & 0xffL) << 16) | - ((ord(self.read(1)) & 0xffL) << 24)) + bits = (((ord(self.read(1)) & 0xff)) | + ((ord(self.read(1)) & 0xff) << 8) | + ((ord(self.read(1)) & 0xff) << 16) | + ((ord(self.read(1)) & 0xff)RefactoringTool: Refactored ./src/avro/datafile.py RefactoringTool: No changes to ./src/avro/__init__.py RefactoringTool: No changes to ./setup.py RefactoringTool: Files that were modified: RefactoringTool: ./test/test_script.py RefactoringTool: ./test/test_schema.py RefactoringTool: ./test/test_protocol.py RefactoringTool: ./test/test_ipc.py RefactoringTool: ./test/test_io.py RefactoringTool: ./test/test_datafile_interop.py RefactoringTool: ./test/test_datafile.py RefactoringTool: ./src/avro/txipc.py RefactoringTool: ./src/avro/tool.py RefactoringTool: ./src/avro/schema.py RefactoringTool: ./src/avro/protocol.py RefactoringTool: ./src/avro/ipc.py RefactoringTool: ./src/avro/io.py RefactoringTool: ./src/avro/datafile.py RefactoringTool: ./src/avro/__init__.py RefactoringTool: ./setup.py << 24)) return STRUCT_FLOAT.unpack(STRUCT_INT.pack(bits))[0] def read_double(self): @@ -209,14 +209,14 @@ The double is converted into a 64-bit integer using a method equivalent to Java's doubleToLongBits and then encoded in little-endian format. """ - bits = (((ord(self.read(1)) & 0xffL)) | - ((ord(self.read(1)) & 0xffL) << 8) | - ((ord(self.read(1)) & 0xffL) << 16) | - ((ord(self.read(1)) & 0xffL) << 24) | - ((ord(self.read(1)) & 0xffL) << 32) | - ((ord(self.read(1)) & 0xffL) << 40) | - ((ord(self.read(1)) & 0xffL) << 48) | - ((ord(self.read(1)) & 0xffL) << 56)) + bits = (((ord(self.read(1)) & 0xff)) | + ((ord(self.read(1)) & 0xff) << 8) | + ((ord(self.read(1)) & 0xff) << 16) | + ((ord(self.read(1)) & 0xff) << 24) | + ((ord(self.read(1)) & 0xff) << 32) | + ((ord(self.read(1)) & 0xff) << 40) | + ((ord(self.read(1)) & 0xff) << 48) | + ((ord(self.read(1)) & 0xff) << 56)) return STRUCT_DOUBLE.unpack(STRUCT_LONG.pack(bits))[0] def read_bytes(self): @@ -230,7 +230,7 @@ A string is encoded as a long followed by that many bytes of UTF-8 encoded character data. """ - return unicode(self.read_bytes(), "utf-8") + return str(self.read_bytes(), "utf-8") def check_crc32(self, bytes): checksum = STRUCT_CRC32.unpack(self.read(4))[0]; @@ -695,8 +695,8 @@ # fill in default values if len(readers_fields_dict) > len(read_record): writers_fields_dict = writers_schema.fields_dict - for field_name, field in readers_fields_dict.items(): - if not writers_fields_dict.has_key(field_name): + for field_name, field in list(readers_fields_dict.items()): + if field_name not in writers_fields_dict: if field.has_default: field_val = self._read_default_value(field.type, field.default) read_record[field.name] = field_val @@ -721,7 +721,7 @@ elif field_schema.type == 'int': return int(default_value) elif field_schema.type == 'long': - return long(default_value) + return int(default_value) elif field_schema.type in ['float', 'double']: return float(default_value) elif field_schema.type in ['enum', 'fixed', 'string', 'bytes']: @@ -734,7 +734,7 @@ return read_array elif field_schema.type == 'map': read_map = {} - for key, json_val in default_value.items(): + for key, json_val in list(default_value.items()): map_val = self._read_default_value(field_schema.values, json_val) read_map[key] = map_val return read_map @@ -857,7 +857,7 @@ """ if len(datum) > 0: encoder.write_long(len(datum)) - for key, val in datum.items(): + for key, val in list(datum.items()): encoder.write_utf8(key) self.write_data(writers_schema.values, val, encoder) encoder.write_long(0) --- ./src/avro/datafile.py (original) +++ ./src/avro/datafile.py (refactored) @@ -18,9 +18,9 @@ """ import zlib try: - from cStringIO import StringIO + from io import StringIO except ImportError: - from StringIO import StringIO + from io import StringIO from avro import schema from avro import io try: @@ -348,7 +348,7 @@ # TODO(hammer): handle block of length zero # TODO(hammer): clean this up with recursion - def next(self): + def __next__(self): """Return the next datum in the file.""" if self.block_count == 0: if self.is_EOF(): + 2to3 -w -n ./scripts/avro RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ./scripts/avro RefactoringTool: Files that were modified: RefactoringTool: ./scripts/avro --- ./scripts/avro (original) +++ ./scripts/avro (refactored) @@ -27,7 +27,7 @@ import simplejson as json import csv from sys import stdout, stdin -from itertools import ifilter, imap + from functools import partial from os.path import splitext @@ -35,15 +35,15 @@ pass def print_json(row): - print(json.dumps(row)) + print((json.dumps(row))) def print_json_pretty(row): - print(json.dumps(row, indent=4)) + print((json.dumps(row, indent=4))) _write_row = csv.writer(stdout).writerow _encoding = stdout.encoding or "UTF-8" def _encode(v, encoding=_encoding): - if not isinstance(v, basestring): + if not isinstance(v, str): return v return v.encode(_encoding) @@ -81,9 +81,9 @@ # Apply filter first if opts.filter: - avro = ifilter(partial(record_match, opts.filter), avro) - - for i in xrange(opts.skip): + avro = filter(partial(record_match, opts.filter), avro) + + for i in range(opts.skip): try: next(avro) except StopIteration: @@ -91,7 +91,7 @@ fields = parse_fields(opts.fields) if fields: - avro = imap(field_selector(fields), avro) + avro = map(field_selector(fields), avro) printer = select_printer(opts.format) for i, record in enumerate(avro): @@ -104,7 +104,7 @@ def print_schema(avro): schema = avro.meta["avro.schema"] # Pretty print - print json.dumps(json.loads(schema), indent=4) + print(json.dumps(json.loads(schema), indent=4)) def cat(opts, args): if not args: @@ -113,7 +113,7 @@ for filename in args: try: fo = open(filename, "rb") - except (OSError, IOError), e: + except (OSError, IOError) as e: raise AvroError("Can't open %s - %s" % (filename, e)) avro = DataFileReader(fo, DatumReader()) @@ -134,7 +134,7 @@ return open(filename, mode) def iter_json(info, _): - return imap(json.loads, info) + return map(json.loads, info) def convert(value, field): type = field.type.type @@ -143,7 +143,7 @@ return { "int" : int, - "long" : long, + "long" : int, "float" : float, "double" : float, "string" : str, @@ -164,7 +164,7 @@ header = [field.name for field in schema.fields] for row in csv.reader(info): values = [convert(v, f) for v, f in zip(row, schema.fields)] - yield dict(zip(header, values)) + yield dict(list(zip(header, values))) def guess_input_type(files): if not files: @@ -189,7 +189,7 @@ try: schema = avro.schema.parse(open(opts.schema, "rb").read()) out = _open(opts.output, "wb") - except (IOError, OSError), e: + except (IOError, OSError) as e: raise AvroError("Can't open file - %s" % e) writer = DataFileWriter(out, DatumWriter(), schema) @@ -252,9 +252,9 @@ write(opts, args) else: raise AvroError("Unknown command - %s" % command) - except AvroError, e: + except AvroError as e: parser.error("%s" % e) # Will exit - except Exception, e: + except Exception as e: raise SystemExit("panic: %s" % e) if __name__ == "__main__": + sed -i 's|#!.*/usr/bin/env python|#!/usr/bin/env python3|' ./scripts/avro + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.59714 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-avro-1.7.7 + 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 --debug running build running build_py creating build creating build/lib creating build/lib/avro copying src/avro/txipc.py -> build/lib/avro copying src/avro/tool.py -> build/lib/avro copying src/avro/schema.py -> build/lib/avro copying src/avro/protocol.py -> build/lib/avro copying src/avro/ipc.py -> build/lib/avro copying src/avro/io.py -> build/lib/avro copying src/avro/datafile.py -> build/lib/avro copying src/avro/__init__.py -> build/lib/avro running build_scripts creating build/scripts-3.7 copying and adjusting ./scripts/avro -> build/scripts-3.7 changing mode of build/scripts-3.7/avro from 644 to 755 + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.38014 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python3-module-avro-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python3-module-avro-buildroot + cd python3-module-avro-1.7.7 + 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-avro-buildroot --force running install running install_lib creating /usr/src/tmp/python3-module-avro-buildroot creating /usr/src/tmp/python3-module-avro-buildroot/usr creating /usr/src/tmp/python3-module-avro-buildroot/usr/lib creating /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3 creating /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages creating /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro copying build/lib/avro/__init__.py -> /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro copying build/lib/avro/datafile.py -> /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro copying build/lib/avro/io.py -> /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro copying build/lib/avro/ipc.py -> /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro copying build/lib/avro/protocol.py -> /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro copying build/lib/avro/schema.py -> /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro copying build/lib/avro/tool.py -> /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro copying build/lib/avro/txipc.py -> /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro byte-compiling /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/__init__.py to __init__.cpython-37.pyc byte-compiling /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/datafile.py to datafile.cpython-37.pyc byte-compiling /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/io.py to io.cpython-37.pyc byte-compiling /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/ipc.py to ipc.cpython-37.pyc byte-compiling /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/protocol.py to protocol.cpython-37.pyc byte-compiling /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/schema.py to schema.cpython-37.pyc byte-compiling /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/tool.py to tool.cpython-37.pyc byte-compiling /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/txipc.py to txipc.cpython-37.pyc running install_egg_info running egg_info writing avro.egg-info/PKG-INFO writing dependency_links to avro.egg-info/dependency_links.txt writing requirements to avro.egg-info/requires.txt writing top-level names to avro.egg-info/top_level.txt reading manifest file 'avro.egg-info/SOURCES.txt' writing manifest file 'avro.egg-info/SOURCES.txt' Copying avro.egg-info to /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro-1.7.7-py3.7.egg-info running install_scripts creating /usr/src/tmp/python3-module-avro-buildroot/usr/bin copying build/scripts-3.7/avro -> /usr/src/tmp/python3-module-avro-buildroot/usr/bin changing mode of /usr/src/tmp/python3-module-avro-buildroot/usr/bin/avro to 755 + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python3-module-avro-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python3-module-avro-buildroot (binconfig,pkgconfig,libtool,desktop) Checking contents of files in /usr/src/tmp/python3-module-avro-buildroot/ (default) Compressing files in /usr/src/tmp/python3-module-avro-buildroot (auto) Adjusting library links in /usr/src/tmp/python3-module-avro-buildroot ./usr/lib: Verifying ELF objects in /usr/src/tmp/python3-module-avro-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-avro-buildroot using /usr/bin/python2.7 Bytecompiling python modules with optimization in /usr/src/tmp/python3-module-avro-buildroot using /usr/bin/python2.7 -O Bytecompiling python3 modules in /usr/src/tmp/python3-module-avro-buildroot using /usr/bin/python3 unlink /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/__pycache__/__init__.cpython-37.pyc unlink /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/__pycache__/datafile.cpython-37.pyc unlink /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/__pycache__/io.cpython-37.pyc unlink /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/__pycache__/ipc.cpython-37.pyc unlink /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/__pycache__/protocol.cpython-37.pyc unlink /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/__pycache__/schema.cpython-37.pyc unlink /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/__pycache__/tool.cpython-37.pyc unlink /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/__pycache__/txipc.cpython-37.pyc compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/__init__.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/datafile.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/io.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/ipc.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/protocol.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/schema.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/tool.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/txipc.py Bytecompiling python3 modules with optimization in /usr/src/tmp/python3-module-avro-buildroot using /usr/bin/python3 -O compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/__init__.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/datafile.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/io.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/ipc.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/protocol.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/schema.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/tool.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/txipc.py Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python3-module-avro-buildroot using /usr/bin/python3 -OO compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/__init__.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/datafile.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/io.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/ipc.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/protocol.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/schema.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/tool.py compile /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/txipc.py Hardlinking identical .pyc and .opt-?.pyc files './usr/lib/python3/site-packages/avro/__pycache__/txipc.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/avro/__pycache__/txipc.cpython-37.pyc' './usr/lib/python3/site-packages/avro/__pycache__/tool.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/avro/__pycache__/tool.cpython-37.pyc' './usr/lib/python3/site-packages/avro/__pycache__/schema.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/avro/__pycache__/schema.cpython-37.pyc' './usr/lib/python3/site-packages/avro/__pycache__/protocol.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/avro/__pycache__/protocol.cpython-37.pyc' './usr/lib/python3/site-packages/avro/__pycache__/ipc.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/avro/__pycache__/ipc.cpython-37.pyc' './usr/lib/python3/site-packages/avro/__pycache__/io.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/avro/__pycache__/io.cpython-37.pyc' './usr/lib/python3/site-packages/avro/__pycache__/datafile.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/avro/__pycache__/datafile.cpython-37.pyc' './usr/lib/python3/site-packages/avro/__pycache__/__init__.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/avro/__pycache__/__init__.cpython-37.pyc' './usr/lib/python3/site-packages/avro/__pycache__/__init__.cpython-37.opt-2.pyc' => './usr/lib/python3/site-packages/avro/__pycache__/__init__.cpython-37.opt-1.pyc' Hardlinking identical .pyc and .pyo files Executing(%check): /bin/sh -e /usr/src/tmp/rpm-tmp.86688 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-avro-1.7.7 + export PYTHONPATH=/usr/src/RPM/BUILD/python3-module-avro-1.7.7/src + PYTHONPATH=/usr/src/RPM/BUILD/python3-module-avro-1.7.7/src + python3 setup.py test running test running egg_info writing avro.egg-info/PKG-INFO writing dependency_links to avro.egg-info/dependency_links.txt deleting avro.egg-info/requires.txt writing top-level names to avro.egg-info/top_level.txt reading manifest file 'avro.egg-info/SOURCES.txt' writing manifest file 'avro.egg-info/SOURCES.txt' running build_ext ---------------------------------------------------------------------- Ran 0 tests in 0.000s OK + exit 0 Processing files: python3-module-avro-1.7.7-alt2 Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.86688 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-avro-1.7.7 + DOCDIR=/usr/src/tmp/python3-module-avro-buildroot/usr/share/doc/python3-module-avro-1.7.7 + export DOCDIR + rm -rf /usr/src/tmp/python3-module-avro-buildroot/usr/share/doc/python3-module-avro-1.7.7 + /bin/mkdir -p /usr/src/tmp/python3-module-avro-buildroot/usr/share/doc/python3-module-avro-1.7.7 + cp -prL PKG-INFO /usr/src/tmp/python3-module-avro-buildroot/usr/share/doc/python3-module-avro-1.7.7 + chmod -R go-w /usr/src/tmp/python3-module-avro-buildroot/usr/share/doc/python3-module-avro-1.7.7 + chmod -R a+rX /usr/src/tmp/python3-module-avro-buildroot/usr/share/doc/python3-module-avro-1.7.7 + exit 0 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.GEHhZV 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.TOnlkX find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks) /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/bin/avro: line=25 IGNORE (for REQ=slight and deep=8) module=json /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/bin/avro: line=27 IGNORE (for REQ=slight and deep=8) module=simplejson python3.req: /usr/src/tmp/python3-module-avro-buildroot/usr/bin/avro: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/bin/avro: line=206 IGNORE (for REQ=slight and deep=8) module=sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/bin/avro: line=207 IGNORE (for REQ=slight and deep=8) module=optparse /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/datafile.py: line=21 IGNORE (for REQ=slight and deep=8) module=io /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/datafile.py: line=23 IGNORE (for REQ=slight and deep=8) module=io /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/datafile.py: line=27 IGNORE (for REQ=slight and deep=8) module=snappy /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/datafile.py: line=372 IGNORE (for REQ=slight and deep=12) module=os /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/datafile.py: line=375 IGNORE (for REQ=slight and deep=12) module=random python3.req: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/io.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/io.py: line=45 IGNORE (for REQ=slight and deep=8) module=json /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/io.py: line=47 IGNORE (for REQ=slight and deep=8) module=simplejson /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/ipc.py: line=21 IGNORE (for REQ=slight and deep=8) module=io /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/ipc.py: line=23 IGNORE (for REQ=slight and deep=8) module=io /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/protocol.py: line=20 IGNORE (for REQ=slight and deep=8) module=hashlib /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/protocol.py: line=22 IGNORE (for REQ=slight and deep=8) module=md5 /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/protocol.py: line=24 IGNORE (for REQ=slight and deep=8) module=json /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/protocol.py: line=26 IGNORE (for REQ=slight and deep=8) module=simplejson /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/schema.py: line=37 IGNORE (for REQ=slight and deep=8) module=json /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/schema.py: line=39 IGNORE (for REQ=slight and deep=8) module=simplejson python3.req: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/tool.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/txipc.py: line=19 IGNORE (for REQ=slight and deep=8) module=io /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/txipc.py: line=21 IGNORE (for REQ=slight and deep=8) module=io /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/txipc.py: line=169 IGNORE (for REQ=slight and deep=15) module=uuid /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/txipc.py: line=173 IGNORE (for REQ=slight and deep=15) module=twisted.internet shebang.req.files: executable script /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/tool.py is not executable shebang.req.files: executable script /usr/src/tmp/python3-module-avro-buildroot/usr/lib/python3/site-packages/avro/txipc.py is not executable Provides: python2.7(avro), python3(avro), python3(avro.datafile), python3(avro.io), python3(avro.ipc), python3(avro.protocol), python3(avro.schema), python3(avro.tool), python3(avro.txipc) Requires: /usr/bin/python3, /usr/lib/python3/site-packages, python3(binascii) < 0, python3(csv) < 0, python3(functools) < 0, python3(http.client) < 0, python3(http.server) < 0, python3(os.path) < 0, python3(struct) < 0, python3(twisted.internet.defer) < 0, python3(twisted.internet.protocol) < 0, python3(twisted.web) < 0, python3(twisted.web.client) < 0, python3(twisted.web.http_headers) < 0, python3(twisted.web.iweb) < 0, python3(urllib.parse) < 0, python3(zlib) < 0, python3(zope.interface) < 0 Wrote: /usr/src/RPM/RPMS/noarch/python3-module-avro-1.7.7-alt2.noarch.rpm 10.47user 0.46system 0:14.31elapsed 76%CPU (0avgtext+0avgdata 28648maxresident)k 0inputs+0outputs (0major+167271minor)pagefaults 0swaps /.out/python3-module-avro-1.7.7-alt2.noarch.rpm: license not found in '/usr/share/license' directory: ASLv2.0 17.53user 3.42system 0:25.85elapsed 81%CPU (0avgtext+0avgdata 109412maxresident)k 64inputs+0outputs (0major+565462minor)pagefaults 0swaps