Mock Version: 1.4.13 Mock Version: 1.4.13 ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target noarch --nodeps /builddir/build/SPECS/python-tablib.spec'], chrootPath='/var/lib/mock/f30-build-14808380-1053727/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'}shell=Falselogger=timeout=172800uid=1000gid=425user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target noarch --nodeps /builddir/build/SPECS/python-tablib.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'} and shell False Building target platforms: noarch Building for target noarch Wrote: /builddir/build/SRPMS/python-tablib-0.12.1-8.fc30.src.rpm Child return code was: 0 ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target noarch --nodeps /builddir/build/SPECS/python-tablib.spec'], chrootPath='/var/lib/mock/f30-build-14808380-1053727/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'}shell=Falselogger=timeout=172800uid=1000gid=425user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target noarch --nodeps /builddir/build/SPECS/python-tablib.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'} and shell False Building target platforms: noarch Building for target noarch Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.5q8jpa + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf tablib-0.12.1 + /usr/bin/gzip -dc /builddir/build/SOURCES/tablib-0.12.1.tar.gz + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + cd tablib-0.12.1 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . Patch #1 (fix-openpyxl-2.5.x-compat-pr-296.patch): + echo 'Patch #1 (fix-openpyxl-2.5.x-compat-pr-296.patch):' + /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 patching file tablib/formats/_xlsx.py BUILDSTDERR: ++ find . -name '*.py' + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./test_tablib.py + touch -r ./test_tablib.py ./test_tablib.py.new + mv ./test_tablib.py.new ./test_tablib.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./setup.py + touch -r ./setup.py ./setup.py.new + mv ./setup.py.new ./setup.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/__init__.py + touch -r ./tablib/__init__.py ./tablib/__init__.py.new + mv ./tablib/__init__.py.new ./tablib/__init__.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/formats/__init__.py + touch -r ./tablib/formats/__init__.py ./tablib/formats/__init__.py.new + mv ./tablib/formats/__init__.py.new ./tablib/formats/__init__.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/formats/_latex.py + touch -r ./tablib/formats/_latex.py ./tablib/formats/_latex.py.new + mv ./tablib/formats/_latex.py.new ./tablib/formats/_latex.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/formats/_xlsx.py + touch -r ./tablib/formats/_xlsx.py ./tablib/formats/_xlsx.py.new + mv ./tablib/formats/_xlsx.py.new ./tablib/formats/_xlsx.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/formats/_xls.py + touch -r ./tablib/formats/_xls.py ./tablib/formats/_xls.py.new + mv ./tablib/formats/_xls.py.new ./tablib/formats/_xls.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/formats/_tsv.py + touch -r ./tablib/formats/_tsv.py ./tablib/formats/_tsv.py.new + mv ./tablib/formats/_tsv.py.new ./tablib/formats/_tsv.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/formats/_csv.py + touch -r ./tablib/formats/_csv.py ./tablib/formats/_csv.py.new + mv ./tablib/formats/_csv.py.new ./tablib/formats/_csv.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/formats/_df.py + touch -r ./tablib/formats/_df.py ./tablib/formats/_df.py.new + mv ./tablib/formats/_df.py.new ./tablib/formats/_df.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/formats/_dbf.py + touch -r ./tablib/formats/_dbf.py ./tablib/formats/_dbf.py.new + mv ./tablib/formats/_dbf.py.new ./tablib/formats/_dbf.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/formats/_json.py + touch -r ./tablib/formats/_json.py ./tablib/formats/_json.py.new + mv ./tablib/formats/_json.py.new ./tablib/formats/_json.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/formats/_ods.py + touch -r ./tablib/formats/_ods.py ./tablib/formats/_ods.py.new + mv ./tablib/formats/_ods.py.new ./tablib/formats/_ods.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/formats/_yaml.py + touch -r ./tablib/formats/_yaml.py ./tablib/formats/_yaml.py.new + mv ./tablib/formats/_yaml.py.new ./tablib/formats/_yaml.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/formats/_html.py + touch -r ./tablib/formats/_html.py ./tablib/formats/_html.py.new + mv ./tablib/formats/_html.py.new ./tablib/formats/_html.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/packages/__init__.py + touch -r ./tablib/packages/__init__.py ./tablib/packages/__init__.py.new + mv ./tablib/packages/__init__.py.new ./tablib/packages/__init__.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/packages/dbfpy3/__init__.py + touch -r ./tablib/packages/dbfpy3/__init__.py ./tablib/packages/dbfpy3/__init__.py.new + mv ./tablib/packages/dbfpy3/__init__.py.new ./tablib/packages/dbfpy3/__init__.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/packages/dbfpy3/header.py + touch -r ./tablib/packages/dbfpy3/header.py ./tablib/packages/dbfpy3/header.py.new + mv ./tablib/packages/dbfpy3/header.py.new ./tablib/packages/dbfpy3/header.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/packages/dbfpy3/dbf.py + touch -r ./tablib/packages/dbfpy3/dbf.py ./tablib/packages/dbfpy3/dbf.py.new + mv ./tablib/packages/dbfpy3/dbf.py.new ./tablib/packages/dbfpy3/dbf.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/packages/dbfpy3/record.py + touch -r ./tablib/packages/dbfpy3/record.py ./tablib/packages/dbfpy3/record.py.new + mv ./tablib/packages/dbfpy3/record.py.new ./tablib/packages/dbfpy3/record.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/packages/dbfpy3/fields.py + touch -r ./tablib/packages/dbfpy3/fields.py ./tablib/packages/dbfpy3/fields.py.new + mv ./tablib/packages/dbfpy3/fields.py.new ./tablib/packages/dbfpy3/fields.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/packages/dbfpy3/dbfnew.py + touch -r ./tablib/packages/dbfpy3/dbfnew.py ./tablib/packages/dbfpy3/dbfnew.py.new + mv ./tablib/packages/dbfpy3/dbfnew.py.new ./tablib/packages/dbfpy3/dbfnew.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/packages/dbfpy3/utils.py + touch -r ./tablib/packages/dbfpy3/utils.py ./tablib/packages/dbfpy3/utils.py.new + mv ./tablib/packages/dbfpy3/utils.py.new ./tablib/packages/dbfpy3/utils.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/packages/dbfpy/__init__.py + touch -r ./tablib/packages/dbfpy/__init__.py ./tablib/packages/dbfpy/__init__.py.new + mv ./tablib/packages/dbfpy/__init__.py.new ./tablib/packages/dbfpy/__init__.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/packages/dbfpy/header.py + touch -r ./tablib/packages/dbfpy/header.py ./tablib/packages/dbfpy/header.py.new + mv ./tablib/packages/dbfpy/header.py.new ./tablib/packages/dbfpy/header.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/packages/dbfpy/dbf.py + touch -r ./tablib/packages/dbfpy/dbf.py ./tablib/packages/dbfpy/dbf.py.new + mv ./tablib/packages/dbfpy/dbf.py.new ./tablib/packages/dbfpy/dbf.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/packages/dbfpy/record.py + touch -r ./tablib/packages/dbfpy/record.py ./tablib/packages/dbfpy/record.py.new + mv ./tablib/packages/dbfpy/record.py.new ./tablib/packages/dbfpy/record.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/packages/dbfpy/fields.py + touch -r ./tablib/packages/dbfpy/fields.py ./tablib/packages/dbfpy/fields.py.new + mv ./tablib/packages/dbfpy/fields.py.new ./tablib/packages/dbfpy/fields.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/packages/dbfpy/dbfnew.py + touch -r ./tablib/packages/dbfpy/dbfnew.py ./tablib/packages/dbfpy/dbfnew.py.new + mv ./tablib/packages/dbfpy/dbfnew.py.new ./tablib/packages/dbfpy/dbfnew.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/packages/dbfpy/utils.py + touch -r ./tablib/packages/dbfpy/utils.py ./tablib/packages/dbfpy/utils.py.new + mv ./tablib/packages/dbfpy/utils.py.new ./tablib/packages/dbfpy/utils.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/packages/ordereddict.py + touch -r ./tablib/packages/ordereddict.py ./tablib/packages/ordereddict.py.new + mv ./tablib/packages/ordereddict.py.new ./tablib/packages/ordereddict.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/packages/markup.py + touch -r ./tablib/packages/markup.py ./tablib/packages/markup.py.new + mv ./tablib/packages/markup.py.new ./tablib/packages/markup.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/packages/markup3.py + touch -r ./tablib/packages/markup3.py ./tablib/packages/markup3.py.new + mv ./tablib/packages/markup3.py.new ./tablib/packages/markup3.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/compat.py + touch -r ./tablib/compat.py ./tablib/compat.py.new + mv ./tablib/compat.py.new ./tablib/compat.py + for lib in $(find . -name "*.py") + sed '/\/usr\/bin\/env/d' ./tablib/core.py + touch -r ./tablib/core.py ./tablib/core.py.new + mv ./tablib/core.py.new ./tablib/core.py + sed -i '/\(xlwt\|odf\|xlrd\|openpyxl\|openpyxl\..*\|yaml\)'\''/d' setup.py + find . -name '*.py' + grep -v 3 + xargs 2to3 -w BUILDSTDERR: RefactoringTool: Skipping optional fixer: buffer BUILDSTDERR: RefactoringTool: Skipping optional fixer: idioms BUILDSTDERR: RefactoringTool: Skipping optional fixer: set_literal BUILDSTDERR: RefactoringTool: Skipping optional fixer: ws_comma BUILDSTDERR: RefactoringTool: Refactored ./test_tablib.py BUILDSTDERR: RefactoringTool: No changes to ./setup.py BUILDSTDERR: RefactoringTool: No changes to ./tablib/__init__.py BUILDSTDERR: RefactoringTool: No changes to ./tablib/formats/__init__.py BUILDSTDERR: RefactoringTool: Refactored ./tablib/formats/_latex.py BUILDSTDERR: RefactoringTool: Refactored ./tablib/formats/_xlsx.py BUILDSTDERR: RefactoringTool: Refactored ./tablib/formats/_xls.py BUILDSTDERR: RefactoringTool: No changes to ./tablib/formats/_tsv.py BUILDSTDERR: RefactoringTool: No changes to ./tablib/formats/_csv.py BUILDSTDERR: RefactoringTool: Refactored ./tablib/formats/_df.py BUILDSTDERR: RefactoringTool: No changes to ./tablib/formats/_dbf.py BUILDSTDERR: RefactoringTool: No changes to ./tablib/formats/_json.py BUILDSTDERR: RefactoringTool: Refactored ./tablib/formats/_ods.py BUILDSTDERR: RefactoringTool: No changes to ./tablib/formats/_yaml.py BUILDSTDERR: RefactoringTool: Refactored ./tablib/formats/_html.py BUILDSTDERR: RefactoringTool: Refactored ./tablib/packages/dbfpy/header.py BUILDSTDERR: RefactoringTool: Refactored ./tablib/packages/dbfpy/dbf.py --- ./test_tablib.py (original) +++ ./test_tablib.py (refactored) @@ -8,7 +8,7 @@ import datetime import tablib -from tablib.compat import markup, unicode, is_py3 +from tablib.compat import markup, str, is_py3 from tablib.core import Row @@ -869,7 +869,7 @@ data.csv = self.founders.csv headers = data.headers - self.assertTrue(isinstance(headers[0], unicode)) + self.assertTrue(isinstance(headers[0], str)) orig_first_name = self.founders[self.headers[0]] csv_first_name = data[headers[0]] @@ -882,7 +882,7 @@ data.csv = self.founders.csv target_header = data.headers[0] - self.assertTrue(isinstance(target_header, unicode)) + self.assertTrue(isinstance(target_header, str)) del data[target_header] @@ -906,7 +906,7 @@ # add another entry to test right field width for # integer self.founders.append(('Old', 'Man', 100500)) - self.assertEqual('first_name|last_name |gpa ', unicode(self.founders).split('\n')[0]) + self.assertEqual('first_name|last_name |gpa ', str(self.founders).split('\n')[0]) def test_databook_add_sheet_accepts_only_dataset_instances(self): class NotDataset(object): --- ./tablib/formats/_latex.py (original) +++ ./tablib/formats/_latex.py (refactored) @@ -6,7 +6,7 @@ """ import re -from tablib.compat import unicode +from tablib.compat import str title = 'latex' extensions = ('tex',) @@ -41,7 +41,7 @@ ]) TEX_RESERVED_SYMBOLS_RE = re.compile( - '(%s)' % '|'.join(map(re.escape, TEX_RESERVED_SYMBOLS_MAP.keys()))) + '(%s)' % '|'.join(map(re.escape, list(TEX_RESERVED_SYMBOLS_MAP.keys())))) def export_set(dataset): @@ -119,7 +119,7 @@ :param row: single dataset row """ - new_row = [_escape_tex_reserved_symbols(unicode(item)) if item else '' for + new_row = [_escape_tex_reserved_symbols(str(item)) if item else '' for item in row] return 6 * ' ' + ' & '.join(new_row) + ' \\\\' --- ./tablib/formats/_xlsx.py (original) +++ ./tablib/formats/_xlsx.py (refactored) @@ -9,7 +9,7 @@ if sys.version_info[0] > 2: from io import BytesIO else: - from cStringIO import StringIO as BytesIO + from io import StringIO as BytesIO import openpyxl import tablib @@ -18,7 +18,7 @@ ExcelWriter = openpyxl.writer.excel.ExcelWriter get_column_letter = openpyxl.utils.get_column_letter -from tablib.compat import unicode +from tablib.compat import str title = 'xlsx' @@ -124,7 +124,7 @@ # bold headers if (row_number == 1) and dataset.headers: # cell.value = unicode('%s' % col, errors='ignore') - cell.value = unicode(col) + cell.value = str(col) cell.font = bold if freeze_panes: # Export Freeze only after first Line @@ -132,18 +132,18 @@ # bold separators elif len(row) < dataset.width: - cell.value = unicode('%s' % col, errors='ignore') + cell.value = str('%s' % col, errors='ignore') cell.font = bold # wrap the rest else: try: if '\n' in col: - cell.value = unicode('%s' % col, errors='ignore') + cell.value = str('%s' % col, errors='ignore') cell.alignment = wrap_text else: - cell.value = unicode('%s' % col, errors='ignore') + cell.value = str('%s' % col, errors='ignore') except TypeError: - cell.value = unicode(col) + cell.value = str(col) --- ./tablib/formats/_xls.py (original) +++ ./tablib/formats/_xls.py (refactored) @@ -77,7 +77,7 @@ dset.title = sheet.name - for i in xrange(sheet.nrows): + for i in range(sheet.nrows): if (i == 0) and (headers): dset.headers = sheet.row_values(0) else: @@ -94,7 +94,7 @@ data = tablib.Dataset() data.title = sheet.name - for i in xrange(sheet.nrows): + for i in range(sheet.nrows): if (i == 0) and (headers): data.headers = sheet.row_values(0) else: --- ./tablib/formats/_df.py (original) +++ ./tablib/formats/_df.py (refactored) @@ -8,7 +8,7 @@ if sys.version_info[0] > 2: from io import BytesIO else: - from cStringIO import StringIO as BytesIO + from io import StringIO as BytesIO try: from pandas import DataFrame @@ -17,7 +17,7 @@ import tablib -from tablib.compat import unicode +from tablib.compat import str title = 'df' extensions = ('df', ) --- ./tablib/formats/_ods.py (original) +++ ./tablib/formats/_ods.py (refactored) @@ -4,7 +4,7 @@ """ from odf import opendocument, style, table, text -from tablib.compat import BytesIO, unicode +from tablib.compat import BytesIO, str title = 'ods' extensions = ('ods',) @@ -57,7 +57,7 @@ odf_row = table.TableRow(stylename=bold, defaultcellstylename='bold') for j, col in enumerate(row): try: - col = unicode(col, errors='ignore') + col = str(col, errors='ignore') except TypeError: ## col is already unicode pass --- ./tablib/formats/_html.py (original) +++ ./tablib/formats/_html.py (refactored) @@ -9,11 +9,11 @@ from io import BytesIO as StringIO from tablib.packages import markup3 as markup else: - from cStringIO import StringIO + from io import StringIO from tablib.packages import markup import tablib -from tablib.compat import unicode +from tablib.compat import str import codecs BOOK_ENDINGS = 'h3' @@ -48,7 +48,7 @@ # Allow unicode characters in output wrapper = codecs.getwriter("utf8")(stream) - wrapper.writelines(unicode(page)) + wrapper.writelines(str(page)) return stream.getvalue().decode('utf-8') --- ./tablib/packages/dbfpy/header.py (original) +++ ./tablib/packages/dbfpy/header.py (refactored) @@ -20,7 +20,7 @@ __all__ = ["DbfHeader"] try: - import cStringIO + import io except ImportError: # when we're in python3, we cStringIO has been replaced by io.StringIO import io as cStringIO @@ -102,7 +102,7 @@ # @classmethod def fromString(cls, string): """Return header instance from the string object.""" - return cls.fromStream(cStringIO.StringIO(str(string))) + return cls.fromStream(io.StringIO(str(string))) fromString = classmethod(fromString) # @classmethod @@ -261,7 +261,7 @@ def __getitem__(self, item): """Return a field definition by numeric index or name string""" - if isinstance(item, basestring): + if isinstance(item, str): _name = item.upper() for _field in self.fields: if _field.name == _name: --- ./tablib/packages/dbfpy/dbf.py (original) +++ ./tablib/packages/dbfpy/dbf.py (refactored) @@ -63,7 +63,7 @@ from . import header from . import record -from utils import INVALID_VALUE +from .utils import INVALID_VALUE class Dbf(object): @@ -113,7 +113,7 @@ ``INVALID_VALUE`` instead of raising conversion error. """ - if isinstance(f, basestring): + if isinstance(f, str): # a filename self.name = f if new: @@ -176,7 +176,7 @@ Return value is numeric object maning valid index. """ - if not isinstance(index, (int, long)): + if not isinstance(index, int): raise TypeError("Index must be a numeric object") if index < 0: # index from the right side @@ -257,8 +257,8 @@ def demo_read(filename): _dbf = Dbf(filename, True) for _rec in _dbf: - print - print(repr(_rec)) + print() + print((repr(_rec))) _dbf.close() @@ -282,7 +282,7 @@ _rec["INITIALS"] = _i _rec["BIRTHDATE"] = _b _rec.store() BUILDSTDERR: - print(repr(_dbf))RefactoringTool: Refactored ./tablib/packages/dbfpy/record.py BUILDSTDERR: RefactoringTool: Refactored ./tablib/packages/dbfpy/fields.py BUILDSTDERR: RefactoringTool: Refactored ./tablib/packages/dbfpy/dbfnew.py BUILDSTDERR: RefactoringTool: Refactored ./tablib/packages/dbfpy/utils.py BUILDSTDERR: RefactoringTool: No changes to ./tablib/packages/ordereddict.py BUILDSTDERR: RefactoringTool: Refactored ./tablib/packages/markup.py + print((repr(_dbf))) _dbf.close() --- ./tablib/packages/dbfpy/record.py (original) +++ ./tablib/packages/dbfpy/record.py (refactored) @@ -16,9 +16,9 @@ __all__ = ["DbfRecord"] -from itertools import izip - -import utils + + +from . import utils class DbfRecord(object): """DBF record. @@ -220,7 +220,7 @@ """Return string packed record values.""" return "".join([" *"[self.deleted]] + [ _def.encodeValue(_dat) - for (_def, _dat) in izip(self.dbf.header.fields, self.fieldData) + for (_def, _dat) in zip(self.dbf.header.fields, self.fieldData) ]) def asList(self): @@ -241,11 +241,11 @@ real values stored in this object. """ - return dict([_i for _i in izip(self.dbf.fieldNames, self.fieldData)]) + return dict([_i for _i in zip(self.dbf.fieldNames, self.fieldData)]) def __getitem__(self, key): """Return value by field name or field index.""" - if isinstance(key, (long, int)): + if isinstance(key, int): # integer index of the field return self.fieldData[key] # assuming string field name @@ -253,7 +253,7 @@ def __setitem__(self, key, value): """Set field value by integer index of the field or string name.""" - if isinstance(key, (int, long)): + if isinstance(key, int): # integer index of the field return self.fieldData[key] # assuming string field name --- ./tablib/packages/dbfpy/fields.py (original) +++ ./tablib/packages/dbfpy/fields.py (refactored) @@ -456,7 +456,7 @@ ## register generic types -for (_name, _val) in globals().items(): +for (_name, _val) in list(globals().items()): if isinstance(_val, type) and issubclass(_val, DbfFieldDef) \ and (_name != "DbfFieldDef"): __all__.append(_name) --- ./tablib/packages/dbfpy/dbfnew.py (original) +++ ./tablib/packages/dbfpy/dbfnew.py (refactored) @@ -24,10 +24,10 @@ __all__ = ["dbf_new"] -from dbf import * -from fields import * -from header import * -from record import * +from .dbf import * +from .fields import * +from .header import * +from .record import * class _FieldDefinition(object): @@ -160,9 +160,9 @@ dbfn.add_field("date", 'D', 8) dbfn.write("tst.dbf") # test new dbf - print "*** created tst.dbf: ***" + print("*** created tst.dbf: ***") dbft = Dbf('tst.dbf', readOnly=0) - print repr(dbft) + print(repr(dbft)) # add a record rec = DbfRecord(dbft) rec['name'] = 'something' @@ -177,13 +177,13 @@ rec.store() # show the records - print "*** inserted 2 records into tst.dbf: ***" - print repr(dbft) + print("*** inserted 2 records into tst.dbf: ***") + print(repr(dbft)) for i1 in range(len(dbft)): rec = dbft[i1] for fldName in dbft.fieldNames: - print '%s:\t %s' % (fldName, rec[fldName]) - print + print('%s:\t %s' % (fldName, rec[fldName])) + print() dbft.close() # vim: set et sts=4 sw=4 : --- ./tablib/packages/dbfpy/utils.py (original) +++ ./tablib/packages/dbfpy/utils.py (refactored) @@ -60,10 +60,10 @@ return date if isinstance(date, datetime.datetime): return date.date() - if isinstance(date, (int, long, float)): + if isinstance(date, (int, float)): # date is a timestamp return datetime.date.fromtimestamp(date) - if isinstance(date, basestring): + if isinstance(date, str): date = date.replace(" ", "0") if len(date) == 6: # yymmdd @@ -107,10 +107,10 @@ return value if isinstance(value, datetime.date): return datetime.datetime.fromordinal(value.toordinal()) - if isinstance(value, (int, long, float)): + if isinstance(value, (int, float)): # value is a timestamp return datetime.datetime.fromtimestamp(value) - if isinstance(value, basestring): + if isinstance(value, str): raise NotImplementedError("Strings aren't currently implemented") if hasattr(value, "__getitem__"): # a sequence (assuming date/time tuple) @@ -145,7 +145,7 @@ def __ne__(self, other): return not (other is self) - def __nonzero__(self): + def __bool__(self): return False def __int__(self): @@ -159,7 +159,7 @@ return "" def __unicode__(self): - return u"" + return "" def __repr__(self): return "" --- ./tablib/packages/markup.py (original) +++ ./tablib/packages/markup.py (refactored) @@ -67,22 +67,22 @@ def render( self, tag, single, between, kwargs ): """Append the actual tags to content.""" - out = u"<%s" % tag - for key, value in kwargs.iteritems( ): + out = "<%s" % tag + for key, value in kwargs.items( ): if value is not None: # when value is None that means stuff like <... checked> key = key.strip('_') # strip this so class_ will mean class, etc. if key in ['http_equiv', 'accept_charset']: key.replace('_','-') - out = u"%s %s=\"%s\"" % ( out, key, escape( value ) ) + out = "%s %s=\"%s\"" % ( out, key, escape( value ) ) else: - out = u"%s %s" % ( out, key ) + out = "%s %s" % ( out, key ) if between is not None: - out = u"%s>%s" % ( out, between, tag ) + out = "%s>%s" % ( out, between, tag ) else: if single: - out = u"%s />" % out + out = "%s />" % out else: - out = u"%s>" % out + out = "%s>" % out if self.parent is not None: self.parent.content.append( out ) else: @@ -154,17 +154,17 @@ if mode == 'strict_html' or mode == 'html': self.onetags = valid_onetags - self.onetags += map( string.lower, self.onetags ) + self.onetags += list(map( string.lower, self.onetags )) self.twotags = valid_twotags - self.twotags += map( string.lower, self.twotags ) + self.twotags += list(map( string.lower, self.twotags )) self.deptags = deprecated_onetags + deprecated_twotags - self.deptags += map( string.lower, self.deptags ) + self.deptags += list(map( string.lower, self.deptags )) self.mode = 'strict_html' elif mode == 'loose_html': self.onetags = valid_onetags + deprecated_onetags - self.onetags += map( string.lower, self.onetags ) + self.onetags += list(map( string.lower, self.onetags )) self.twotags = valid_twotags + deprecated_twotags - self.twotags += map( string.lower, self.twotags ) + self.twotags += list(map( string.lower, self.twotags )) self.mode = mode elif mode == 'xml': if onetags and twotags: @@ -305,7 +305,7 @@ """This convenience function is only useful for html. It adds css stylesheet(s) to the document via the element.""" - if isinstance( filelist, basestring ): + if isinstance( filelist, str ): self.link( href=filelist, rel='stylesheet', type='text/css', media='all' ) else: for file in filelist: @@ -317,7 +317,7 @@ a dictionary of the form { 'name':'content' }.""" if isinstance( mydict, dict ): - for name, content in mydict.iteritems( ): + for name, content in mydict.items( ): self.meta( name=name, content=content ) else: raise TypeError ("Metainfo should be called with a dictionary argument of name:content pairs.") @@ -327,7 +327,7 @@ be rendered as """ if isinstance( mydict, dict ): - for src, type in mydict.iteritems( ): + for src, type in mydict.items( ): BUILDSTDERR: self.script( '', src=src, type='text/%s' % type )RefactoringTool: Refactored ./tablib/compat.py BUILDSTDERR: RefactoringTool: Refactored ./tablib/core.py BUILDSTDERR: RefactoringTool: Files that were modified: BUILDSTDERR: RefactoringTool: ./test_tablib.py BUILDSTDERR: RefactoringTool: ./setup.py BUILDSTDERR: RefactoringTool: ./tablib/__init__.py BUILDSTDERR: RefactoringTool: ./tablib/formats/__init__.py BUILDSTDERR: RefactoringTool: ./tablib/formats/_latex.py BUILDSTDERR: RefactoringTool: ./tablib/formats/_xlsx.py BUILDSTDERR: RefactoringTool: ./tablib/formats/_xls.py BUILDSTDERR: RefactoringTool: ./tablib/formats/_tsv.py BUILDSTDERR: RefactoringTool: ./tablib/formats/_csv.py BUILDSTDERR: RefactoringTool: ./tablib/formats/_df.py BUILDSTDERR: RefactoringTool: ./tablib/formats/_dbf.py BUILDSTDERR: RefactoringTool: ./tablib/formats/_json.py BUILDSTDERR: RefactoringTool: ./tablib/formats/_ods.py BUILDSTDERR: RefactoringTool: ./tablib/formats/_yaml.py BUILDSTDERR: RefactoringTool: ./tablib/formats/_html.py BUILDSTDERR: RefactoringTool: ./tablib/packages/dbfpy/header.py BUILDSTDERR: RefactoringTool: ./tablib/packages/dbfpy/dbf.py BUILDSTDERR: RefactoringTool: ./tablib/packages/dbfpy/record.py BUILDSTDERR: RefactoringTool: ./tablib/packages/dbfpy/fields.py BUILDSTDERR: RefactoringTool: ./tablib/packages/dbfpy/dbfnew.py BUILDSTDERR: RefactoringTool: ./tablib/packages/dbfpy/utils.py BUILDSTDERR: RefactoringTool: ./tablib/packages/ordereddict.py BUILDSTDERR: RefactoringTool: ./tablib/packages/markup.py BUILDSTDERR: RefactoringTool: ./tablib/compat.py BUILDSTDERR: RefactoringTool: ./tablib/core.py else: raise TypeError ("Script should be given a dictionary of src:type pairs.") @@ -359,12 +359,12 @@ else: raise Exception("We should have never gotten here.") - mykeys = mydict.keys( ) - myvalues = map( _totuple, mydict.values( ) ) - - maxlength = max( map( len, [ args ] + myvalues ) ) - - for i in xrange( maxlength ): + mykeys = list(mydict.keys( )) + myvalues = list(map( _totuple, list(mydict.values( )) )) + + maxlength = max( list(map( len, [ args ] + myvalues )) ) + + for i in range( maxlength ): thisdict = { } for key, value in zip( mykeys, myvalues ): try: @@ -381,7 +381,7 @@ def _totuple( x ): """Utility stuff to convert string, int, float, None or anything to a usable tuple.""" - if isinstance( x, basestring ): + if isinstance( x, str ): out = x, elif isinstance( x, ( int, float ) ): out = str( x ), @@ -395,7 +395,7 @@ def escape( text, newline=False ): """Escape special html characters.""" - if isinstance( text, basestring ): + if isinstance( text, str ): if '&' in text: text = text.replace( '&', '&' ) if '>' in text: @@ -417,7 +417,7 @@ def unescape( text ): """Inverse of escape.""" - if isinstance( text, basestring ): + if isinstance( text, str ): if '&' in text: text = text.replace( '&', '&' ) if '>' in text: --- ./tablib/compat.py (original) +++ ./tablib/compat.py (refactored) @@ -30,19 +30,19 @@ # py3 mappings ifilter = filter - unicode = str + str = str bytes = bytes - basestring = str + str = str xrange = range else: - from cStringIO import StringIO as BytesIO - from cStringIO import StringIO + from io import StringIO as BytesIO + from io import StringIO from tablib.packages import markup - from itertools import ifilter + import unicodecsv as csv import tablib.packages.dbfpy as dbfpy - unicode = unicode + str = str xrange = xrange --- ./tablib/core.py (original) +++ ./tablib/core.py (refactored) @@ -14,7 +14,7 @@ from tablib import formats -from tablib.compat import OrderedDict, unicode +from tablib.compat import OrderedDict, str __title__ = 'tablib' @@ -178,7 +178,7 @@ def __getitem__(self, key): - if isinstance(key, str) or isinstance(key, unicode): + if isinstance(key, str) or isinstance(key, str): if key in self.headers: pos = self.headers.index(key) # get 'key' index from each data return [row[pos] for row in self._data] @@ -197,7 +197,7 @@ def __delitem__(self, key): - if isinstance(key, str) or isinstance(key, unicode): + if isinstance(key, str) or isinstance(key, str): if key in self.headers: @@ -225,13 +225,13 @@ # Add unicode representation of headers. if self.__headers: - result.append([unicode(h) for h in self.__headers]) + result.append([str(h) for h in self.__headers]) # Add unicode representation of rows. - result.extend(list(map(unicode, row)) for row in self._data) + result.extend(list(map(str, row)) for row in self._data) lens = [list(map(len, row)) for row in result] - field_lens = list(map(max, zip(*lens))) + field_lens = list(map(max, list(zip(*lens)))) # delimiter between header and data if self.__headers: @@ -876,7 +876,7 @@ sorted. """ - if isinstance(col, str) or isinstance(col, unicode): + if isinstance(col, str) or isinstance(col, str): if not self.headers: raise HeadersNeeded + sed -i '/tablib.packages.*3/d' setup.py + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.ez1g7O + umask 022 + cd /builddir/build/BUILD + cd tablib-0.12.1 + /usr/bin/python3 setup.py build running build running build_py creating build creating build/lib creating build/lib/tablib copying tablib/__init__.py -> build/lib/tablib copying tablib/compat.py -> build/lib/tablib copying tablib/core.py -> build/lib/tablib creating build/lib/tablib/formats copying tablib/formats/__init__.py -> build/lib/tablib/formats copying tablib/formats/_latex.py -> build/lib/tablib/formats copying tablib/formats/_xlsx.py -> build/lib/tablib/formats copying tablib/formats/_xls.py -> build/lib/tablib/formats copying tablib/formats/_tsv.py -> build/lib/tablib/formats copying tablib/formats/_csv.py -> build/lib/tablib/formats copying tablib/formats/_df.py -> build/lib/tablib/formats copying tablib/formats/_dbf.py -> build/lib/tablib/formats copying tablib/formats/_json.py -> build/lib/tablib/formats copying tablib/formats/_ods.py -> build/lib/tablib/formats copying tablib/formats/_yaml.py -> build/lib/tablib/formats copying tablib/formats/_html.py -> build/lib/tablib/formats creating build/lib/tablib/packages copying tablib/packages/__init__.py -> build/lib/tablib/packages copying tablib/packages/ordereddict.py -> build/lib/tablib/packages copying tablib/packages/markup.py -> build/lib/tablib/packages copying tablib/packages/markup3.py -> build/lib/tablib/packages creating build/lib/tablib/packages/dbfpy copying tablib/packages/dbfpy/__init__.py -> build/lib/tablib/packages/dbfpy copying tablib/packages/dbfpy/header.py -> build/lib/tablib/packages/dbfpy copying tablib/packages/dbfpy/dbf.py -> build/lib/tablib/packages/dbfpy copying tablib/packages/dbfpy/record.py -> build/lib/tablib/packages/dbfpy copying tablib/packages/dbfpy/fields.py -> build/lib/tablib/packages/dbfpy copying tablib/packages/dbfpy/dbfnew.py -> build/lib/tablib/packages/dbfpy copying tablib/packages/dbfpy/utils.py -> build/lib/tablib/packages/dbfpy + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.fYpbou + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch '!=' / ']' + rm -rf /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch BUILDSTDERR: ++ dirname /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch + cd tablib-0.12.1 + /usr/bin/python3 setup.py install -O1 --skip-build --root=/builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch running install running install_lib creating /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr creating /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib creating /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7 creating /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages creating /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib copying build/lib/tablib/__init__.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib creating /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats copying build/lib/tablib/formats/__init__.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats copying build/lib/tablib/formats/_latex.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats copying build/lib/tablib/formats/_xlsx.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats copying build/lib/tablib/formats/_xls.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats copying build/lib/tablib/formats/_tsv.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats copying build/lib/tablib/formats/_csv.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats copying build/lib/tablib/formats/_df.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats copying build/lib/tablib/formats/_dbf.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats copying build/lib/tablib/formats/_json.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats copying build/lib/tablib/formats/_ods.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats copying build/lib/tablib/formats/_yaml.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats copying build/lib/tablib/formats/_html.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats creating /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages copying build/lib/tablib/packages/__init__.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages creating /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/dbfpy copying build/lib/tablib/packages/dbfpy/__init__.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/dbfpy copying build/lib/tablib/packages/dbfpy/header.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/dbfpy copying build/lib/tablib/packages/dbfpy/dbf.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/dbfpy copying build/lib/tablib/packages/dbfpy/record.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/dbfpy copying build/lib/tablib/packages/dbfpy/fields.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/dbfpy copying build/lib/tablib/packages/dbfpy/dbfnew.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/dbfpy copying build/lib/tablib/packages/dbfpy/utils.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/dbfpy copying build/lib/tablib/packages/ordereddict.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages copying build/lib/tablib/packages/markup.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages copying build/lib/tablib/packages/markup3.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages copying build/lib/tablib/compat.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib copying build/lib/tablib/core.py -> /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/__init__.py to __init__.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats/__init__.py to __init__.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats/_latex.py to _latex.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats/_xlsx.py to _xlsx.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats/_xls.py to _xls.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats/_tsv.py to _tsv.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats/_csv.py to _csv.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats/_df.py to _df.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats/_dbf.py to _dbf.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats/_json.py to _json.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats/_ods.py to _ods.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats/_yaml.py to _yaml.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/formats/_html.py to _html.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/__init__.py to __init__.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/dbfpy/__init__.py to __init__.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/dbfpy/header.py to header.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/dbfpy/dbf.py to dbf.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/dbfpy/record.py to record.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/dbfpy/fields.py to fields.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/dbfpy/dbfnew.py to dbfnew.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/dbfpy/utils.py to utils.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/ordereddict.py to ordereddict.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/markup.py to markup.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/packages/markup3.py to markup3.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/compat.py to compat.cpython-37.pyc byte-compiling /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib/core.py to core.cpython-37.pyc writing byte-compilation script '/tmp/tmp0ulogec5.py' /usr/bin/python3 /tmp/tmp0ulogec5.py removing /tmp/tmp0ulogec5.py running install_egg_info running egg_info writing tablib.egg-info/PKG-INFO writing dependency_links to tablib.egg-info/dependency_links.txt writing requirements to tablib.egg-info/requires.txt writing top-level names to tablib.egg-info/top_level.txt reading manifest file 'tablib.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'tablib.egg-info/SOURCES.txt' Copying tablib.egg-info to /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7/site-packages/tablib-0.12.1-py3.7.egg-info running install_scripts + /usr/lib/rpm/find-debuginfo.sh -j6 --strict-build-id -m -i --build-id-seed 0.12.1-8.fc30 --unique-debug-suffix -0.12.1-8.fc30.noarch --unique-debug-src-base python-tablib-0.12.1-8.fc30.noarch --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /builddir/build/BUILD/tablib-0.12.1 BUILDSTDERR: find: 'debug': No such file or directory + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 0 Bytecompiling .py files below /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/lib/python3.7 using /usr/bin/python3.7 + /usr/lib/rpm/brp-python-hardlink + /usr/lib/rpm/redhat/brp-mangle-shebangs Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.GwXASb + umask 022 + cd /builddir/build/BUILD + cd tablib-0.12.1 + /usr/bin/python3 -m pytest test_tablib.py ============================= test session starts ============================== platform linux -- Python 3.7.2, pytest-3.9.3, py-1.7.0, pluggy-0.8.0 rootdir: /builddir/build/BUILD/tablib-0.12.1, inifile: collected 65 items test_tablib.py ......................................................... [ 87%] ........ [100%] =============================== warnings summary =============================== tablib/core.py:155 /builddir/build/BUILD/tablib-0.12.1/tablib/core.py:155: DeprecationWarning: invalid escape sequence \* """ tablib/core.py:443 /builddir/build/BUILD/tablib-0.12.1/tablib/core.py:443: DeprecationWarning: invalid escape sequence \* """ tablib/core.py:462 /builddir/build/BUILD/tablib-0.12.1/tablib/core.py:462: DeprecationWarning: invalid escape sequence \* """ tablib/core.py:1128 /builddir/build/BUILD/tablib-0.12.1/tablib/core.py:1128: DeprecationWarning: invalid escape sequence \* """ tablib/core.py:1145 /builddir/build/BUILD/tablib-0.12.1/tablib/core.py:1145: DeprecationWarning: invalid escape sequence \* """ /usr/lib64/python3.7/site-packages/pandas/core/dtypes/inference.py:6 /usr/lib64/python3.7/site-packages/pandas/core/dtypes/inference.py:6: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import Iterable /usr/lib64/python3.7/site-packages/pandas/core/tools/datetimes.py:3 /usr/lib64/python3.7/site-packages/pandas/core/tools/datetimes.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import MutableMapping test_tablib.py::TablibTestCase::test_auto_format_detect /usr/lib/python3.7/site-packages/xlrd/book.py:74: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead t0 = time.clock() /usr/lib/python3.7/site-packages/xlrd/book.py:89: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead t1 = time.clock() /usr/lib64/python3.7/site-packages/yaml/constructor.py:126: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working if not isinstance(key, collections.Hashable): /usr/lib/python3.7/site-packages/xlrd/book.py:74: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead t0 = time.clock() /usr/lib/python3.7/site-packages/xlrd/book.py:89: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead t1 = time.clock() /usr/lib/python3.7/site-packages/xlrd/book.py:74: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead t0 = time.clock() /usr/lib/python3.7/site-packages/xlrd/book.py:89: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead t1 = time.clock() /usr/lib/python3.7/site-packages/xlrd/book.py:74: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead t0 = time.clock() /usr/lib/python3.7/site-packages/xlrd/book.py:89: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead t1 = time.clock() /usr/lib64/python3.7/site-packages/pandas/core/frame.py:406: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working elif isinstance(data, collections.Iterator): test_tablib.py::TablibTestCase::test_book_export_no_exceptions /builddir/build/BUILD/tablib-0.12.1/tablib/formats/_xlsx.py:55: DeprecationWarning: Call to deprecated function remove_sheet (Use wb.remove(worksheet) or del wb[sheetname]). wb.remove_sheet(sheet) -- Docs: https://docs.pytest.org/en/latest/warnings.html ==================== 65 passed, 18 warnings in 0.82 seconds ==================== + exit 0 Processing files: python3-tablib-0.12.1-8.fc30.noarch Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.x1y8hW + umask 022 + cd /builddir/build/BUILD + cd tablib-0.12.1 + DOCDIR=/builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/share/doc/python3-tablib + export LC_ALL=C + LC_ALL=C + export DOCDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/share/doc/python3-tablib + cp -pr README.rst /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/share/doc/python3-tablib + cp -pr AUTHORS /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch/usr/share/doc/python3-tablib + exit 0 Provides: python3-tablib = 0.12.1-8.fc30 python3.7dist(tablib) = 0.12.1 python3dist(tablib) = 0.12.1 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: python(abi) = 3.7 python3.7dist(odfpy) python3.7dist(unicodecsv) Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch Wrote: /builddir/build/RPMS/python3-tablib-0.12.1-8.fc30.noarch.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.MT7vaJ + umask 022 + cd /builddir/build/BUILD + cd tablib-0.12.1 + /usr/bin/rm -rf /builddir/build/BUILDROOT/python-tablib-0.12.1-8.fc30.noarch + exit 0 Child return code was: 0