<86>Dec 22 11:45:04 userdel[2657471]: delete user 'rooter' <86>Dec 22 11:45:04 userdel[2657471]: removed group 'rooter' owned by 'rooter' <86>Dec 22 11:45:04 userdel[2657471]: removed shadow group 'rooter' owned by 'rooter' <86>Dec 22 11:45:04 groupadd[2657484]: group added to /etc/group: name=rooter, GID=666 <86>Dec 22 11:45:04 groupadd[2657484]: group added to /etc/gshadow: name=rooter <86>Dec 22 11:45:04 groupadd[2657484]: new group: name=rooter, GID=666 <86>Dec 22 11:45:04 useradd[2657491]: new user: name=rooter, UID=666, GID=666, home=/root, shell=/bin/bash <86>Dec 22 11:45:04 userdel[2657505]: delete user 'builder' <86>Dec 22 11:45:04 userdel[2657505]: removed group 'builder' owned by 'builder' <86>Dec 22 11:45:04 userdel[2657505]: removed shadow group 'builder' owned by 'builder' <86>Dec 22 11:45:04 groupadd[2657513]: group added to /etc/group: name=builder, GID=667 <86>Dec 22 11:45:04 groupadd[2657513]: group added to /etc/gshadow: name=builder <86>Dec 22 11:45:04 groupadd[2657513]: new group: name=builder, GID=667 <86>Dec 22 11:45:04 useradd[2657517]: new user: name=builder, UID=667, GID=667, home=/usr/src, shell=/bin/bash <13>Dec 22 11:45:06 rpmi: libgdbm-1.8.3-alt10 1454943334 installed <13>Dec 22 11:45:06 rpmi: libexpat-2.2.10-alt1 sisyphus+259966.100.1.1 1602824518 installed <13>Dec 22 11:45:06 rpmi: libp11-kit-0.23.15-alt2 sisyphus+252784.100.2.2 1591274901 installed <13>Dec 22 11:45:06 rpmi: libtasn1-4.16.0-alt1 sisyphus+245480.100.1.1 1580825062 installed <13>Dec 22 11:45:06 rpmi: rpm-macros-alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Dec 22 11:45:06 rpmi: alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Dec 22 11:45:06 rpmi: ca-certificates-2020.10.22-alt1 sisyphus+260224.300.2.1 1603549301 installed <13>Dec 22 11:45:06 rpmi: ca-trust-0.1.2-alt1 sisyphus+233348.100.1.1 1561653823 installed <13>Dec 22 11:45:06 rpmi: p11-kit-trust-0.23.15-alt2 sisyphus+252784.100.2.2 1591274901 installed <13>Dec 22 11:45:06 rpmi: libcrypto1.1-1.1.1i-alt1 sisyphus+263103.100.1.1 1607445576 installed <13>Dec 22 11:45:06 rpmi: libssl1.1-1.1.1i-alt1 sisyphus+263103.100.1.1 1607445576 installed <13>Dec 22 11:45:06 rpmi: python3-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed <13>Dec 22 11:45:07 rpmi: python3-base-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed <13>Dec 22 11:45:07 rpmi: libpython3-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed <13>Dec 22 11:45:07 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>Dec 22 11:45:07 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>Dec 22 11:45:09 rpmi: libverto-0.3.0-alt1_7 sisyphus+225932.100.1.1 1553994919 installed <13>Dec 22 11:45:09 rpmi: liblmdb-0.9.23-alt1 sisyphus+225277.100.2.1 1553001679 installed <13>Dec 22 11:45:09 rpmi: libkeyutils-1.6.1-alt1 sisyphus+256015.100.1.1 1596820124 installed <13>Dec 22 11:45:09 rpmi: libcom_err-1.45.6.0.24.af1a-alt1 sisyphus+262279.100.1.1 1606088229 installed <86>Dec 22 11:45:09 groupadd[2669652]: group added to /etc/group: name=_keytab, GID=499 <86>Dec 22 11:45:09 groupadd[2669652]: group added to /etc/gshadow: name=_keytab <86>Dec 22 11:45:09 groupadd[2669652]: new group: name=_keytab, GID=499 <13>Dec 22 11:45:09 rpmi: libkrb5-1.18.3-alt1 sisyphus+262109.100.1.1 1605777180 installed <13>Dec 22 11:45:09 rpmi: libtirpc-1.2.6-alt1 sisyphus+250076.100.1.1 1587038270 installed <13>Dec 22 11:45:09 rpmi: libnsl2-1.1.0-alt1_1 1511548749 installed <13>Dec 22 11:45:09 rpmi: python-modules-encodings-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed <13>Dec 22 11:45:09 rpmi: python-modules-compiler-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed <13>Dec 22 11:45:09 rpmi: python-modules-email-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed <13>Dec 22 11:45:09 rpmi: python-modules-unittest-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed <13>Dec 22 11:45:10 rpmi: python-modules-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed <13>Dec 22 11:45:10 rpmi: python-modules-nis-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed <13>Dec 22 11:45:10 rpmi: python-modules-ctypes-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed <13>Dec 22 11:45:10 rpmi: python-modules-multiprocessing-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed <13>Dec 22 11:45:10 rpmi: python-modules-logging-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed <13>Dec 22 11:45:10 rpmi: python-tools-2to3-2.7.18-alt2 sisyphus+262143.200.4.1 1606132536 installed Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/python3-module-conversionkit-0.3.4-alt2.nosrc.rpm (w1.gzdio) <13>Dec 22 11:45:11 rpmi: python3-module-pkg_resources-1:46.1.3-alt2 sisyphus+260458.600.6.1 1603876498 installed <13>Dec 22 11:45:11 rpmi: libtinfo-devel-6.2.20201107-alt1 sisyphus+261749.100.1.1 1605292929 installed <13>Dec 22 11:45:11 rpmi: libncurses-devel-6.2.20201107-alt1 sisyphus+261749.100.1.1 1605292929 installed <13>Dec 22 11:45:11 rpmi: python3-dev-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed <13>Dec 22 11:45:11 rpmi: python3-module-setuptools-1:46.1.3-alt2 sisyphus+260458.600.6.1 1603876498 installed Installing python3-module-conversionkit-0.3.4-alt2.src.rpm Building target platforms: i586 Building for target i586 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.37581 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python3-module-conversionkit-0.3.4 + echo 'Source #0 (python3-module-conversionkit-0.3.4.tar):' Source #0 (python3-module-conversionkit-0.3.4.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/python3-module-conversionkit-0.3.4.tar + cd python3-module-conversionkit-0.3.4 + /bin/chmod -c -Rf u+rwX,go-w . + find -type f -name '*.py' -exec 2to3 -w -n '{}' + RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: No changes to ./test/formencode_doc.py RefactoringTool: No changes to ./test/doc.py RefactoringTool: No changes to ./setup.py RefactoringTool: Refactored ./ez_setup.py RefactoringTool: Refactored ./doc/source/conf.py --- ./ez_setup.py (original) +++ ./ez_setup.py (refactored) @@ -70,10 +70,10 @@ if egg_name in md5_data: digest = md5(data).hexdigest() if digest != md5_data[egg_name]: - print >>sys.stderr, ( + print(( "md5 validation of %s failed! (Possible download problem?)" % egg_name - ) + ), file=sys.stderr) sys.exit(2) return data @@ -103,14 +103,14 @@ return do_download() try: pkg_resources.require("setuptools>="+version); return - except pkg_resources.VersionConflict, e: + except pkg_resources.VersionConflict as e: if was_imported: - print >>sys.stderr, ( + print(( "The required version of setuptools (>=%s) is not available, and\n" "can't be installed while this script is running. Please install\n" " a more recent version first, using 'easy_install -U setuptools'." "\n\n(Currently using %r)" - ) % (version, e.args[0]) + ) % (version, e.args[0]), file=sys.stderr) sys.exit(2) else: del pkg_resources, sys.modules['pkg_resources'] # reload ok @@ -129,7 +129,7 @@ with a '/'). `to_dir` is the directory where the egg will be downloaded. `delay` is the number of seconds to pause before an actual download attempt. """ - import urllib2, shutil + import urllib.request, urllib.error, urllib.parse, shutil egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3]) url = download_base + egg_name saveto = os.path.join(to_dir, egg_name) @@ -155,7 +155,7 @@ version, download_base, delay, url ); from time import sleep; sleep(delay) log.warn("Downloading %s", url) - src = urllib2.urlopen(url) + src = urllib.request.urlopen(url) # Read/write all in one block, so we don't create a corrupt file # if the download is interrupted. data = _validate_md5(egg_name, src.read()) @@ -216,10 +216,10 @@ os.unlink(egg) else: if setuptools.__version__ == '0.0.1': - print >>sys.stderr, ( + print(( "You have an obsolete version of setuptools installed. Please\n" "remove it from your system entirely before rerunning this script." - ) + ), file=sys.stderr) sys.exit(2) req = "setuptools>="+version @@ -238,8 +238,8 @@ from setuptools.command.easy_install import main main(argv) else: - print "Setuptools version",version,"or greater has been installed." - print '(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)' + print("Setuptools version",version,"or greater has been installed.") + print('(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)') def update_md5(filenames): """Update our built-in md5 registry""" @@ -252,7 +252,7 @@ md5_data[base] = md5(f.read()).hexdigest() f.close() - data = [" %r: %r,\n" % it for it in md5_data.items()] + data = [" %r: %r,\n" % it for it in list(md5_data.items())] data.sort() repl = "".join(data) @@ -262,7 +262,7 @@ match = re.search("\nmd5_data = {\n([^}]+)}", src) if not match: - print >>sys.stderr, "Internal error!" + print("Internal error!", file=sys.stderr) sys.exit(2) src = src[:match.start(1)] + repl + src[match.end(1):] --- ./doc/source/conf.py (original) +++ ./doc/source/conf.py (refactored) @@ -41,8 +41,8 @@ master_doc = 'index' # General information about the project. -project = u'ConversionKit' -copyright = u'2009, James Gardner' +project = 'ConversionKit' +copyright = '2009, James Gardner' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -169,8 +169,8 @@ # GroupRefactoringTool: No changes to ./conversionkit/types.py RefactoringTool: Refactored ./conversionkit/__init__.py ing the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, document class [howto/manual]). latex_documents = [ - ('index', 'ConversionKit.tex', ur'ConversionKit Documentation', - ur'James Gardner', 'manual'), + ('index', 'ConversionKit.tex', r'ConversionKit Documentation', + r'James Gardner', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of --- ./conversionkit/__init__.py (original) +++ ./conversionkit/__init__.py (refactored) @@ -33,8 +33,8 @@ def perform(self, converter, state=None, formencode_method=None): if self._error != [] or self._result != []: raise ConversionKitError( - u'A converter has already been applied to this conversion ' - u'object' + 'A converter has already been applied to this conversion ' + 'object' ) if formencode_method is not None: # Use formencode compatibility mode @@ -46,29 +46,29 @@ self.value, validation_state ) - except formencode.Invalid, e: + except formencode.Invalid as e: self.error = errors_to_dict(e) else: self.result = result else: if converter is None: raise ConversionKitError( - u"'None' is not a valid converter. If you are using a " - u"converter factory to produce a converter have you " - u"remembered to return the inner function?" + "'None' is not a valid converter. If you are using a " + "converter factory to produce a converter have you " + "remembered to return the inner function?" ) # Use the converter - if isinstance(converter, (str, unicode, list, tuple, dict)): + if isinstance(converter, (str, list, tuple, dict)): raise ConversionKitError( - u"This (%s) is not a valid converter"%type(converter) + "This (%s) is not a valid converter"%type(converter) ) converter(self, state) # Check that an error or a result has been set if self._result == self._error == []: # No error or result has been set raise ConversionKitError( - u"The converter %r doesn't work correctly, it failed to " - u"set a result or an error."%converter + "The converter %r doesn't work correctly, it failed to " + "set a result or an error."%converter ) elif self._result != [] and self._error != []: # No error or result has been set @@ -80,27 +80,27 @@ return self._error[0] elif self._result == self._error == []: raise ConversionKitError( - u'No conversion has been performed so no error is ' - u'present.' + 'No conversion has been performed so no error is ' + 'present.' ) elif self._result != [] and self._error == []: raise ConversionKitError( - u'This conversion was successful so no error is present' - ) - else: - raise ConversionKitError( - u'This conversion is an incosistent internal state. Perhaps a ' - u'faulty converters has been used.' + 'This conversion was successful so no error is present' + ) + else: + raise ConversionKitError( + 'This conversion is an incosistent internal state. Perhaps a ' + 'faulty converters has been used.' ) def _set_error(self, error): if self._result != []: raise ConversionKitError( - u'You cannot set an error while a result is present' + 'You cannot set an error while a result is present' ) elif self._error != []: raise ConversionKitError( - u'An error has already been set on this conversion' + 'An error has already been set on this conversion' ) self._error = [error] @@ -111,24 +111,24 @@ raise ConversionError(self._error[0], self) elif self._error == [] and self._result == []: raise ConversionKitError( - u'No errors or result has been set. It is possible you have ' - u'forgotten to perform a conversion by calling .perform() or ' - u'that the converter you used has failed to behave correctly.' - ) - else: - raise ConversionKitError( - u'This conversion is an incosistent internal state. Perhaps a ' - u'faulty converters has been used.' + 'No errors or result has been set. It is possible you have ' + 'forgotten to perform a conversion by calling .perform() or ' + 'that the converter you used has failed to behave correctly.' + ) + else: + raise ConversionKitError( + 'This conversion is an incosistent internal state. Perhaps a ' + 'faulty converters has been used.' ) def _set_result(self, result): if self._error != []: raise ConversionKitError( - u'You cannot set a result while an error is present' + 'You cannot set a result while an error is present' ) elif self._result != []: raise ConversionKitError( - u'A result has already been set on this conversion' + 'A result has already been set on this conversion' ) self._result = [result] @@ -137,8 +137,8 @@ def _set_value(self, value): raise ConversionKitError( - u'You cannot set the value direclty. Please create a new ' - u'conversion object' + 'You cannot set the value direclty. Please create a new ' + 'conversion object' ) def _get_successful(self): @@ -151,18 +151,18 @@ elif self._error == [] and self._result != []: return True elif self._error == self._result == []: - raise ConversionKitError(u'No conversion has been performed yet') - else: - raise ConversionKitError( - u'This conversion is an inconsistent internal state. Perhaps a ' - u'faulty converters has been used.' + raise ConversionKitError('No conversion has been performed yet') + else: + raise ConversionKitError( + 'This conversion is an inconsistent internal state. Perhaps a ' + 'faulty converters has been used.' ) def _set_successful(self, value): raise ConversionKitError( - u'You cannot set whether a conversion has been successful or not ' - u'by changing the successful attribute. Instead you should set ' - u'the error attribute or the result attribute' + 'You cannot set whether a conversion has been successful or not ' + 'by changing the successful attribute. Instead you should set ' + 'the error attribute or the result attribute' ) # Properties (available since Python 2.2) @@ -186,13 +186,13 @@ args = {} handle = None if state is not None: - if isinstance(state, dict) and state.has_key('conversionkit') and \ + if isinstance(state, dict) and 'conversionkit' in state and \ isinstance(state['conversionkit'], dict) and \ - state['conversionkit'].has_key('message'): + 'message' in state['conversionkit']: handle = state['conversionkit']['message'] elif hasattr(state, 'conversionkit') and \ isinstance(state.conversionkit, dict) and \ - state.conversionkit.has_key('message'): + 'message' in state.conversionkit: handle = state.conversionkit['message'] elif hasattr(state, 'conversionkit') and \ hasattr(state.conversionkit, 'message'): @@ -213,7 +213,7 @@ if not conversion.value in values: conversion.error = message ( state, - u'The value submitted is not one of the allowed values' + 'The value submitted is not one of the allowed values' ) else: conversion.result = conversion.value @@ -263,7 +263,7 @@ # stop_on_first_result was False if not first_error: if children_keys is not None: - conversion.result = dict([(k, child.result) for k, child in conversion.children.items()]) + conversion.result = dict([(k, child.result) for k, child in list(conversion.children.items())]) else: conversion.result = [child.result for child in conversion.children] return tryEach_converter @@ -277,8 +277,8 @@ result = copy.copy(conversion.value) children = conversion.children for converter in converters: - if isinstance(converter, (tuple, list, str, unicode, dict)): - raise ConversionKitError(u'%r is not a valid post-converter'%(converter,)) + if isinstance(converter, (tuple, list, str, dict)): + raise ConversionKitError('%r is not a valid post-converter'%(converter,)) child_conversion = Conversion(result) child_conversion.children = children converter(child_conversion, state) @@ -297,12 +297,12 @@ def chainPostConverters_converter(conversion, state=None): for converter in converters: if isinstance(converter, (tuple, list)): - raise ConversionKitError(u'A list %r is not a valid post-converter'%converter) + raise ConversionKitError('A list %r is not a valid post-converter'%converter) converter(conversion, state) if conversion._error == [] and conversion._result == [] or \ not hasattr(conversion, 'children'): raise ConversionKitError( - u'Converter %r did not return a used conversion object'%( + 'Converter %r did not return a used conversion object'%( converter ) ) @@ -314,7 +314,7 @@ def noConversion(copy_mode='shallow'): if copy_mode not in ['shallow', 'deep']: - raise ConversionKitError(u'Unknown copy mode %r'%copy_mode) + raise ConversionKitError('Unknown copy mode %r'%copy_mode) def noConversion_converter(conversion, state=None): if copy_mode == 'shallow': conversion.result = copy.copy(conversion.value) @@ -361,16 +361,16 @@ self.empty_error = empty_error if missing_or_empty_default is not no_default: if self.missing_default is not no_default: - raise Exception(u"You cannot specify both 'missing_default' and 'missing_or_empty_default'") + raise Exception("You cannot specify both 'missing_default' and 'missing_or_empty_default'") if self.empty_default is not no_default: - raise Exception(u"You cannot specify both 'empty_default' and 'missing_or_empty_default'") + raise Exception("You cannot specify both 'empty_default' and 'missing_or_empty_default'") self.missing_default = missing_or_empty_default self.empty_default = missing_or_empty_default if missing_or_empty_error is not no_default: if self.missing_error is not no_default: - raise Exception(u"You cannot specify both 'missing_error' and 'missing_or_empty_error'") + raise Exception("You cannot specify both 'missing_error' and 'missing_or_empty_error'") if self.empty_error is not no_default: - raise Exception(u"You cannot specify both 'empty_error' and 'missing_or_empty_error'") + raise Exception("You cannot specify both 'empty_error' and 'missing_or_empty_error'") self.missing_error = missing_or_empty_error self.empty_error = missing_or_empty_error @@ -392,11 +392,11 @@ """ MSG_DICTIONARY = dict( - msg_many_invalid_fields=_(u'Multiple fields were invalid'), - msg_some_invalid_fields=_(u'The %(fields)s fields were invalid'), - msg_single_invalid_field=_(u'The \'%(field)s\' field is invalid'), - msg_field_not_allowed=_(u'The field %r is not allowed'), - msg_fields_not_allowed=_(u"The fields '%s' and '%s' are not allowed"), + msg_many_invalid_fields=_('Multiple fields were invalid'), + msg_some_invalid_fields=_('The %(fields)s fields were invalid'), + msg_single_invalid_field=_('The \'%(field)s\' field is invalid'), + msg_field_not_allowed=_('The field %r is not allowed'), + msg_fields_not_allowed=_("The fields '%s' and '%s' are not allowed"), ) def toDict( @@ -429,55 +429,55 @@ """ if use_many_message_after_failures <= 2: raise ConversionKitError( - u"The 'use_many_message_after_failures' option must contain a " - u"value greater than or equal to 2" + "The 'use_many_message_after_failures' option must contain a " + "value greater than or equal to 2" ) - if isinstance(missing_errors, (str, unicode)): + if isinstance(missing_errors, str): message_ = missing_errors missing_errors = {} - for k in converters.keys(): + for k in list(converters.keys()): missing_errors[k] = message_ % {'key': k} elif isinstance(missing_errors, (list, tuple)): try: message_, fields = missing_errors except ValueError: raise ConversionKitError( - u"Expected the 'missing_errors' argument to be a (message, " - u'[fieldnames...]) pair.' + "Expected the 'missing_errors' argument to be a (message, " + '[fieldnames...]) pair.' ) missing_errors = {} for k in fields: missing_errors[k] = message_ % {'key': k} - if isinstance(empty_errors, (str, unicode)): + if isinstance(empty_errors, str): message_ = empty_errors empty_errors = {} - for k in converters.keys(): + for k in list(converters.keys()): empty_errors[k] = message_ % {'key': k} elif isinstance(empty_errors, (list, tuple)): try: message_, fields = empty_errors except ValueError: raise ConversionKitError( - u"Expected the 'empty_errors' argument to be a (message, " - u'[fieldnames...]) pair.' + "Expected the 'empty_errors' argument to be a (message, " + '[fieldnames...]) pair.' ) empty_errors = {} for k in fields: empty_errors[k] = message_ % {'key': k} - if isinstance(missing_or_empty_errors, (str, unicode)): + if isinstance(missing_or_empty_errors, str): message_ = missing_or_empty_errors missing_or_empty_errors = {} - for k in converters.keys(): + for k in list(converters.keys()): missing_or_empty_errors[k] = message_ % {'key': k} elif isinstance(missing_or_empty_errors, (list, tuple)): try: message_, fields = missing_or_empty_errors except ValueError: raise ConversionKitError( - u"Expected the 'empty_errors' argument to be a (message, " - u'[fieldnames...]) pair.' + "Expected the 'empty_errors' argument to be a (message, " + '[fieldnames...]) pair.' ) missing_or_empty_errors = {} for k in fields: @@ -506,47 +506,47 @@ for k in _empty_defaults: if k in _empty_errors: raise ConversionKitError( - u'You cannot set both an error and a default if key %r is ' - u'empty'%(k) + 'You cannot set both an error and a default if key %r is ' + 'empty'%(k) ) for k in _missing_defaults: if k in _missing_errors: raise ConversionKitError( - u'You cannot set both an error and a default if key %r is ' - u'missing'%(k) - ) - - for name, converter in converters.items(): + 'You cannot set both an error and a default if key %r is ' + 'missing'%(k) + ) + + for name, converter in list(converters.items()): if isinstance(converter, Field): if converter.missing_error is not no_default: if name in _missing_errors: raise ConversionKitError( - u'You cannot set a missing error for key %r in both ' - u'the Field and the toDict arguments' % name + 'You cannot set a missing error for key %r in both ' + 'the Field and the toDict arguments' % name ) else: _missing_errors[name] = converter.missing_error if converter.empty_error is not no_default: if name in _empty_errors: raise ConversionKitError( - u'You cannot set an empty error for key %r in both ' - u'the Field and the toDict arguments' % name + 'You cannot set an empty error for key %r in both ' + 'the Field and the toDict arguments' % name ) else: _empty_errors[name] = converter.empty_error if converter.missing_default is not no_default: if name in _missing_defaults: raise ConversionKitError( - u'You cannot set a missing default for key %r in ' - u'both the Field and the toDict arguments' % name + 'You cannot set a missing default for key %r in ' + 'both the Field and the toDict arguments' % name ) else: _missing_defaults[name] = converter.missing_default if converter.empty_default is not no_default: if name in _empty_defaults: raise ConversionKitError( - u'You cannot set an empty default for key %r in both ' - u'the Field and the toDict arguments' % name + 'You cannot set an empty default for key %r in both ' + 'the Field and the toDict arguments' % name ) else: _empty_defaults[name] = converter.empty_default @@ -554,7 +554,7 @@ if not isinstance(conversion.value, dict): raise Exception( - u'Expeceted the input to be a dictionary, not %r'%( + 'Expeceted the input to be a dictionary, not %r'%( conversion.value ) ) @@ -565,17 +565,17 @@ errors = [] extra_fields = {} - for k, v in conversion.value.items(): - k = unicode(k) - if not converters.has_key(k): + for k, v in list(conversion.value.items()): + k = str(k) + if k not in converters: extra_fields[k] = v else: values[k] = v if extra_fields and allow_extra_fields is False: if len(extra_fields) == 1: - error = msg_field_not_allowed%extra_fields.keys()[0] - else: - fields = extra_fields.keys() + error = msg_field_not_allowed%list(extra_fields.keys())[0] + else: + fields = list(extra_fields.keys()) error = msg_fields_not_allowed%( "', '".join(fields[0:-1]), fields[-1] @@ -588,23 +588,23 @@ # Set any errors or defaults from missing or empty fields to_ignore = [] - for field, error in _missing_errors.items(): - if not values.has_key(field): + for field, error in list(_missing_errors.items()): + if field not in values: child_conversion = Conversion(Missing()).perform(noConversion()) set_error(child_conversion, error) errors.append(field) to_ignore.append(field) children[field] = child_conversion # Set any defaults needed for missing fields - for field, default in _missing_defaults.items(): - if not values.has_key(field): + for field, default in list(_missing_defaults.items()): + if field not in values: child_conversion = Conversion(Missing()).perform(noConversion()) set_result(child_conversion, default) children[field] = child_conversion results[field] = default to_ignore.append(field) - for k, v in values.items(): - k = unicode(k) + for k, v in list(values.items()): + k = str(k) if v in [None, '']: if k in _empty_errors: child_conversion = Conversion(v).perform(noConversion()) @@ -622,8 +622,8 @@ # Loop over the converters, setting up a child conversion # for each one fields without a corresponding converter # are removed - for key, converter in converters.items(): - if key not in to_ignore and values.has_key(key): + for key, converter in list(converters.items()): + if key not in to_ignore and key in values: child_conversion = Conversion(values[key]).perform( converter, state @@ -637,13 +637,13 @@ # Add the extra_fields back if they aren't supposed to be # filtered if filter_extra_fields is False: - for k, v in extra_fields.items(): - if results.has_key(k): + for k, v in list(extra_fields.items()): + if k in results: raise ConversionKitError( - u'One of the filtered fields is present ' - u'in the results. This should not be possible' - u'and is likely to be a bug in the new ' - u'implementation of toDict()' + 'One of the filtered fields is present ' + 'in the results. This should not be possible' + 'and is likely to be a bug in the new ' + 'implementation of toDict()' ) else: children[k] = Conversion(v).perform(noConversion()) @@ -674,8 +674,8 @@ ) conversion.error = error else: - conversion.result = dict([(unicode(k), v) for k, v in results.items()]) - conversion.children = dict([(unicode(k), v) for k, v in conversion.children.items()]) + conversion.result = dict([(str(k), v) for k, v in list(results.items())]) + conversion.children = dict([(str(k), v) for k, v in list(conversion.children.items())]) return toDict_converter # @@ -685,15 +685,15 @@ def toList(converter, min=None, max=None): if min is not None and max is not None and max= 2: - conversion.error = u'Some of the items were not valid' + conversion.error = 'Some of the items were not valid' elif len(errors) == 1: - conversion.error = u'One of the items was not valid' + conversion.error = 'One of the items was not valid' else: if min is not None and len(result) < min: if min == 1: - conversion.error = u'No items were specified' + conversion.error = 'No items were specified' else: - conversion.error = u'There were less than %s items'%(min,) + conversion.error = 'There were less than %s items'%(min,) elif max is not None and len(result) > max: if max == 0: - conversion.error = u'No values are allowed' + conversion.error = 'No values are allowed' elif max == 1: - conversion.error = u'Only one value is allowed' + conversion.error = 'Only one value is allowed' else: conversion.error = ( - u'There are too many items in the list. The maximum ' - u'number is %s.'%(max,) + 'There are too many items in the list. The maximum ' + 'number is %s.'%(max,) ) else: # This never gets set if there are errors so it will only exist + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.25071 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-conversionkit-0.3.4 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export FFLAGS + /usr/bin/python3 setup.py build running build running build_py creating build creating build/lib creating build/lib/conversionkit copying conversionkit/types.py -> build/lib/conversionkit copying conversionkit/exception.py -> build/lib/conversionkit copying conversionkit/__init__.py -> build/lib/conversionkit running egg_info writing ConversionKit.egg-info/PKG-INFO writing dependency_links to ConversionKit.egg-info/dependency_links.txt writing entry points to ConversionKit.egg-info/entry_points.txt writing requirements to ConversionKit.egg-info/requires.txt writing top-level names to ConversionKit.egg-info/top_level.txt reading manifest file 'ConversionKit.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'ConversionKit.egg-info/SOURCES.txt' + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.31684 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python3-module-conversionkit-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python3-module-conversionkit-buildroot + PATH=/usr/libexec/rpm-build:/usr/src/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games + cd python3-module-conversionkit-0.3.4 + 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-conversionkit-buildroot --force running install running install_lib creating /usr/src/tmp/python3-module-conversionkit-buildroot creating /usr/src/tmp/python3-module-conversionkit-buildroot/usr creating /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib creating /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3 creating /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages creating /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit copying build/lib/conversionkit/__init__.py -> /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit copying build/lib/conversionkit/exception.py -> /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit copying build/lib/conversionkit/types.py -> /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit byte-compiling /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit/__init__.py to __init__.cpython-38.pyc byte-compiling /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit/exception.py to exception.cpython-38.pyc byte-compiling /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit/types.py to types.cpython-38.pyc running install_egg_info running egg_info writing ConversionKit.egg-info/PKG-INFO writing dependency_links to ConversionKit.egg-info/dependency_links.txt writing entry points to ConversionKit.egg-info/entry_points.txt writing requirements to ConversionKit.egg-info/requires.txt writing top-level names to ConversionKit.egg-info/top_level.txt reading manifest file 'ConversionKit.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'ConversionKit.egg-info/SOURCES.txt' Copying ConversionKit.egg-info to /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/ConversionKit-0.3.4-py3.8.egg-info running install_scripts + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python3-module-conversionkit-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python3-module-conversionkit-buildroot (binconfig,pkgconfig,libtool,desktop,gnuconfig) Checking contents of files in /usr/src/tmp/python3-module-conversionkit-buildroot/ (default) Compressing files in /usr/src/tmp/python3-module-conversionkit-buildroot (auto) Adjusting library links in /usr/src/tmp/python3-module-conversionkit-buildroot ./usr/lib: (from :0) Verifying ELF objects in /usr/src/tmp/python3-module-conversionkit-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-conversionkit-buildroot using /usr/bin/python2.7 Bytecompiling python modules with optimization in /usr/src/tmp/python3-module-conversionkit-buildroot using /usr/bin/python2.7 -O Bytecompiling python3 modules in /usr/src/tmp/python3-module-conversionkit-buildroot using /usr/bin/python3 unlink /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit/__pycache__/__init__.cpython-38.pyc unlink /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit/__pycache__/exception.cpython-38.pyc unlink /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit/__pycache__/types.cpython-38.pyc compile /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit/__init__.py compile /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit/exception.py compile /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit/types.py Bytecompiling python3 modules with optimization in /usr/src/tmp/python3-module-conversionkit-buildroot using /usr/bin/python3 -O compile /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit/__init__.py compile /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit/exception.py compile /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit/types.py Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python3-module-conversionkit-buildroot using /usr/bin/python3 -OO compile /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit/__init__.py compile /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit/exception.py compile /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit/types.py Hardlinking identical .pyc and .opt-?.pyc files './usr/lib/python3/site-packages/conversionkit/__pycache__/types.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/conversionkit/__pycache__/types.cpython-38.pyc' './usr/lib/python3/site-packages/conversionkit/__pycache__/types.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/conversionkit/__pycache__/types.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/conversionkit/__pycache__/exception.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/conversionkit/__pycache__/exception.cpython-38.pyc' './usr/lib/python3/site-packages/conversionkit/__pycache__/exception.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/conversionkit/__pycache__/exception.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/conversionkit/__pycache__/__init__.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/conversionkit/__pycache__/__init__.cpython-38.pyc' Hardlinking identical .pyc and .pyo files Processing files: python3-module-conversionkit-0.3.4-alt2 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.UlFsv4 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.468xk2 find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks,systemd-services) /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit/__init__.py: line=41 IGNORE (for REQ=slight and deep=15) module=formencode /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-conversionkit-buildroot/usr/lib/python3/site-packages/conversionkit/__init__.py: line=42 IGNORE (for REQ=slight and deep=15) module=formbuild Provides: python3(conversionkit), python3(conversionkit.exception), python3(conversionkit.types) Requires: /usr/lib/python3/site-packages, python3(copy) < 0, python3(logging) < 0 Wrote: /usr/src/RPM/RPMS/noarch/python3-module-conversionkit-0.3.4-alt2.noarch.rpm (w2.lzdio) 6.99user 0.63system 0:09.35elapsed 81%CPU (0avgtext+0avgdata 19028maxresident)k 0inputs+0outputs (0major+122514minor)pagefaults 0swaps 14.25user 4.16system 0:20.35elapsed 90%CPU (0avgtext+0avgdata 108800maxresident)k 0inputs+0outputs (0major+567837minor)pagefaults 0swaps --- python3-module-conversionkit-0.3.4-alt2.noarch.rpm.repo 2020-01-10 08:58:55.000000000 +0000 +++ python3-module-conversionkit-0.3.4-alt2.noarch.rpm.hasher 2020-12-22 11:45:22.840548507 +0000 @@ -1,9 +1,9 @@ -/usr/lib/python3/site-packages/ConversionKit-0.3.4-py3.7.egg-info 40755 -/usr/lib/python3/site-packages/ConversionKit-0.3.4-py3.7.egg-info/PKG-INFO 100644 -/usr/lib/python3/site-packages/ConversionKit-0.3.4-py3.7.egg-info/SOURCES.txt 100644 -/usr/lib/python3/site-packages/ConversionKit-0.3.4-py3.7.egg-info/dependency_links.txt 100644 -/usr/lib/python3/site-packages/ConversionKit-0.3.4-py3.7.egg-info/entry_points.txt 100644 -/usr/lib/python3/site-packages/ConversionKit-0.3.4-py3.7.egg-info/not-zip-safe 100644 -/usr/lib/python3/site-packages/ConversionKit-0.3.4-py3.7.egg-info/requires.txt 100644 -/usr/lib/python3/site-packages/ConversionKit-0.3.4-py3.7.egg-info/top_level.txt 100644 +/usr/lib/python3/site-packages/ConversionKit-0.3.4-py3.8.egg-info 40755 +/usr/lib/python3/site-packages/ConversionKit-0.3.4-py3.8.egg-info/PKG-INFO 100644 +/usr/lib/python3/site-packages/ConversionKit-0.3.4-py3.8.egg-info/SOURCES.txt 100644 +/usr/lib/python3/site-packages/ConversionKit-0.3.4-py3.8.egg-info/dependency_links.txt 100644 +/usr/lib/python3/site-packages/ConversionKit-0.3.4-py3.8.egg-info/entry_points.txt 100644 +/usr/lib/python3/site-packages/ConversionKit-0.3.4-py3.8.egg-info/not-zip-safe 100644 +/usr/lib/python3/site-packages/ConversionKit-0.3.4-py3.8.egg-info/requires.txt 100644 +/usr/lib/python3/site-packages/ConversionKit-0.3.4-py3.8.egg-info/top_level.txt 100644 /usr/lib/python3/site-packages/conversionkit 40755 @@ -11,11 +11,11 @@ /usr/lib/python3/site-packages/conversionkit/__pycache__ 40755 -/usr/lib/python3/site-packages/conversionkit/__pycache__/__init__.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/conversionkit/__pycache__/__init__.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/conversionkit/__pycache__/__init__.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/conversionkit/__pycache__/exception.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/conversionkit/__pycache__/exception.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/conversionkit/__pycache__/exception.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/conversionkit/__pycache__/types.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/conversionkit/__pycache__/types.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/conversionkit/__pycache__/types.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/conversionkit/__pycache__/__init__.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/conversionkit/__pycache__/__init__.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/conversionkit/__pycache__/__init__.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/conversionkit/__pycache__/exception.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/conversionkit/__pycache__/exception.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/conversionkit/__pycache__/exception.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/conversionkit/__pycache__/types.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/conversionkit/__pycache__/types.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/conversionkit/__pycache__/types.cpython-38.pyc 100644 /usr/lib/python3/site-packages/conversionkit/exception.py 100644