<86>Sep 29 11:48:45 userdel[1441396]: delete user 'rooter' <86>Sep 29 11:48:45 userdel[1441396]: removed group 'rooter' owned by 'rooter' <86>Sep 29 11:48:45 userdel[1441396]: removed shadow group 'rooter' owned by 'rooter' <86>Sep 29 11:48:45 groupadd[1441418]: group added to /etc/group: name=rooter, GID=1853 <86>Sep 29 11:48:45 groupadd[1441418]: group added to /etc/gshadow: name=rooter <86>Sep 29 11:48:45 groupadd[1441418]: new group: name=rooter, GID=1853 <86>Sep 29 11:48:45 useradd[1441434]: new user: name=rooter, UID=1853, GID=1853, home=/root, shell=/bin/bash <86>Sep 29 11:48:45 userdel[1441455]: delete user 'builder' <86>Sep 29 11:48:45 userdel[1441455]: removed group 'builder' owned by 'builder' <86>Sep 29 11:48:45 userdel[1441455]: removed shadow group 'builder' owned by 'builder' <86>Sep 29 11:48:45 groupadd[1441467]: group added to /etc/group: name=builder, GID=1854 <86>Sep 29 11:48:45 groupadd[1441467]: group added to /etc/gshadow: name=builder <86>Sep 29 11:48:45 groupadd[1441467]: new group: name=builder, GID=1854 <86>Sep 29 11:48:45 useradd[1441478]: new user: name=builder, UID=1854, GID=1854, home=/usr/src, shell=/bin/bash <13>Sep 29 11:48:49 rpmi: libgdbm-1.8.3-alt10 1454943313 installed <13>Sep 29 11:48:49 rpmi: libexpat-2.4.3-alt1 p9+293696.100.1.1 1643124786 installed <13>Sep 29 11:48:49 rpmi: libp11-kit-0.23.15-alt2 p9+254920.2400.19.1 1601385869 installed <13>Sep 29 11:48:49 rpmi: libtasn1-4.14-alt1 p9+235792.100.2.1 1565425233 installed <13>Sep 29 11:48:49 rpmi: rpm-macros-alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Sep 29 11:48:49 rpmi: alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Sep 29 11:48:49 rpmi: ca-certificates-2021.10.06-alt1 p9+289862.100.1.1 1637033643 installed <13>Sep 29 11:48:49 rpmi: ca-trust-0.1.2-alt1 p9+233349.100.1.1 1561655062 installed <13>Sep 29 11:48:49 rpmi: p11-kit-trust-0.23.15-alt2 p9+254920.2400.19.1 1601385869 installed <13>Sep 29 11:48:49 rpmi: libcrypto1.1-1.1.1w-alt0.p9.1 p9+356668.100.1.1 1725304346 installed <13>Sep 29 11:48:49 rpmi: libssl1.1-1.1.1w-alt0.p9.1 p9+356668.100.1.1 1725304346 installed <13>Sep 29 11:48:49 rpmi: python3-3.7.17-alt2 p9+350963.100.1.1 1718376947 installed <13>Sep 29 11:48:49 rpmi: libpython3-3.7.17-alt2 p9+350963.100.1.1 1718376947 installed <13>Sep 29 11:48:50 rpmi: python3-base-3.7.17-alt2 p9+350963.100.1.1 1718376947 installed <13>Sep 29 11:48:50 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>Sep 29 11:48:50 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>Sep 29 11:48:52 rpmi: python3-module-pkg_resources-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>Sep 29 11:48:52 rpmi: python3-module-webencodings-0.5.1-alt1.1 1517943573 installed <13>Sep 29 11:48:52 rpmi: python3-module-six-1.12.0-alt1 sisyphus+219665.100.2.1 1548148570 installed <13>Sep 29 11:48:52 rpmi: python3-module-genshi-0.7-alt2 sisyphus+229363.100.1.1 1557847321 installed <13>Sep 29 11:48:52 rpmi: libgpg-error-1.36-alt1 p9+261942.140.4.1 1606237682 installed <13>Sep 29 11:48:52 rpmi: libgcrypt20-1.8.5-alt3 p9+261942.200.4.1 1606237844 installed <13>Sep 29 11:48:52 rpmi: libxslt-1.1.34-alt1.p9.1 p9+261811.300.3.1 1605513910 installed <13>Sep 29 11:48:52 rpmi: python3-module-html5lib-1:0.999999999-alt4.qa1 sisyphus+227493.600.1.3 1555835341 installed <13>Sep 29 11:48:52 rpmi: python3-module-cssselect-0.9.1-alt1.2 sisyphus+227479.1100.1.2 1555757152 installed <13>Sep 29 11:48:52 rpmi: python3-module-lxml-4.4.2-alt1 p9+244111.100.1.1 1578758711 installed <13>Sep 29 11:48:52 rpmi: python-modules-curses-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:52 rpmi: libncurses-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686221 installed <13>Sep 29 11:48:52 rpmi: libtinfo-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686221 installed <13>Sep 29 11:48:52 rpmi: libncurses-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686221 installed <13>Sep 29 11:48:53 rpmi: python3-dev-3.7.17-alt2 p9+350963.100.1.1 1718376947 installed <13>Sep 29 11:48:53 rpmi: libverto-0.3.0-alt1_7 sisyphus+225932.100.1.1 1553994917 installed <13>Sep 29 11:48:53 rpmi: libkeyutils-1.6-alt2 sisyphus+226520.100.2.1 1554512088 installed <13>Sep 29 11:48:53 rpmi: libcom_err-1.44.6-alt1 sisyphus+224154.100.1.1 1552091653 installed <86>Sep 29 11:48:53 groupadd[1466223]: group added to /etc/group: name=_keytab, GID=499 <86>Sep 29 11:48:53 groupadd[1466223]: group added to /etc/gshadow: name=_keytab <86>Sep 29 11:48:53 groupadd[1466223]: new group: name=_keytab, GID=499 <13>Sep 29 11:48:53 rpmi: libkrb5-1.17.2-alt5 p9+325691.100.1.1 1690460821 installed <13>Sep 29 11:48:53 rpmi: libtirpc-1.0.3-alt1 1532008015 installed <13>Sep 29 11:48:53 rpmi: libnsl2-1.1.0-alt1_1 1511548748 installed <13>Sep 29 11:48:53 rpmi: python-modules-compiler-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:53 rpmi: python-modules-email-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:53 rpmi: python-modules-unittest-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:53 rpmi: python-modules-encodings-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:53 rpmi: python-modules-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:53 rpmi: python-modules-nis-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:53 rpmi: python-modules-xml-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:53 rpmi: python-modules-ctypes-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:53 rpmi: python-module-pkg_resources-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>Sep 29 11:48:53 rpmi: python-modules-multiprocessing-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:53 rpmi: python-modules-logging-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:53 rpmi: python-tools-2to3-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:53 rpmi: python-modules-hotshot-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:53 rpmi: python-modules-bsddb-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:53 rpmi: python-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:53 rpmi: python-strict-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:53 rpmi: python-modules-distutils-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:53 rpmi: python-module-six-1.12.0-alt1 sisyphus+219665.100.2.1 1548148570 installed <13>Sep 29 11:48:53 rpmi: python-modules-json-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:53 rpmi: python-module-webencodings-0.5.1-alt1.1 1517943573 installed <13>Sep 29 11:48:53 rpmi: python-module-html5lib-1:0.999999999-alt4.qa1 sisyphus+227493.600.1.3 1555835341 installed <13>Sep 29 11:48:53 rpmi: python-module-lxml-4.4.2-alt1 p9+244111.100.1.1 1578758711 installed <13>Sep 29 11:48:53 rpmi: python-module-cssselect-0.9.1-alt1.2 sisyphus+227479.1100.1.2 1555757152 installed <13>Sep 29 11:48:53 rpmi: libnsl2-devel-1.1.0-alt1_1 1511548748 installed <13>Sep 29 11:48:53 rpmi: python-dev-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Sep 29 11:48:53 rpmi: python-module-setuptools-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>Sep 29 11:48:53 rpmi: python-module-nose-1:1.3.7-alt4.git20160316 sisyphus+229068.100.1.1 1557255939 installed <13>Sep 29 11:48:53 rpmi: python-module-simplejson-3.15.0-alt1.qa1 sisyphus+225625.16100.91.1 1555293606 installed <13>Sep 29 11:48:53 rpmi: python3-module-setuptools-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>Sep 29 11:48:53 rpmi: python3-module-nose-1:1.3.7-alt4.git20160316 sisyphus+229068.100.1.1 1557255939 installed <13>Sep 29 11:48:53 rpmi: python3-module-simplejson-3.15.0-alt1.qa1 sisyphus+225625.16100.91.1 1555293606 installed Building target platforms: x86_64 Building for target x86_64 Wrote: /usr/src/in/nosrpm/python-module-strainer-0.1.4-alt2.1.nosrc.rpm (w1.gzdio) Installing python-module-strainer-0.1.4-alt2.1.src.rpm Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.22013 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python-module-strainer-0.1.4 + echo 'Source #0 (python-module-strainer-0.1.4.tar):' Source #0 (python-module-strainer-0.1.4.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/python-module-strainer-0.1.4.tar + cd python-module-strainer-0.1.4 + /bin/chmod -c -Rf u+rwX,go-w . + cp -fR . ../python3 + find ../python3 -type f -name '*.py' -exec 2to3 -w -n '{}' + RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ../python3/strainer/xhtmlify.py --- ../python3/strainer/xhtmlify.py (original) +++ ../python3/strainer/xhtmlify.py (refactored) @@ -1,6 +1,6 @@ #!/usr/bin/env python """An HTML to XHTML converter.""" -import re, htmlentitydefs, codecs +import re, html.entities, codecs import encodings.aliases @@ -67,9 +67,9 @@ # character reference try: if text[:3] in ("&#x", "&#X"): - c = unichr(int(text[3:-1], 16)) + c = chr(int(text[3:-1], 16)) else: - c = unichr(int(text[2:-1], 10)) + c = chr(int(text[2:-1], 10)) except ValueError: pass else: @@ -88,7 +88,7 @@ if name in ['amp', 'lt', 'gt', 'quot', 'apos']: return text else: - cp = htmlentitydefs.name2codepoint.get(name) + cp = html.entities.name2codepoint.get(name) if cp: return '&#x%x;' % cp else: @@ -250,7 +250,7 @@ encodingdecl = '' if encoding is not None: EncName_re = re.compile(r'[A-Za-z][A-Za-z0-9._-]*\Z') # from XML spec - if isinstance(encoding, basestring) and EncName_re.match(encoding): + if isinstance(encoding, str) and EncName_re.match(encoding): encodingdecl = ' encoding="%s"' % encoding else: # Don't tell them expected format, guessing won't help @@ -277,7 +277,7 @@ EOS = r'\Z' # end of string regexp starts_utf16_re = re.compile('utf[_-]?16', re.IGNORECASE) bomless_utf16_re = re.compile('utf[_-]?16[_-]?[bl]e\Z', re.IGNORECASE) - unicode_input = isinstance(xml, unicode) + unicode_input = isinstance(xml, str) if not re.match(r'1\.[0-9]+' + EOS, default_version): raise ValueError("Bad default XML declaration version") if encoding is not None: @@ -292,9 +292,9 @@ # begin with the Byte Order Mark". if not unicode_input and not (xml.startswith(codecs.BOM_UTF16_LE) or xml.startswith(codecs.BOM_UTF16_BE)): - xml = u'\ufeff'.encode(encoding) + xml + xml = '\ufeff'.encode(encoding) + xml elif unicode_input and bomless_utf16_re.match(encoding): - xml = u'\ufeff' + xml + xml = '\ufeff' + xml # "else: pass"; Python adds the BOM when encoding unicode as UTF-16 if unicode_input: if encoding: @@ -314,7 +314,7 @@ if bomless_utf16_re.match(enc): # These need a BOM prefix according to the spec but the default # Python encodings of that name don't provide one. - prefix = encode(u'\ufeff') + prefix = encode('\ufeff') else: prefix = encode('') chars_we_need = ('''abcdefghijklmnopqrstuvwxyz''' @@ -456,12 +456,12 @@ any = lambda *args: '(?:%s)*' % '|'.join(args) some = lambda *args: '(?:%s)+' % '|'.join(args) named = lambda name, regexp: '(?P<%s>%s)' % (name, regexp) - NameStartChar = (u'[:A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D' - u'\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF' - u'\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]') - if len(u'\U00010000')==1: - NameStartChar = NameStartChar[:-1] + u'\U00010000-\U000EFFFF]' - NameChar = NameStartChar[:-1] + u"0-9\xB7\u0300-\u036F\u203F-\u2040\-]" + NameStartChar = ('[:A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D' + '\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF' + '\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]') + if len('\U00010000')==1: + NameStartChar = NameStartChar[:-1] + '\U00010000-\U000EFFFF]' + NameChar = NameStartChar[:-1] + "0-9\xB7\u0300-\u036F\u203F-\u2040\-]" Name = NameStartChar + any(NameChar) Nmtoken = some(NameChar) quoted = oneof('"[^<>"]*"', "'[^<>']*'") @@ -578,25 +578,25 @@ html = fix_xmldecl(html, encoding=encoding, add_encoding=False) if not encoding: encoding = sniff_encoding(html) - unicode_input = isinstance(html, unicode) + unicode_input = isinstance(html, str) if unicode_input: html = html.encode(encoding, 'strict') if not isinstance(html, str): raise TypeError("Expected string, got %s" % type(html)) html = html.decode(encoding, 'replace') # "in HTML, the Formfeed character (U+000C) is treated as white space" - html = html.replace(u'\u000C', u' ') + html = html.replace('\u000C', ' ') # Replace disallowed characters with U+FFFD (unicode replacement char) - if len(u'\U00010000')==1: + if len('\U00010000')==1: html = re.sub( # XML 1.0 section 2.2, "Char" production - u'[^\x09\x0A\x0D\u0020-\uD7FF\uE000-\uFFFD' - u'\U00010000-\U0010FFFF]', # <-- 32 bit characters - u'\N{replacement character}', html) + '[^\x09\x0A\x0D\u0020-\uD7FF\uE000-\uFFFD' + '\U00010000-\U0010FFFF]', # <-- 32 bit characters + '\N{replacement character}', html) else: # Replace 32-bit characters, this Python build doesn't support them html = re.sub( # XML 1.0 section 2.2, "Char" production - u'[^\x09\x0A\x0D\u0020-\uD7FF\uE000-\uFFFD]', - u'\N{replacement character}', html) + '[^\x09\x0A\x0D\u0020-\uD7FF\uE000-\uFFFD]', + '\N{replacement character}', html) def ERROR(message, charpos=None): if charpos is None: @@ -616,7 +616,7 @@ # Output the XML declaration and doctype, if they exist. doctype, lastpos = fix_doctype(html) output(doctype) - if html.startswith('')+1 if not doctype: output(html[:pos]) @@ -780,7 +780,7 @@ try: assert xhtml==xhtmlify(xhtml) except ValidationError: - print xhtml + print(xhtml) raise xmlparse(re.sub('(?s)', '', xhtml)) # ET can't handle if len(sys.argv)==2: @@ -790,13 +790,13 @@ def xmlparse(snippet, encoding=None, wrap=None): """Parse snippet as XML with ElementTree/expat. By default it wraps the snippet in an outer element before parsing (unless the - snippet starts "\n%s\n' % snippet else: input = snippet - if isinstance(snippet, unicode): + if isinstance(snippet, str): if not encoding: encoding = sniff_encoding(snippet) input = input.encode(encoding) parser.feed(input) parser.close() - except xml.parsers.expat.ExpatError, e: + except xml.parsers.expat.ExpatError as e: lineno, offset = e.lineno, e.offset lineno -= 1 if lineno==input.count('\n'): # last line => @@ -835,7 +835,7 @@ """Detects the XML encoding as per XML 1.0 section F.1.""" if isinstance(xml, str): xmlstr = xml - elif isinstance(xml, basestring): + elif isinstance(xml, str): xmlstr = xml.encode('utf-8') else: raise TypeError('Expected a string, got %r' % type(xml)) @@ -845,7 +845,7 @@ encode = codecs.lookup(enc).incrementalencoder().encode prefix = encode('') # any header such as a UTF-8 BOM if enc in ('utf_16_le', 'utf_16_be'): - prefix = u'\ufeff'.encode(enc) # the standard approach fails + prefix = RefactoringTool: Refactored ../python3/strainer/wellformed.py RefactoringTool: Refactored ../python3/strainer/validate.py RefactoringTool: Refactored ../python3/strainer/operators.py '\ufeff'.encode(enc) # the standard approach fails L = lambda s: re.escape(encode(s)) # encoded form of literal s optional = lambda s: '(?:%s)?' % s oneof = lambda opts: '(?:%s)' % '|'.join(opts) --- ../python3/strainer/wellformed.py (original) +++ ../python3/strainer/wellformed.py (refactored) @@ -1,7 +1,7 @@ """Performs basic XHTML wellformedness checks.""" import xml.sax import xml.sax.handler -import htmlentitydefs +import html.entities from xml.sax._exceptions import SAXParseException @@ -17,7 +17,7 @@ """Calls is_wellformed_xml with doctype=DOCTYPE_XHTML1_STRICT and entitydefs=htmlentitydefs.entitydefs.""" return is_wellformed_xml(docpart, doctype=DOCTYPE_XHTML1_STRICT, - entitydefs=htmlentitydefs.entitydefs, + entitydefs=html.entities.entitydefs, record_error=record_error) def is_wellformed_xml(docpart, doctype='', entitydefs={}, record_error=None): @@ -47,7 +47,7 @@ parser.feed(doc) parser.close() return True - except SAXParseException, e: # catches our exception and other parse errors + except SAXParseException as e: # catches our exception and other parse errors if record_error is not None: line, column = e.getLineNumber(), e.getColumnNumber() # Correct location to account for our adding a doctype prefix. --- ../python3/strainer/validate.py (original) +++ ../python3/strainer/validate.py (refactored) @@ -2,7 +2,7 @@ import lxml.etree # the stdlib's expat parser can't do validation import os import re -import urlparse +import urllib.parse try: import demjson as json # most accurate JSON validator AFAIK @@ -60,7 +60,7 @@ DOCTYPE_XHTML1_TRANSITIONAL or DOCTYPE_XHTML1_FRAMESET.""" try: lxml.etree.fromstring(doctype + xhtml, parser=_get_parser()) - except lxml.etree.XMLSyntaxError, e: + except lxml.etree.XMLSyntaxError as e: # Try to fix up the error message so line numbers are # relative to xhtml. tline = doctype.count('\n') @@ -85,7 +85,7 @@ xhtml = doctype + (template % xhtml_fragment) try: lxml.etree.fromstring(xhtml, parser=_get_parser()) - except lxml.etree.XMLSyntaxError, e: + except lxml.etree.XMLSyntaxError as e: # Try to fix up the error message so line numbers are # relative to the fragment. message = re.sub(r'line (\d+)', @@ -97,5 +97,5 @@ """Validates that json is a valid JSON string (by loading it).""" try: json.loads(jsonstr) - except ValueError, e: + except ValueError as e: raise JSONSyntaxError(str(e)) --- ../python3/strainer/operators.py (original) +++ ../python3/strainer/operators.py (refactored) @@ -1,11 +1,11 @@ -from xhtmlify import xhtmlify, XMLParsingError, ValidationError +from .xhtmlify import xhtmlify, XMLParsingError, ValidationError from xml.etree import ElementTree as etree from xml.parsers.expat import ExpatError import copy, re from pprint import pformat, pprint from simplejson import loads from nose.tools import * -from almostequal import approx_equal +from .almostequal import approx_equal import strainer.log as log log = log.log @@ -32,7 +32,7 @@ def replace_escape_chars(needle): needle = needle.replace(' ', ' ') - needle = needle.replace(u'\xa0', ' ') + needle = needle.replace('\xa0', ' ') return needle def normalize_to_xhtml(needle): @@ -42,7 +42,7 @@ needle = xhtmlify(needle) try: needle_node = etree.fromstring(needle) - except ExpatError, e: + except ExpatError as e: raise XMLParsingError('Could not parse %s into xml. %s'%(needle, e.args[0])) needle_node = remove_whitespace_nodes(needle_node) remove_namespace(needle_node) @@ -52,11 +52,11 @@ def in_xhtml(needle, haystack): try: needle_s = normalize_to_xhtml(needle) - except ValidationError, e: + except ValidationError as e: raise XMLParsingError('Could not parse needle: %RefactoringTool: Refactored ../python3/strainer/middleware.py s into xml. %s'%(needle, e.message)) try: haystack_s = normalize_to_xhtml(haystack) - except ValidationError, e: + except ValidationError as e: raise XMLParsingError('Could not parse haystack: %s into xml. %s'%(haystack, e.message)) return needle_s in haystack_s @@ -66,11 +66,11 @@ haystack = '
%s
' try: needle_s = normalize_to_xhtml(needle) - except ValidationError, e: + except ValidationError as e: raise XMLParsingError('Could not parse needle: %s into xml. %s'%(needle, e.message)) try: haystack_s = normalize_to_xhtml(haystack) - except ValidationError, e: + except ValidationError as e: raise XMLParsingError('Could not parse haystack: %s into xml. %s'%(haystack, e.message)) return needle_s == haystack_s @@ -89,7 +89,7 @@ def assert_raises(exc, method, *args, **kw): try: method(*args, **kw) - except exc, e: + except exc as e: return e else: raise AssertionError('%s() did not raise %s' % (method.__name__, exc.__name__)) @@ -135,7 +135,7 @@ del cb[key] #this needs to be recursive so we can '&ignore'-out ids anywhere in a json stream - for key in set(ca.keys() + cb.keys()): + for key in set(list(ca.keys()) + list(cb.keys())): if key not in ca: log.error('%s!= %s\n key "%s" not in first argument' %(ca, cb, key)) return False @@ -149,7 +149,7 @@ if v1 == '&ignore' or v2 == '&ignore': log.info('Ignored comparison for key: %s', key) continue - if not isinstance(v2, basestring) and isinstance(v1, basestring): + if not isinstance(v2, str) and isinstance(v1, str): if not eq_pprint(type(v1), type(v2)): log.error('The types of values for "%s" do not match (%s vs. %s)' %(key, v1, v2)) return False @@ -177,9 +177,9 @@ return _eq_dict(ca, cb, ignore=ignore) def eq_json(a, b): - if isinstance(a, basestring): + if isinstance(a, str): a = loads(a) - if isinstance(b, basestring): + if isinstance(b, str): b = loads(b) eq_dict(a, b) @@ -187,5 +187,5 @@ return True -__all__ = [_key for _key in locals().keys() if not _key.startswith('_')] +__all__ = [_key for _key in list(locals().keys()) if not _key.startswith('_')] --- ../python3/strainer/middleware.py (original) +++ ../python3/strainer/middleware.py (refactored) @@ -1,11 +1,11 @@ """Provides WSGI middleware for validating and tidying HTML output.""" import re -import xhtmlify +from . import xhtmlify import logging try: - from cStringIO import StringIO + from io import StringIO except ImportError: - from StringIO import StringIO + from io import StringIO __all__ = ['XHTMLValidatorMiddleware', 'XHTMLifyMiddleware', @@ -50,7 +50,7 @@ return response try: - from validate import validate_xhtml, XHTMLSyntaxError + from .validate import validate_xhtml, XHTMLSyntaxError class XHTMLValidatorMiddleware(BufferingMiddleware): def __init__(self, app, doctype='', record_error=LOG.error): @@ -66,7 +66,7 @@ if content_type in ('text/html', 'application/xml+html'): try: validate_xhtml(response, doctype=self.doctype) - except XHTMLSyntaxError, e: + except XHTMLSyntaxError as e: self.record_error(str(e)) return response except ImportError: @@ -92,7 +92,7 @@ return response -from wellformed import is_wellformed_xhtml, is_wellformed_xml +from .wellformed import is_wellformed_xhtml, is_wellformed_xml class WellformednessCheckerMiddleware(BufferingMiddleware): """Checks that served webpages are well-formed HTML/XHTML/XML, @@ -119,7 +119,7 @@ is_wellformed_xml(response, record_error=self.record_error) return response -from validate import validate_json, JSONSyntaxError +from .validate import validate_json, RefactoringTool: No changes to ../python3/strainer/log.py RefactoringTool: No changes to ../python3/strainer/doctypes.py RefactoringTool: Refactored ../python3/strainer/case.py RefactoringTool: No changes to ../python3/strainer/almostequal.py RefactoringTool: No changes to ../python3/setup.py RefactoringTool: Files that were modified: RefactoringTool: ../python3/strainer/xhtmlify.py RefactoringTool: ../python3/strainer/wellformed.py RefactoringTool: ../python3/strainer/validate.py RefactoringTool: ../python3/strainer/operators.py RefactoringTool: ../python3/strainer/middleware.py RefactoringTool: ../python3/strainer/log.py RefactoringTool: ../python3/strainer/doctypes.py RefactoringTool: ../python3/strainer/case.py RefactoringTool: ../python3/strainer/almostequal.py RefactoringTool: ../python3/setup.py JSONSyntaxError class JSONValidatorMiddleware(BufferingMiddleware): def __init__(self, app, doctype='', record_error=LOG.error): @@ -134,6 +134,6 @@ if content_type=='text/json': try: validate_json(response) - except JSONSyntaxError, e: + except JSONSyntaxError as e: self.record_error(str(e)) return response --- ../python3/strainer/case.py (original) +++ ../python3/strainer/case.py (refactored) @@ -1,5 +1,5 @@ import sys -from cStringIO import StringIO +from io import StringIO import inspect import traceback @@ -81,7 +81,7 @@ klass = cls break else: - raise AttributeError('%s not found on %s' % (func.__name__, func.im_class.__name__)) + raise AttributeError('%s not found on %s' % (func.__name__, func.__self__.__class__.__name__)) superfunc = getattr(super(klass, self), func.__name__) #superfunc is bound, so "self" is implied #Args and KW needed? @@ -90,7 +90,7 @@ superfunc(klass.__base__) else: superfunc() - except Exception, e: + except Exception as e: if delay: append_delayed_and_print_traceback(e) else: @@ -101,7 +101,7 @@ #During try: ret = func(self) - except Exception, e: + except Exception as e: if delay: append_delayed_and_print_traceback(e) else: @@ -122,7 +122,7 @@ '''Like the nose tool of the same name, but returns the exception raised so that args can be checked''' try: ret = method(*args, **kwargs) - except exc, e: + except exc as e: return e else: raise AssertionError('The expected exception (%s) was not raised' % exc.__name__) + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.80479 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python-module-strainer-0.1.4 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export FFLAGS + /usr/bin/python setup.py build --debug running build running build_py creating build creating build/lib creating build/lib/strainer copying strainer/xhtmlify.py -> build/lib/strainer copying strainer/wellformed.py -> build/lib/strainer copying strainer/validate.py -> build/lib/strainer copying strainer/operators.py -> build/lib/strainer copying strainer/middleware.py -> build/lib/strainer copying strainer/log.py -> build/lib/strainer copying strainer/doctypes.py -> build/lib/strainer copying strainer/case.py -> build/lib/strainer copying strainer/almostequal.py -> build/lib/strainer copying strainer/__init__.py -> build/lib/strainer running egg_info writing strainer.egg-info/PKG-INFO writing top-level names to strainer.egg-info/top_level.txt writing dependency_links to strainer.egg-info/dependency_links.txt writing entry points to strainer.egg-info/entry_points.txt reading manifest file 'strainer.egg-info/SOURCES.txt' writing manifest file 'strainer.egg-info/SOURCES.txt' + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/python-module-strainer-0.1.4 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export FFLAGS + /usr/bin/python3 setup.py build --debug running build running build_py creating build creating build/lib creating build/lib/strainer copying strainer/xhtmlify.py -> build/lib/strainer copying strainer/wellformed.py -> build/lib/strainer copying strainer/validate.py -> build/lib/strainer copying strainer/operators.py -> build/lib/strainer copying strainer/middleware.py -> build/lib/strainer copying strainer/log.py -> build/lib/strainer copying strainer/doctypes.py -> build/lib/strainer copying strainer/case.py -> build/lib/strainer copying strainer/almostequal.py -> build/lib/strainer copying strainer/__init__.py -> build/lib/strainer running egg_info writing strainer.egg-info/PKG-INFO writing dependency_links to strainer.egg-info/dependency_links.txt writing entry points to strainer.egg-info/entry_points.txt writing top-level names to strainer.egg-info/top_level.txt reading manifest file 'strainer.egg-info/SOURCES.txt' writing manifest file 'strainer.egg-info/SOURCES.txt' + popd ~/RPM/BUILD/python-module-strainer-0.1.4 + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.4069 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python-module-strainer-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python-module-strainer-buildroot + PATH=/usr/libexec/rpm-build:/usr/src/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games + cd python-module-strainer-0.1.4 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export FFLAGS + /usr/bin/python setup.py install --skip-build --root=/usr/src/tmp/python-module-strainer-buildroot --force running install running install_lib creating /usr/src/tmp/python-module-strainer-buildroot creating /usr/src/tmp/python-module-strainer-buildroot/usr creating /usr/src/tmp/python-module-strainer-buildroot/usr/lib creating /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7 creating /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages creating /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer copying build/lib/strainer/__init__.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer copying build/lib/strainer/almostequal.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer copying build/lib/strainer/case.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer copying build/lib/strainer/doctypes.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer copying build/lib/strainer/log.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer copying build/lib/strainer/middleware.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer copying build/lib/strainer/operators.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer copying build/lib/strainer/validate.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer copying build/lib/strainer/wellformed.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer copying build/lib/strainer/xhtmlify.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/__init__.py to __init__.pyc byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/almostequal.py to almostequal.pyc byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/case.py to case.pyc byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/doctypes.py to doctypes.pyc byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/log.py to log.pyc byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/middleware.py to middleware.pyc byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/operators.py to operators.pyc byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/validate.py to validate.pyc byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/wellformed.py to wellformed.pyc byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/xhtmlify.py to xhtmlify.pyc running install_egg_info running egg_info writing strainer.egg-info/PKG-INFO writing top-level names to strainer.egg-info/top_level.txt writing dependency_links to strainer.egg-info/dependency_links.txt writing entry points to strainer.egg-info/entry_points.txt reading manifest file 'strainer.egg-info/SOURCES.txt' writing manifest file 'strainer.egg-info/SOURCES.txt' Copying strainer.egg-info to /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer-0.1.4-py2.7.egg-info running install_scripts + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/python-module-strainer-0.1.4 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export FFLAGS + /usr/bin/python3 setup.py install --skip-build --root=/usr/src/tmp/python-module-strainer-buildroot --force running install running install_lib creating /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3 creating /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages creating /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer copying build/lib/strainer/__init__.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer copying build/lib/strainer/almostequal.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer copying build/lib/strainer/case.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer copying build/lib/strainer/doctypes.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer copying build/lib/strainer/log.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer copying build/lib/strainer/middleware.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer copying build/lib/strainer/operators.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer copying build/lib/strainer/validate.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer copying build/lib/strainer/wellformed.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer copying build/lib/strainer/xhtmlify.py -> /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/__init__.py to __init__.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/almostequal.py to almostequal.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/case.py to case.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/doctypes.py to doctypes.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/log.py to log.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/middleware.py to middleware.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/operators.py to operators.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/validate.py to validate.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/wellformed.py to wellformed.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/xhtmlify.py to xhtmlify.cpython-37.pyc running install_egg_info running egg_info writing strainer.egg-info/PKG-INFO writing dependency_links to strainer.egg-info/dependency_links.txt writing entry points to strainer.egg-info/entry_points.txt writing top-level names to strainer.egg-info/top_level.txt reading manifest file 'strainer.egg-info/SOURCES.txt' writing manifest file 'strainer.egg-info/SOURCES.txt' Copying strainer.egg-info to /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer-0.1.4-py3.7.egg-info running install_scripts + popd ~/RPM/BUILD/python-module-strainer-0.1.4 + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python-module-strainer-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python-module-strainer-buildroot (binconfig,pkgconfig,libtool,desktop,gnuconfig) Checking contents of files in /usr/src/tmp/python-module-strainer-buildroot/ (default) Compressing files in /usr/src/tmp/python-module-strainer-buildroot (auto) Adjusting library links in /usr/src/tmp/python-module-strainer-buildroot ./usr/lib: Verifying ELF objects in /usr/src/tmp/python-module-strainer-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal) Bytecompiling python modules in /usr/src/tmp/python-module-strainer-buildroot using /usr/bin/python unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/__init__.pyc unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/almostequal.pyc unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/case.pyc unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/doctypes.pyc unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/log.pyc unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/middleware.pyc unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/operators.pyc unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/validate.pyc unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/wellformed.pyc unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/xhtmlify.pyc compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/__init__.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/almostequal.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/case.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/doctypes.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/log.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/middleware.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/operators.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/validate.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/wellformed.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/xhtmlify.py Bytecompiling python modules with optimization in /usr/src/tmp/python-module-strainer-buildroot using /usr/bin/python -O compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/__init__.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/almostequal.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/case.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/doctypes.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/log.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/middleware.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/operators.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/validate.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/wellformed.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/xhtmlify.py Bytecompiling python3 modules in /usr/src/tmp/python-module-strainer-buildroot using /usr/bin/python3 unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/__pycache__/__init__.cpython-37.pyc unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/__pycache__/almostequal.cpython-37.pyc unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/__pycache__/case.cpython-37.pyc unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/__pycache__/doctypes.cpython-37.pyc unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/__pycache__/log.cpython-37.pyc unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/__pycache__/middleware.cpython-37.pyc unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/__pycache__/operators.cpython-37.pyc unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/__pycache__/validate.cpython-37.pyc unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/__pycache__/wellformed.cpython-37.pyc unlink /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/__pycache__/xhtmlify.cpython-37.pyc compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/__init__.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/almostequal.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/case.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/doctypes.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/log.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/middleware.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/operators.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/validate.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/wellformed.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/xhtmlify.py Bytecompiling python3 modules with optimization in /usr/src/tmp/python-module-strainer-buildroot using /usr/bin/python3 -O compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/__init__.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/almostequal.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/case.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/doctypes.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/log.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/middleware.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/operators.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/validate.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/wellformed.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/xhtmlify.py Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python-module-strainer-buildroot using /usr/bin/python3 -OO compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/__init__.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/almostequal.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/case.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/doctypes.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/log.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/middleware.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/operators.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/validate.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/wellformed.py compile /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/xhtmlify.py Hardlinking identical .pyc and .opt-?.pyc files './usr/lib/python3/site-packages/strainer/__pycache__/validate.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/strainer/__pycache__/validate.cpython-37.pyc' './usr/lib/python3/site-packages/strainer/__pycache__/middleware.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/strainer/__pycache__/middleware.cpython-37.pyc' './usr/lib/python3/site-packages/strainer/__pycache__/log.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/strainer/__pycache__/log.cpython-37.pyc' './usr/lib/python3/site-packages/strainer/__pycache__/log.cpython-37.opt-2.pyc' => './usr/lib/python3/site-packages/strainer/__pycache__/log.cpython-37.opt-1.pyc' './usr/lib/python3/site-packages/strainer/__pycache__/doctypes.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/strainer/__pycache__/doctypes.cpython-37.pyc' './usr/lib/python3/site-packages/strainer/__pycache__/doctypes.cpython-37.opt-2.pyc' => './usr/lib/python3/site-packages/strainer/__pycache__/doctypes.cpython-37.opt-1.pyc' './usr/lib/python3/site-packages/strainer/__pycache__/case.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/strainer/__pycache__/case.cpython-37.pyc' './usr/lib/python3/site-packages/strainer/__pycache__/__init__.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/strainer/__pycache__/__init__.cpython-37.pyc' './usr/lib/python3/site-packages/strainer/__pycache__/__init__.cpython-37.opt-2.pyc' => './usr/lib/python3/site-packages/strainer/__pycache__/__init__.cpython-37.opt-1.pyc' Hardlinking identical .pyc and .pyo files './usr/lib/python2.7/site-packages/strainer/validate.pyo' => './usr/lib/python2.7/site-packages/strainer/validate.pyc' './usr/lib/python2.7/site-packages/strainer/middleware.pyo' => './usr/lib/python2.7/site-packages/strainer/middleware.pyc' './usr/lib/python2.7/site-packages/strainer/log.pyo' => './usr/lib/python2.7/site-packages/strainer/log.pyc' './usr/lib/python2.7/site-packages/strainer/doctypes.pyo' => './usr/lib/python2.7/site-packages/strainer/doctypes.pyc' './usr/lib/python2.7/site-packages/strainer/case.pyo' => './usr/lib/python2.7/site-packages/strainer/case.pyc' './usr/lib/python2.7/site-packages/strainer/__init__.pyo' => './usr/lib/python2.7/site-packages/strainer/__init__.pyc' Executing(%check): /bin/sh -e /usr/src/tmp/rpm-tmp.20671 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python-module-strainer-0.1.4 + python setup.py test running test running egg_info writing strainer.egg-info/PKG-INFO writing top-level names to strainer.egg-info/top_level.txt writing dependency_links to strainer.egg-info/dependency_links.txt writing entry points to strainer.egg-info/entry_points.txt reading manifest file 'strainer.egg-info/SOURCES.txt' writing manifest file 'strainer.egg-info/SOURCES.txt' running build_ext ---------------------------------------------------------------------- Ran 0 tests in 0.000s OK + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/python-module-strainer-0.1.4 + python3 setup.py test running test running egg_info writing strainer.egg-info/PKG-INFO writing dependency_links to strainer.egg-info/dependency_links.txt writing entry points to strainer.egg-info/entry_points.txt writing top-level names to strainer.egg-info/top_level.txt reading manifest file 'strainer.egg-info/SOURCES.txt' writing manifest file 'strainer.egg-info/SOURCES.txt' running build_ext ---------------------------------------------------------------------- Ran 0 tests in 0.000s OK + popd ~/RPM/BUILD/python-module-strainer-0.1.4 + exit 0 Processing files: python-module-strainer-0.1.4-alt2.1 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.vLn7IU 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.jFsdsG find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks,systemd-services) python.req: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/case.py: skipping sys python.req: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/middleware.py: hiding xhtmlify, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/middleware.py: line=6 IGNORE (for REQ=slight and deep=8) module=cStringIO /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/middleware.py: line=8 IGNORE (for REQ=slight and deep=8) module=StringIO /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/middleware.py: line=53 IGNORE (for REQ=slight and deep=8) module=validate python.req: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/middleware.py: hiding wellformed, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/middleware.py: hiding validate, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/operators.py: hiding xhtmlify, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/operators.py: hiding almostequal, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/operators.py: hiding strainer, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/validate.py: line=8 IGNORE (for REQ=slight and deep=8) module=demjson /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/validate.py: line=11 IGNORE (for REQ=slight and deep=12) module=simplejson /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/validate.py: line=13 IGNORE (for REQ=slight and deep=12) module=json python.req: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/validate.py: hiding strainer, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/xhtmlify.py: line=771 IGNORE (for REQ=slight and deep=12) module=sys /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/xhtmlify.py: line=795 IGNORE (for REQ=slight and deep=8) module=xml /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/xhtmlify.py: line=796 IGNORE (for REQ=slight and deep=8) module=xml shebang.req.files: executable script /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python2.7/site-packages/strainer/xhtmlify.py is not executable Provides: python2.7(strainer), python2.7(strainer.almostequal), python2.7(strainer.case), python2.7(strainer.doctypes), python2.7(strainer.log), python2.7(strainer.middleware), python2.7(strainer.operators), python2.7(strainer.validate), python2.7(strainer.wellformed), python2.7(strainer.xhtmlify) Requires: python2.7(json), /usr/lib/python2.7/site-packages, python-modules, python2.7(encodings), python2.7(inspect), python2.7(logging), python2.7(lxml), python2.7(nose), python2.7(pkg_resources), python2.7(simplejson), python2.7(unittest), python2.7(xml) Processing files: python3-module-strainer-0.1.4-alt2.1 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.tWReVv 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.LR1v8o find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks,systemd-services) python3.req: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/case.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/middleware.py: line=3 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/middleware.py: line=6 IGNORE (for REQ=slight and deep=8) module=io /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/middleware.py: line=8 IGNORE (for REQ=slight and deep=8) module=io /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/middleware.py: line=53 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/middleware.py: line=95 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/middleware.py: line=122 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/operators.py: line=1 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/operators.py: line=8 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/validate.py: line=8 IGNORE (for REQ=slight and deep=8) module=demjson /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/validate.py: line=11 IGNORE (for REQ=slight and deep=12) module=simplejson /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/validate.py: line=13 IGNORE (for REQ=slight and deep=12) module=json /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/xhtmlify.py: line=771 IGNORE (for REQ=slight and deep=12) module=sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/xhtmlify.py: line=795 IGNORE (for REQ=slight and deep=8) module=xml.parsers.expat /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/xhtmlify.py: line=796 IGNORE (for REQ=slight and deep=8) module=xml.etree shebang.req.files: executable script /usr/src/tmp/python-module-strainer-buildroot/usr/lib/python3/site-packages/strainer/xhtmlify.py is not executable Provides: python3(strainer), python3(strainer.almostequal), python3(strainer.case), python3(strainer.doctypes), python3(strainer.log), python3(strainer.middleware), python3(strainer.operators), python3(strainer.validate), python3(strainer.wellformed), python3(strainer.xhtmlify) Requires: /usr/lib/python3/site-packages, python3(codecs) < 0, python3(copy) < 0, python3(encodings.aliases) < 0, python3(html.entities) < 0, python3(inspect) < 0, python3(io) < 0, python3(logging) < 0, python3(lxml.etree) < 0, python3(nose.tools) < 0, python3(os) < 0, python3(pkg_resources) < 0, python3(pprint) < 0, python3(re) < 0, python3(simplejson) < 0, python3(traceback) < 0, python3(unittest) < 0, python3(urllib.parse) < 0, python3(xml.etree) < 0, python3(xml.parsers.expat) < 0, python3(xml.sax) < 0, python3(xml.sax._exceptions) < 0, python3(xml.sax.handler) < 0 Wrote: /usr/src/RPM/RPMS/noarch/python-module-strainer-0.1.4-alt2.1.noarch.rpm (w2.lzdio) Wrote: /usr/src/RPM/RPMS/noarch/python3-module-strainer-0.1.4-alt2.1.noarch.rpm (w2.lzdio) 4.42user 1.89system 0:08.66elapsed 72%CPU (0avgtext+0avgdata 38992maxresident)k 0inputs+0outputs (0major+305784minor)pagefaults 0swaps 4.25user 2.93system 0:22.74elapsed 31%CPU (0avgtext+0avgdata 135508maxresident)k 112inputs+0outputs (0major+320522minor)pagefaults 0swaps