86>Nov 11 09:06:09 userdel[4035886]: delete user 'rooter'
<86>Nov 11 09:06:09 userdel[4035886]: removed group 'rooter' owned by 'rooter'
<86>Nov 11 09:06:09 groupadd[4035891]: group added to /etc/group: name=rooter, GID=597
<86>Nov 11 09:06:09 groupadd[4035891]: group added to /etc/gshadow: name=rooter
<86>Nov 11 09:06:09 groupadd[4035891]: new group: name=rooter, GID=597
<86>Nov 11 09:06:09 useradd[4035899]: new user: name=rooter, UID=597, GID=597, home=/root, shell=/bin/bash
<86>Nov 11 09:06:09 userdel[4035908]: delete user 'builder'
<86>Nov 11 09:06:09 userdel[4035908]: removed group 'builder' owned by 'builder'
<86>Nov 11 09:06:09 userdel[4035908]: removed shadow group 'builder' owned by 'builder'
<86>Nov 11 09:06:09 groupadd[4035915]: group added to /etc/group: name=builder, GID=598
<86>Nov 11 09:06:09 groupadd[4035915]: group added to /etc/gshadow: name=builder
<86>Nov 11 09:06:09 groupadd[4035915]: new group: name=builder, GID=598
<86>Nov 11 09:06:09 useradd[4035922]: new user: name=builder, UID=598, GID=598, home=/usr/src, shell=/bin/bash
<13>Nov 11 09:06:15 rpmi: libgdbm-1.8.3-alt10 1454943334 installed
<13>Nov 11 09:06:15 rpmi: libexpat-2.2.10-alt1 sisyphus+259966.100.1.1 1602824518 installed
<13>Nov 11 09:06:15 rpmi: python3-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed
<13>Nov 11 09:06:15 rpmi: python3-base-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed
<13>Nov 11 09:06:15 rpmi: libpython3-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed
<13>Nov 11 09:06:15 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed
<13>Nov 11 09:06:15 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed
<13>Nov 11 09:06:17 rpmi: libtcl-8.6.10-alt1 sisyphus+241485.100.1.1 1574408316 installed
<13>Nov 11 09:06:17 rpmi: tcl-8.6.10-alt1 sisyphus+241485.100.1.1 1574408316 installed
<13>Nov 11 09:06:17 rpmi: python3-modules-curses-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed
<13>Nov 11 09:06:17 rpmi: libtirpc-1.2.6-alt1 sisyphus+250076.100.1.1 1587038270 installed
<13>Nov 11 09:06:17 rpmi: libnsl2-1.1.0-alt1_1 1511548749 installed
<13>Nov 11 09:06:17 rpmi: python3-modules-nis-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed
<13>Nov 11 09:06:17 rpmi: libpng16-1.6.37-alt1 sisyphus+236677.100.2.1 1566917998 installed
<13>Nov 11 09:06:17 rpmi: libgraphite2-1.3.14-alt2 sisyphus+250009.100.1.1 1586943065 installed
<13>Nov 11 09:06:17 rpmi: libharfbuzz-2.6.8-alt1 sisyphus+254028.100.1.1 1593106819 installed
<13>Nov 11 09:06:17 rpmi: libfreetype-2.10.4-alt2 sisyphus+260293.100.2.1 1604479496 installed
<13>Nov 11 09:06:17 rpmi: fontconfig-2.13.1-alt1 sisyphus+257555.100.1.1 1599475160 installed
Updating fonts cache: <29>Nov 11 09:06:18 fontconfig: Updating fonts cache: succeeded
[ DONE ]
<13>Nov 11 09:06:18 rpmi: libXdmcp-1.1.3-alt1 sisyphus+225206.600.1.2 1552949353 installed
<13>Nov 11 09:06:18 rpmi: libXau-1.0.9-alt1 sisyphus+223149.200.2.1 1551268152 installed
<13>Nov 11 09:06:18 rpmi: libxcb-1.14-alt1 sisyphus+247358.200.1.3 1583854228 installed
<13>Nov 11 09:06:18 rpmi: libX11-locales-3:1.6.12-alt1 sisyphus+256796.100.1.1 1598422159 installed
<13>Nov 11 09:06:18 rpmi: libX11-3:1.6.12-alt1 sisyphus+256796.100.1.1 1598422166 installed
<13>Nov 11 09:06:18 rpmi: libXrender-0.9.8-alt1 1371312112 installed
<13>Nov 11 09:06:18 rpmi: libXft-2.3.3-alt1 sisyphus+225206.1000.3.2 1552987708 installed
<13>Nov 11 09:06:18 rpmi: libtk-8.6.10-alt1 sisyphus+241485.200.1.1 1574408436 installed
<13>Nov 11 09:06:18 rpmi: tk-8.6.10-alt1 sisyphus+241485.200.1.1 1574408436 installed
<13>Nov 11 09:06:19 rpmi: tcl-tix-8.4.3-alt3 sisyphus.213276.100 1537348650 installed
<13>Nov 11 09:06:19 rpmi: python3-modules-tkinter-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed
<13>Nov 11 09:06:19 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>Nov 11 09:06:20 rpmi: python3-module-pkg_resources-1:46.1.3-alt2 sisyphus+260458.600.6.1 1603876498 installed
<13>Nov 11 09:06:20 rpmi: libtinfo-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686226 installed
<13>Nov 11 09:06:20 rpmi: libncurses-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686226 installed
<13>Nov 11 09:06:20 rpmi: python3-dev-3.8.6-alt1 sisyphus+259085.100.2.1 1601904174 installed
<13>Nov 11 09:06:20 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.20820
+ 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
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.83730
+ 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.80691
+ 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.26180
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.26180
+ 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.0D1ZFL
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.fT5GYM
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
25.23user 1.26system 0:27.29elapsed 97%CPU (0avgtext+0avgdata 19860maxresident)k
0inputs+0outputs (0major+140631minor)pagefaults 0swaps
35.60user 4.50system 0:42.17elapsed 95%CPU (0avgtext+0avgdata 108636maxresident)k
0inputs+0outputs (0major+570463minor)pagefaults 0swaps