<86>Dec 4 18:34:34 userdel[1768134]: delete user 'rooter' <86>Dec 4 18:34:34 userdel[1768134]: removed group 'rooter' owned by 'rooter' <86>Dec 4 18:34:34 userdel[1768134]: removed shadow group 'rooter' owned by 'rooter' <86>Dec 4 18:34:34 groupadd[1768156]: group added to /etc/group: name=rooter, GID=699 <86>Dec 4 18:34:34 groupadd[1768156]: group added to /etc/gshadow: name=rooter <86>Dec 4 18:34:34 groupadd[1768156]: new group: name=rooter, GID=699 <86>Dec 4 18:34:34 useradd[1768179]: new user: name=rooter, UID=699, GID=699, home=/root, shell=/bin/bash <86>Dec 4 18:34:34 userdel[1768230]: delete user 'builder' <86>Dec 4 18:34:34 userdel[1768230]: removed group 'builder' owned by 'builder' <86>Dec 4 18:34:34 userdel[1768230]: removed shadow group 'builder' owned by 'builder' <86>Dec 4 18:34:34 groupadd[1768263]: group added to /etc/group: name=builder, GID=700 <86>Dec 4 18:34:34 groupadd[1768263]: group added to /etc/gshadow: name=builder <86>Dec 4 18:34:34 groupadd[1768263]: new group: name=builder, GID=700 <86>Dec 4 18:34:34 useradd[1768284]: new user: name=builder, UID=700, GID=700, home=/usr/src, shell=/bin/bash <13>Dec 4 18:34:40 rpmi: libgdbm-1.8.3-alt10 1454943334 installed <13>Dec 4 18:34:40 rpmi: libexpat-2.2.10-alt1 sisyphus+259966.100.1.1 1602824518 installed <13>Dec 4 18:34:40 rpmi: libp11-kit-0.23.15-alt2 sisyphus+252784.100.2.2 1591274901 installed <13>Dec 4 18:34:40 rpmi: libtasn1-4.16.0-alt1 sisyphus+245480.100.1.1 1580825062 installed <13>Dec 4 18:34:40 rpmi: rpm-macros-alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Dec 4 18:34:40 rpmi: alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Dec 4 18:34:40 rpmi: ca-certificates-2020.10.22-alt1 sisyphus+260224.300.2.1 1603549301 installed <13>Dec 4 18:34:40 rpmi: ca-trust-0.1.2-alt1 sisyphus+233348.100.1.1 1561653823 installed <13>Dec 4 18:34:40 rpmi: p11-kit-trust-0.23.15-alt2 sisyphus+252784.100.2.2 1591274901 installed <13>Dec 4 18:34:40 rpmi: libcrypto1.1-1.1.1g-alt1 sisyphus+249982.60.8.1 1587743711 installed <13>Dec 4 18:34:40 rpmi: libssl1.1-1.1.1g-alt1 sisyphus+249982.60.8.1 1587743711 installed <13>Dec 4 18:34:40 rpmi: python3-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed <13>Dec 4 18:34:41 rpmi: python3-base-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed <13>Dec 4 18:34:41 rpmi: libpython3-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed <13>Dec 4 18:34:41 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>Dec 4 18:34:41 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>Dec 4 18:34:44 rpmi: libtcl-8.6.10-alt1 sisyphus+241485.100.1.1 1574408316 installed <13>Dec 4 18:34:44 rpmi: tcl-8.6.10-alt1 sisyphus+241485.100.1.1 1574408316 installed <13>Dec 4 18:34:44 rpmi: python3-modules-curses-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed <13>Dec 4 18:34:44 rpmi: libverto-0.3.0-alt1_7 sisyphus+225932.100.1.1 1553994919 installed <13>Dec 4 18:34:44 rpmi: liblmdb-0.9.23-alt1 sisyphus+225277.100.2.1 1553001679 installed <13>Dec 4 18:34:44 rpmi: libkeyutils-1.6.1-alt1 sisyphus+256015.100.1.1 1596820124 installed <13>Dec 4 18:34:44 rpmi: libcom_err-1.45.6.0.24.af1a-alt1 sisyphus+262279.100.1.1 1606088229 installed <86>Dec 4 18:34:44 groupadd[1800434]: group added to /etc/group: name=_keytab, GID=499 <86>Dec 4 18:34:44 groupadd[1800434]: new group: name=_keytab, GID=499 <13>Dec 4 18:34:44 rpmi: libkrb5-1.18.3-alt1 sisyphus+262109.100.1.1 1605777180 installed <13>Dec 4 18:34:44 rpmi: libtirpc-1.2.6-alt1 sisyphus+250076.100.1.1 1587038270 installed <13>Dec 4 18:34:44 rpmi: libnsl2-1.1.0-alt1_1 1511548749 installed <13>Dec 4 18:34:44 rpmi: python3-modules-nis-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed <13>Dec 4 18:34:44 rpmi: libpng16-1.6.37-alt1 sisyphus+236677.100.2.1 1566917998 installed <13>Dec 4 18:34:44 rpmi: libbrotlicommon-1.0.9-alt2 sisyphus+257777.100.1.1 1599688017 installed <13>Dec 4 18:34:44 rpmi: libbrotlidec-1.0.9-alt2 sisyphus+257777.100.1.1 1599688017 installed <13>Dec 4 18:34:44 rpmi: libgraphite2-1.3.14-alt2 sisyphus+250009.100.1.1 1586943065 installed <13>Dec 4 18:34:44 rpmi: libharfbuzz-2.6.8-alt1 sisyphus+254028.100.1.1 1593106819 installed <13>Dec 4 18:34:44 rpmi: libfreetype-2.10.4-alt2 sisyphus+260293.100.2.1 1604479496 installed <13>Dec 4 18:34:44 rpmi: fontconfig-2.13.1-alt1 sisyphus+257555.100.1.1 1599475160 installed Updating fonts cache: <29>Dec 4 18:34:45 fontconfig: Updating fonts cache: succeeded [ DONE ] <13>Dec 4 18:34:45 rpmi: libXdmcp-1.1.3-alt1 sisyphus+225206.600.1.2 1552949353 installed <13>Dec 4 18:34:45 rpmi: libXau-1.0.9-alt1 sisyphus+223149.200.2.1 1551268152 installed <13>Dec 4 18:34:45 rpmi: libxcb-1.14-alt1 sisyphus+247358.200.1.3 1583854228 installed <13>Dec 4 18:34:45 rpmi: libX11-locales-3:1.6.12-alt1 sisyphus+256796.100.1.1 1598422159 installed <13>Dec 4 18:34:45 rpmi: libX11-3:1.6.12-alt1 sisyphus+256796.100.1.1 1598422166 installed <13>Dec 4 18:34:45 rpmi: libXrender-0.9.10-alt1 sisyphus+261890.100.1.1 1605595177 installed <13>Dec 4 18:34:45 rpmi: libXft-2.3.3-alt1 sisyphus+225206.1000.3.2 1552987708 installed <13>Dec 4 18:34:45 rpmi: libtk-8.6.10-alt1 sisyphus+241485.200.1.1 1574408436 installed <13>Dec 4 18:34:45 rpmi: tk-8.6.10-alt1 sisyphus+241485.200.1.1 1574408436 installed <13>Dec 4 18:34:45 rpmi: tcl-tix-8.4.3-alt3 sisyphus.213276.100 1537348650 installed <13>Dec 4 18:34:45 rpmi: python3-modules-tkinter-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed <13>Dec 4 18:34:45 rpmi: python3-tools-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/python3-module-speedparser-0.2.0-alt3.git20140816.qa1.nosrc.rpm <13>Dec 4 18:34:47 rpmi: python3-module-pkg_resources-1:46.1.3-alt2 sisyphus+260458.600.6.1 1603876498 installed <13>Dec 4 18:34:47 rpmi: libtinfo-devel-6.2.20201107-alt1 sisyphus+261749.100.1.1 1605292929 installed <13>Dec 4 18:34:47 rpmi: libncurses-devel-6.2.20201107-alt1 sisyphus+261749.100.1.1 1605292929 installed <13>Dec 4 18:34:47 rpmi: python3-dev-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed <13>Dec 4 18:34:47 rpmi: python3-module-setuptools-1:46.1.3-alt2 sisyphus+260458.600.6.1 1603876498 installed Installing python3-module-speedparser-0.2.0-alt3.git20140816.qa1.src.rpm Building target platforms: i586 Building for target i586 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.86435 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python3-module-speedparser-0.2.0 + echo 'Source #0 (python3-module-speedparser-0.2.0.tar):' Source #0 (python3-module-speedparser-0.2.0.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/python3-module-speedparser-0.2.0.tar + cd python3-module-speedparser-0.2.0 + /bin/chmod -c -Rf u+rwX,go-w . + tar -xf tests/feeds.tar.bz2 + find ./ -type f -name '*.py' -exec 2to3-3.8 -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 ./tests/speedparsertests.py RefactoringTool: No changes to ./tests/regressions.py RefactoringTool: Refactored ./tests/__init__.py RefactoringTool: Refactored ./speedparser/xmlpprint.py RefactoringTool: Refactored ./speedparser/speedparser.py --- ./tests/speedparsertests.py (original) +++ ./tests/speedparsertests.py (refactored) @@ -67,7 +67,7 @@ jsonpath = path.replace('dat', 'json') if isinstance(data, dict): content = json.dumps(data, cls=TimeEncoder) - elif isinstance(data, basestring): + elif isinstance(data, str): content = data else: return None @@ -220,7 +220,7 @@ # removing all containing code (like a summary which is just an object if 'summary' in fpe: if 'summary' not in spe: - print("%s\n----\n%s\n" % (pformat(fpe), pformat(spe))) + print(("%s\n----\n%s\n" % (pformat(fpe), pformat(spe)))) if len(fpe.summary) < 5 and len(spe.summary.replace(' ', '')) < 20: pass else: @@ -283,7 +283,7 @@ entry_equivalence(self, fpresult, spresult) except: import traceback - print("Comp Failure: %s" % path) + print(("Comp Failure: %s" % path)) traceback.print_exc() @@ -362,14 +362,14 @@ success += 1 except: import traceback - print("Failure: %s" % f) + print(("Failure: %s" % f)) traceback.print_exc() failedentries.append(f) - print("Success: %d out of %d (%0.2f %%, fpe: %d, spe: %d, both: %d)" % (success, - total, (100 * success)/float(total-fperrors), fperrors, sperrors, errcompats)) - - print("Failed entries:\n%s" % pformat(failedentries)) - print("Bozo entries:\n%s" % pformat(bozoentries)) + print(("Success: %d out of %d (%0.2f %%, fpe: %d, spe: %d, both: %d)" % (success, + total, (100 * success)/float(total-fperrors), fperrors, sperrors, errcompats))) + + print(("Failed entries:\n%s" % pformat(failedentries))) + print(("Bozo entries:\n%s" % pformat(bozoentries))) class CoverageTest(TestCaseBase): @@ -408,12 +408,12 @@ entry_equivalence(self, fpresult, spresult) except: failedentries.append(f) - print("Success: %d out of %d (%0.2f %%, fpe: %d, spe: %d)" % (success, - total, (100 * success)/float(total-fperrors), fperrors, sperrors)) - print("Entry Success: %d out of %d (%0.2f %%)" % (success-len(failedentries), - success, (100*(success-len(failedentries)))/float(total-fperrors))) - print("Failed Paths:\n%s" % pformat(failedpaths)) - print("Failed entries:\n%s" % pformat(failedentries)) + print(("Success: %d out of %d (%0.2f %%, fpe: %d, spe: %d)" % (success, + total, (100 * success)/float(total-fperrors), fperrors, sperrors))) + print(("Entry Success: %d out of %d (%0.2f %%)" % (success-len(failedentries), + success, (100*(success-len(failedentries)))/float(total-fperrors)))) + print(("Failed Paths:\n%s" % pformat(failedpaths))) + print(("Failed entries:\n%s" % pformat(failedentries))) class SpeedTest(TestCaseBase): def setUp(self): @@ -439,7 +439,7 @@ #fpspeed = getspeed(feedparser, self.files[:total]) spspeed, fullsize = getspeed(speedparser, self.files[:total]) pct = lambda x: total/x - print("speedparser: %0.2f/sec, %s/sec" % (pct(spspeed), sizeformat(fullsize/spspeed))) + print(("speedparser: %0.2f/sec, %s/sec" % (pct(spspeed), sizeformat(fullsize/spspeed)))) #print "feedparser: %0.2f/sec, speedparser: %0.2f/sec" % (pct(fpspeed), pct(spspeed)) class SpeedTestNoClean(TestCaseBase): @@ -465,7 +465,7 @@ #fpspeed = getspeed(feedparser, self.files[:total]) spspeed, fullsize = getspeed(speedparser, self.files[:total], args=(False,)) pct = lambda x: total/x - print("speedparser (no html cleaning): %0.2f/sec, %s/sec" % (pct(spspeed), sizeformat(fullsize/spspeed))) + print(("speedparser (no html cleaning): %0.2f/sec, %s/sec" % (pct(spspeed), sizeformat(fullsize/spspeed)))) #print "feedparser: %0.2f/sec, speedparser: %0.2f/sec (html cleaning disabled)" % (pct(fpspeed), pct(spspeed)) --- ./tests/__init__.py (original) +++ ./tests/__init__.py (refactored) @@ -1,2 +1,2 @@ -from speedparsertests import * +from .speedparsertests import * __all__ = dir() --- ./speedparser/xmlpprint.py (original) +++ ./speedparser/xmlpprint.py (refactored) @@ -11,4 +11,4 @@ sys.exit(-1) tree = etree.parse(sys.argv[1]) -print(etree.tostring(tree, pretty_print=True)) +print((etree.tostring(tree, pretty_print=True))) --- ./speedparser/speedparser.py (original) +++ ./speedparser/speedparser.py (refactored) @@ -16,7 +16,7 @@ import re import time -import urlparse +import urllib.parse import chardet from lxml import etree from lxml.html import clean @@ -24,7 +24,7 @@ try: import feedparser except: - import feedparsercompat as feedparser + from . import feedparsercompat as feedparser keymap = feedparser.FeedParserDict.keymap fpnamespaces = feedparser._FeedParserMixin.namespaces @@ -92,7 +92,7 @@ """Strips the outer tag, if text starts with a tag. Not entity aware; designed to quickly strip outer tags from lxml cleaner output. Only checks for

and

outer tags.""" - if not text or not isinstance(text, basestring): + if not text or not isinstance(text, str): return text stripped = text.strip() if (stripped.startswith('

') or stripped.startswith('

')) and \ @@ -124,14 +124,14 @@ if emailmatch: email = emailmatch.group(0) # probably a better way to do the following, but it passes all the tests - author = author.replace(email, u'') - author = author.replace(u'()', u'') - author = author.replace(u'<>', u'') - author = author.replace(u'<>', u'') + author = author.replace(email, '') + author = author.replace('()', '') + author = author.replace('<>', '') + author = author.replace('<>', '') author = author.strip() - if author and (author[0] == u'('): + if author and (author[0] == '('): author = author[1:] - if author and (author[-1] == u')'): + if author and (author[-1] == ')'): author = author[:-1] author = author.strip() return '%s (%s)' % (author, email) @@ -142,27 +142,27 @@ def reverse_namespace_map(nsmap): d = fpnamespaces.copy() - d.update(dict([(v, k) for (k, v) in nsmap.iteritems()])) + d.update(dict([(v, k) for (k, v) in nsmap.items()])) return d def base_url(root): """Determine the base url for a root element.""" - for attr, value in root.attrib.iteritems(): + for attr, value in root.attrib.items(): if attr.endswith('base') and 'http' in value: return value return None def full_href(href, base=None): - return urlparse.urljoin(base, href) + return urllib.parse.urljoin(base, href) def full_href_attribs(attribs, base=None): if base is None: return dict(attribs) d = dict(attribs) - for key, value in d.iteritems(): + for key, value in d.items(): if key == 'href': d[key] = full_href(value, base) return d @@ -245,7 +245,7 @@ self.entries = entries def clean(self, text): - if text and isinstance(text, basestring): + if text and isinstance(text, str): return self.cleaner.clean_html(text) return text @@ -286,7 +286,7 @@ e['summary'] = e['content'][0]['value'] if e.get('summary', False) is None: - e['summary'] = u'' + e['summary'] = '' # support feed entries that have a guid but no link if 'guid' in e and 'link' not in e: @@ -501,7 +501,7 @@ self.feed = feed def clean(self, text, outer_tag=True): - if text and isinstance(text, basestring): + if text and isinstance(text, str): if not outer_tag: txt = self.cleaner.clean_html(text)RefactoringTool: Refactored ./speedparser/feedparsercompat.py RefactoringTool: Refactored ./speedparser/__init__.py RefactoringTool: No changes to ./setup.py RefactoringTool: Refactored ./docs/conf.py frag = lxml.html.fragment_fromstring(txt) @@ -542,7 +542,7 @@ if value: feed['generator'] = value else: - for value in node.attrib.itervalues(): + for value in node.attrib.values(): if 'http://' in value: feed['generator'] = value @@ -617,7 +617,7 @@ def parse_namespaces(self): nsmap = self.root.nsmap.copy() - for key in nsmap.keys(): + for key in list(nsmap.keys()): if key is None: nsmap[self.xmlns] = nsmap[key] del nsmap[key] --- ./speedparser/feedparsercompat.py (original) +++ ./speedparser/feedparsercompat.py (refactored) @@ -37,11 +37,11 @@ except IndexError: raise KeyError("object doesn't have key 'category'") elif key == 'enclosures': - norel = lambda link: FeedParserDict([(name,value) for (name,value) in link.items() if name!='rel']) - return [norel(link) for link in dict.__getitem__(self, 'links') if link['rel']==u'enclosure'] + norel = lambda link: FeedParserDict([(name,value) for (name,value) in list(link.items()) if name!='rel']) + return [norel(link) for link in dict.__getitem__(self, 'links') if link['rel']=='enclosure'] elif key == 'license': for link in dict.__getitem__(self, 'links'): - if link['rel']==u'license' and 'href' in link: + if link['rel']=='license' and 'href' in link: return link['href'] else: realkey = self.keymap.get(key, key) @@ -282,17 +282,17 @@ registerDateHandler(_parse_date_iso8601) # 8-bit date handling routines written by ytrewq1. -_korean_year = u'\ub144' # b3e2 in euc-kr -_korean_month = u'\uc6d4' # bff9 in euc-kr -_korean_day = u'\uc77c' # c0cf in euc-kr -_korean_am = u'\uc624\uc804' # bfc0 c0fc in euc-kr -_korean_pm = u'\uc624\ud6c4' # bfc0 c8c4 in euc-kr +_korean_year = '\ub144' # b3e2 in euc-kr +_korean_month = '\uc6d4' # bff9 in euc-kr +_korean_day = '\uc77c' # c0cf in euc-kr +_korean_am = '\uc624\uc804' # bfc0 c0fc in euc-kr +_korean_pm = '\uc624\ud6c4' # bfc0 c8c4 in euc-kr _korean_onblog_date_re = \ re.compile('(\d{4})%s\s+(\d{2})%s\s+(\d{2})%s\s+(\d{2}):(\d{2}):(\d{2})' % \ (_korean_year, _korean_month, _korean_day)) _korean_nate_date_re = \ - re.compile(u'(\d{4})-(\d{2})-(\d{2})\s+(%s|%s)\s+(\d{,2}):(\d{,2}):(\d{,2})' % \ + re.compile('(\d{4})-(\d{2})-(\d{2})\s+(%s|%s)\s+(\d{,2}):(\d{,2}):(\d{,2})' % \ (_korean_am, _korean_pm)) def _parse_date_onblog(dateString): '''Parse a string according to the OnBlog 8-bit date format''' @@ -328,40 +328,40 @@ # Unicode strings for Greek date strings _greek_months = \ { \ - u'\u0399\u03b1\u03bd': u'Jan', # c9e1ed in iso-8859-7 - u'\u03a6\u03b5\u03b2': u'Feb', # d6e5e2 in iso-8859-7 - u'\u039c\u03ac\u03ce': u'Mar', # ccdcfe in iso-8859-7 - u'\u039c\u03b1\u03ce': u'Mar', # cce1fe in iso-8859-7 - u'\u0391\u03c0\u03c1': u'Apr', # c1f0f1 in iso-8859-7 - u'\u039c\u03ac\u03b9': u'May', # ccdce9 in iso-8859-7 - u'\u039c\u03b1\u03ca': u'May', # cce1fa in iso-8859-7 - u'\u039c\u03b1\u03b9': u'May', # cce1e9 in iso-8859-7 - u'\u0399\u03bf\u03cd\u03bd': u'Jun', # c9effded in iso-8859-7 - u'\u0399\u03bf\u03bd': u'Jun', # c9efed in iso-8859-7 - u'\u0399\u03bf\u03cd\u03bb': u'Jul', # c9effdeb in iso-8859-7 - u'\u0399\u03bf\u03bb': u'Jul', # c9f9eb in iso-8859-7 - u'\u0391\u03cd\u03b3': u'Aug', # c1fde3 in iso-8859-7 - u'\u0391\u03c5\u03b3': u'Aug', # c1f5e3 in iso-8859-7 - u'\u03a3\u03b5\u03c0': u'Sep', # d3e5f0 in iso-8859-7 - u'\u039f\u03ba\u03c4': u'Oct', # cfeaf4 in iso-8859-7 - u'\u039d\u03bf\u03ad': u'Nov', # cdefdd in iso-8859-7 - u'\u039d\u03bf\u03b5': u'Nov', # cdefe5 in iso-8859-7 - u'\u0394\u03b5\u03ba': u'Dec', # c4e5ea in iso-8859-7 + '\u0399\u03b1\u03bd': 'Jan', # c9e1ed in iso-8859-7 + '\u03a6\u03b5\u03b2': 'Feb', # d6e5e2 in iso-8859-7 + '\u039c\u03ac\u03ce': 'Mar', # ccdcfe in iso-8859-7 + '\u039c\u03b1\u03ce': 'Mar', # cce1fe in iso-8859-7 + '\u0391\u03c0\u03c1': 'Apr', # c1f0f1 in iso-8859-7 + '\u039c\u03ac\u03b9': 'May', # ccdce9 in iso-8859-7 + '\u039c\u03b1\u03ca': 'May', # cce1fa in iso-8859-7 + '\u039c\u03b1\u03b9': 'May', # cce1e9 in iso-8859-7 + '\u0399\u03bf\u03cd\u03bd': 'Jun', # c9effded in iso-8859-7 + '\u0399\u03bf\u03bd': 'Jun', # c9efed in iso-8859-7 + '\u0399\u03bf\u03cd\u03bb': 'Jul', # c9effdeb in iso-8859-7 + '\u0399\u03bf\u03bb': 'Jul', # c9f9eb in iso-8859-7 + '\u0391\u03cd\u03b3': 'Aug', # c1fde3 in iso-8859-7 + '\u0391\u03c5\u03b3': 'Aug', # c1f5e3 in iso-8859-7 + '\u03a3\u03b5\u03c0': 'Sep', # d3e5f0 in iso-8859-7 + '\u039f\u03ba\u03c4': 'Oct', # cfeaf4 in iso-8859-7 + '\u039d\u03bf\u03ad': 'Nov', # cdefdd in iso-8859-7 + '\u039d\u03bf\u03b5': 'Nov', # cdefe5 in iso-8859-7 + '\u0394\u03b5\u03ba': 'Dec', # c4e5ea in iso-8859-7 } _greek_wdays = \ { \ - u'\u039a\u03c5\u03c1': u'Sun', # caf5f1 in iso-8859-7 - u'\u0394\u03b5\u03c5': u'Mon', # c4e5f5 in iso-8859-7 - u'\u03a4\u03c1\u03b9': u'Tue', # d4f1e9 in iso-8859-7 - u'\u03a4\u03b5\u03c4': u'Wed', # d4e5f4 in iso-8859-7 - u'\u03a0\u03b5\u03bc': u'Thu', # d0e5ec in iso-8859-7 - u'\u03a0\u03b1\u03c1': u'Fri', # d0e1f1 in iso-8859-7 - u'\u03a3\u03b1\u03b2': u'Sat', # d3e1e2 in iso-8859-7 + '\u039a\u03c5\u03c1': 'Sun', # caf5f1 in iso-8859-7 + '\u0394\u03b5\u03c5': 'Mon', # c4e5f5 in iso-8859-7 + '\u03a4\u03c1\u03b9': 'Tue', # d4f1e9 in iso-8859-7 + '\u03a4\u03b5\u03c4': 'Wed', # d4e5f4 in iso-8859-7 + '\u03a0\u03b5\u03bc': 'Thu', # d0e5ec in iso-8859-7 + '\u03a0\u03b1\u03c1': 'Fri', # d0e1f1 in iso-8859-7 + '\u03a3\u03b1\u03b2': 'Sat', # d3e1e2 in iso-8859-7 } _greek_date_format_re = \ - re.compile(u'([^,]+),\s+(\d{2})\s+([^\s]+)\s+(\d{4})\s+(\d{2}):(\d{2}):(\d{2})\s+([^\s]+)') + re.compile('([^,]+),\s+(\d{2})\s+([^\s]+)\s+(\d{4})\s+(\d{2}):(\d{2}):(\d{2})\s+([^\s]+)') def _parse_date_greek(dateString): '''Parse a string according to a Greek 8-bit date format.''' @@ -380,22 +380,22 @@ # Unicode strings for Hungarian date strings _hungarian_months = \ { \ - u'janu\u00e1r': u'01', # e1 in iso-8859-2 - u'febru\u00e1ri': u'02', # e1 in iso-8859-2 - u'm\u00e1rcius': u'03', # e1 in iso-8859-2 - u'\u00e1prilis': u'04', # e1 in iso-8859-2 - u'm\u00e1ujus': u'05', # e1 in iso-8859-2 - u'j\u00fanius': u'06', # fa in iso-8859-2 - u'j\u00falius': u'07', # fa in iso-8859-2 - u'augusztus': u'08', - u'szeptember': u'09', - u'okt\u00f3ber': u'10', # f3 in iso-8859-2 - u'november': u'11', - u'december': u'12', + 'janu\u00e1r': '01', # e1 in iso-8859-2 + 'febru\u00e1ri': '02', # e1 in iso-8859-2 + 'm\u00e1rcius': '03', # e1 in iso-8859-2 + '\u00e1prilis': '04', # e1 in iso-8859-2 + 'm\u00e1ujus': '05', # e1 in iso-8859-2 + 'j\u00fanius': '06', # fa in iso-8859-2 + 'j\u00falius': '07', # fa in iso-8859-2 + 'augusztus': '08', + 'szeptember': '09', + 'okt\u00f3ber': '10', # f3 in iso-8859-2 + 'november': '11', + 'december': '12', } _hungarian_date_format_re = \ - re.compile(u'(\d{4})-([^-]+)-(\d{,2})T(\d{,2}):(\d{2})((\+|-)(\d{,2}:\d{2}))') + re.compile('(\d{4})-([^-]+)-(\d{,2})T(\d{,2}):(\d{2})((\+|-)(\d{,2}:\d{2}))') def _parse_date_hungarian(dateString): '''Parse a string according to a Hungarian 8-bit date format.''' --- ./speedparser/__init__.py (original) +++ ./speedparser/__init__.py (refactored) @@ -1,3 +1,3 @@ -from speedparser import parse +from .speedparser import parse VERSION = (0,2,0) __all__ = ['parse', 'VERSION'] --- ./docs/conf.py (original) +++ ./docs/conf.py (refactored) @@ -37,7 +37,7 @@ # General information about the project. project = 'speedparser'RefactoringTool: Files that were modified: RefactoringTool: ./tests/speedparsertests.py RefactoringTool: ./tests/regressions.py RefactoringTool: ./tests/__init__.py RefactoringTool: ./speedparser/xmlpprint.py RefactoringTool: ./speedparser/speedparser.py RefactoringTool: ./speedparser/feedparsercompat.py RefactoringTool: ./speedparser/__init__.py RefactoringTool: ./setup.py RefactoringTool: ./docs/conf.py -copyright = u'2010 Jason Moiron' +copyright = '2010 Jason Moiron' # The short X.Y version. version = '0.1' @@ -45,13 +45,13 @@ version = None for line in open(os.path.join(projpath, 'setup.py'), 'r'): if line.startswith('version'): - exec line + exec(line) if version is None: version = '0.1' # The full version, including alpha/beta/rc tags. release = version -print("Building release: %s, version: %s" % (release, version)) +print(("Building release: %s, version: %s" % (release, version))) # List of documents that shouldn't be included in the build. #unused_docs = [] @@ -161,8 +161,8 @@ # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'speedparser.tex', u'speedparser Documentation', - u'Jason Moiron', 'manual'), + ('index', 'speedparser.tex', 'speedparser Documentation', + 'Jason Moiron', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.7160 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-speedparser-0.2.0 + 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/speedparser copying speedparser/xmlpprint.py -> build/lib/speedparser copying speedparser/speedparser.py -> build/lib/speedparser copying speedparser/feedparsercompat.py -> build/lib/speedparser copying speedparser/__init__.py -> build/lib/speedparser running egg_info creating speedparser.egg-info writing speedparser.egg-info/PKG-INFO writing dependency_links to speedparser.egg-info/dependency_links.txt writing entry points to speedparser.egg-info/entry_points.txt writing requirements to speedparser.egg-info/requires.txt writing top-level names to speedparser.egg-info/top_level.txt writing manifest file 'speedparser.egg-info/SOURCES.txt' reading manifest file 'speedparser.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'speedparser.egg-info/SOURCES.txt' + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.42455 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python3-module-speedparser-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python3-module-speedparser-buildroot + cd python3-module-speedparser-0.2.0 + 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-speedparser-buildroot --force running install running install_lib creating /usr/src/tmp/python3-module-speedparser-buildroot creating /usr/src/tmp/python3-module-speedparser-buildroot/usr creating /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib creating /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3 creating /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages creating /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser copying build/lib/speedparser/__init__.py -> /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser copying build/lib/speedparser/feedparsercompat.py -> /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser copying build/lib/speedparser/speedparser.py -> /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser copying build/lib/speedparser/xmlpprint.py -> /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser byte-compiling /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/__init__.py to __init__.cpython-38.pyc byte-compiling /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/feedparsercompat.py to feedparsercompat.cpython-38.pyc byte-compiling /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/speedparser.py to speedparser.cpython-38.pyc byte-compiling /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/xmlpprint.py to xmlpprint.cpython-38.pyc running install_egg_info running egg_info writing speedparser.egg-info/PKG-INFO writing dependency_links to speedparser.egg-info/dependency_links.txt writing entry points to speedparser.egg-info/entry_points.txt writing requirements to speedparser.egg-info/requires.txt writing top-level names to speedparser.egg-info/top_level.txt reading manifest file 'speedparser.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'speedparser.egg-info/SOURCES.txt' Copying speedparser.egg-info to /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser-0.2.0-py3.8.egg-info running install_scripts + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python3-module-speedparser-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python3-module-speedparser-buildroot (binconfig,pkgconfig,libtool,desktop) Checking contents of files in /usr/src/tmp/python3-module-speedparser-buildroot/ (default) Compressing files in /usr/src/tmp/python3-module-speedparser-buildroot (auto) Adjusting library links in /usr/src/tmp/python3-module-speedparser-buildroot ./usr/lib: Verifying ELF objects in /usr/src/tmp/python3-module-speedparser-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-speedparser-buildroot using /usr/bin/python2.7 Bytecompiling python modules with optimization in /usr/src/tmp/python3-module-speedparser-buildroot using /usr/bin/python2.7 -O Bytecompiling python3 modules in /usr/src/tmp/python3-module-speedparser-buildroot using /usr/bin/python3 unlink /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/__pycache__/__init__.cpython-38.pyc unlink /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/__pycache__/feedparsercompat.cpython-38.pyc unlink /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/__pycache__/speedparser.cpython-38.pyc unlink /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/__pycache__/xmlpprint.cpython-38.pyc compile /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/__init__.py compile /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/feedparsercompat.py compile /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/speedparser.py compile /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/xmlpprint.py Bytecompiling python3 modules with optimization in /usr/src/tmp/python3-module-speedparser-buildroot using /usr/bin/python3 -O compile /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/__init__.py compile /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/feedparsercompat.py compile /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/speedparser.py compile /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/xmlpprint.py Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python3-module-speedparser-buildroot using /usr/bin/python3 -OO compile /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/__init__.py compile /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/feedparsercompat.py compile /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/speedparser.py compile /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/xmlpprint.py Hardlinking identical .pyc and .opt-?.pyc files './usr/lib/python3/site-packages/speedparser/__pycache__/xmlpprint.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/speedparser/__pycache__/xmlpprint.cpython-38.pyc' './usr/lib/python3/site-packages/speedparser/__pycache__/speedparser.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/speedparser/__pycache__/speedparser.cpython-38.pyc' './usr/lib/python3/site-packages/speedparser/__pycache__/feedparsercompat.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/speedparser/__pycache__/feedparsercompat.cpython-38.pyc' './usr/lib/python3/site-packages/speedparser/__pycache__/__init__.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/speedparser/__pycache__/__init__.cpython-38.pyc' './usr/lib/python3/site-packages/speedparser/__pycache__/__init__.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/speedparser/__pycache__/__init__.cpython-38.opt-1.pyc' Hardlinking identical .pyc and .pyo files Executing(%check): /bin/sh -e /usr/src/tmp/rpm-tmp.6290 Check is turned off by --without check Processing files: python3-module-speedparser-0.2.0-alt3.git20140816.qa1 Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.6290 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-speedparser-0.2.0 + DOCDIR=/usr/src/tmp/python3-module-speedparser-buildroot/usr/share/doc/python3-module-speedparser-0.2.0 + export DOCDIR + rm -rf /usr/src/tmp/python3-module-speedparser-buildroot/usr/share/doc/python3-module-speedparser-0.2.0 + /bin/mkdir -p /usr/src/tmp/python3-module-speedparser-buildroot/usr/share/doc/python3-module-speedparser-0.2.0 + cp -prL README.rst docs/index.rst /usr/src/tmp/python3-module-speedparser-buildroot/usr/share/doc/python3-module-speedparser-0.2.0 + chmod -R go-w /usr/src/tmp/python3-module-speedparser-buildroot/usr/share/doc/python3-module-speedparser-0.2.0 + chmod -R a+rX /usr/src/tmp/python3-module-speedparser-buildroot/usr/share/doc/python3-module-speedparser-0.2.0 + exit 0 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.tZX6PK 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.RnHaJK 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-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/__init__.py: line=1 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/feedparsercompat.py: skipping time /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/feedparsercompat.py: line=12 IGNORE (for REQ=slight and deep=8) module=rfc822 /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/feedparsercompat.py: line=14 IGNORE (for REQ=slight and deep=8) module=email python3.req: /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/speedparser.py: skipping time /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/speedparser.py: line=25 IGNORE (for REQ=slight and deep=8) module=feedparser /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/speedparser.py: line=27 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/speedparser.py: line=692 IGNORE (for REQ=slight and deep=12) module=traceback /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/speedparser.py: line=699 IGNORE (for REQ=slight and deep=8) module=sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/speedparser.py: line=708 IGNORE (for REQ=slight and deep=8) module=pprint python3.req: /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/xmlpprint.py: skipping sys shebang.req.files: executable script /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/feedparsercompat.py is not executable shebang.req.files: executable script /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/speedparser.py is not executable shebang.req.files: executable script /usr/src/tmp/python3-module-speedparser-buildroot/usr/lib/python3/site-packages/speedparser/xmlpprint.py is not executable Provides: python3(speedparser), python3(speedparser.feedparsercompat), python3(speedparser.speedparser), python3(speedparser.xmlpprint) Requires: /usr/lib/python3/site-packages, python3(chardet) < 0, python3(lxml) < 0, python3(lxml.html) < 0, python3(re) < 0, python3(urllib.parse) < 0 Wrote: /usr/src/RPM/RPMS/noarch/python3-module-speedparser-0.2.0-alt3.git20140816.qa1.noarch.rpm 21.04user 0.89system 0:23.33elapsed 94%CPU (0avgtext+0avgdata 19836maxresident)k 0inputs+0outputs (0major+142593minor)pagefaults 0swaps 32.17user 4.53system 0:39.27elapsed 93%CPU (0avgtext+0avgdata 109072maxresident)k 0inputs+0outputs (0major+599338minor)pagefaults 0swaps