<86>Apr 14 01:19:32 userdel[100910]: delete user 'rooter' <86>Apr 14 01:19:32 groupadd[101023]: group added to /etc/group: name=rooter, GID=555 <86>Apr 14 01:19:32 groupadd[101023]: group added to /etc/gshadow: name=rooter <86>Apr 14 01:19:32 groupadd[101023]: new group: name=rooter, GID=555 <86>Apr 14 01:19:32 useradd[101043]: new user: name=rooter, UID=555, GID=555, home=/root, shell=/bin/bash <86>Apr 14 01:19:32 userdel[101160]: delete user 'builder' <86>Apr 14 01:19:32 userdel[101160]: removed group 'builder' owned by 'builder' <86>Apr 14 01:19:32 groupadd[101289]: group added to /etc/group: name=builder, GID=556 <86>Apr 14 01:19:32 groupadd[101289]: group added to /etc/gshadow: name=builder <86>Apr 14 01:19:32 groupadd[101289]: new group: name=builder, GID=556 <86>Apr 14 01:19:32 useradd[101347]: new user: name=builder, UID=556, GID=556, home=/usr/src, shell=/bin/bash <13>Apr 14 01:19:36 rpmi: libgdbm-1.8.3-alt10 1454943313 installed <13>Apr 14 01:19:36 rpmi: libidn2-2.0.4-alt3.M80P.1 1520307194 installed <13>Apr 14 01:19:36 rpmi: ca-certificates-2016.02.25-alt1 1462368370 installed <13>Apr 14 01:19:36 rpmi: libcrypto10-1.0.2n-alt0.M80P.1 1512766129 installed <13>Apr 14 01:19:36 rpmi: libtinfo-devel-5.9-alt8 1456756459 installed <13>Apr 14 01:19:37 rpmi: libncurses-devel-5.9-alt8 1456756459 installed <13>Apr 14 01:19:37 rpmi: libexpat-2.2.4-alt0.M80P.1 1503871120 installed <13>Apr 14 01:19:37 rpmi: publicsuffix-list-dafsa-20190329-alt1 p8+226349.100.1.1 1554128046 installed <13>Apr 14 01:19:37 rpmi: libpsl-0.18.0-alt0.M80P.1 1502785107 installed <13>Apr 14 01:19:37 rpmi: libnghttp2-1.8.0-alt1 1456818805 installed <13>Apr 14 01:19:37 rpmi: libverto-0.2.6-alt1_6 1455633234 installed <13>Apr 14 01:19:37 rpmi: libkeyutils-1.5.10-alt0.M80P.2 p8+216694.100.6.1 1547827915 installed <13>Apr 14 01:19:37 rpmi: libcom_err-1.42.13-alt2 1449075846 installed <13>Apr 14 01:19:37 rpmi: libbrotlicommon0-1.0.4-alt0.M80P.1 1528205024 installed <13>Apr 14 01:19:37 rpmi: libbrotlidec0-1.0.4-alt0.M80P.1 1528205024 installed <13>Apr 14 01:19:37 rpmi: libssl10-1.0.2n-alt0.M80P.1 1512766129 installed <86>Apr 14 01:19:37 groupadd[121747]: group added to /etc/group: name=_keytab, GID=499 <86>Apr 14 01:19:37 groupadd[121747]: group added to /etc/gshadow: name=_keytab <86>Apr 14 01:19:37 groupadd[121747]: new group: name=_keytab, GID=499 <13>Apr 14 01:19:37 rpmi: libkrb5-1.14.6-alt1.M80P.1 1525355673 installed <86>Apr 14 01:19:37 groupadd[122215]: group added to /etc/group: name=sasl, GID=498 <86>Apr 14 01:19:37 groupadd[122215]: group added to /etc/gshadow: name=sasl <86>Apr 14 01:19:37 groupadd[122215]: new group: name=sasl, GID=498 <13>Apr 14 01:19:37 rpmi: libsasl2-3-2.1.26-alt7 1479477445 installed <13>Apr 14 01:19:37 rpmi: libldap-2.4.45-alt1.M80P.1 1513980376 installed <13>Apr 14 01:19:37 rpmi: libcurl-7.64.0-alt1 p8+220788.100.1.1 1549495393 installed <13>Apr 14 01:19:38 rpmi: python3-base-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 14 01:19:38 rpmi: python3-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 14 01:19:38 rpmi: rpm-build-python3-0.1.10.10-alt1.M80P.1 1530521451 installed <13>Apr 14 01:19:39 rpmi: libpython3-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 14 01:19:39 rpmi: python-modules-encodings-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 14 01:19:39 rpmi: python3-dev-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 14 01:19:39 rpmi: python3-module-pycurl-7.19.5.3-alt1.1.1 1459598459 installed <13>Apr 14 01:19:39 rpmi: python3-module-six-1.10.0-alt7 1496087616 installed <13>Apr 14 01:19:39 rpmi: python-modules-compiler-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 14 01:19:39 rpmi: python-modules-email-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 14 01:19:40 rpmi: python-modules-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 14 01:19:40 rpmi: python-modules-ctypes-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 14 01:19:40 rpmi: python-modules-multiprocessing-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 14 01:19:40 rpmi: python-modules-logging-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 14 01:19:40 rpmi: python-modules-unittest-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 14 01:19:40 rpmi: python-tools-2to3-2.7.11-alt6.M80P.1 1527682470 installed Installing python3-module-urlgrabber-3.10.1-alt1.git20140204.1.src.rpm Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.99628 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf urlgrabber-3.10.1 + echo 'Source #0 (urlgrabber-3.10.1.tar):' Source #0 (urlgrabber-3.10.1.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/urlgrabber-3.10.1.tar + cd urlgrabber-3.10.1 + /bin/chmod -c -Rf u+rwX,go-w . + find -type f -name '*.py' -exec 2to3 -w -n '{}' + RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ./urlgrabber/progress.py RefactoringTool: No changes to ./urlgrabber/mirror.py RefactoringTool: Refactored ./urlgrabber/grabber.py --- ./urlgrabber/progress.py (original) +++ ./urlgrabber/progress.py (refactored) @@ -807,7 +807,7 @@ tm.end(size) def _mtst(datas, *args): - print('-' * 79) + print(('-' * 79)) tm = TextMultiFileMeter(threaded=False) dl_sizes = {} --- ./urlgrabber/grabber.py (original) +++ ./urlgrabber/grabber.py (refactored) @@ -640,7 +640,7 @@ if six.PY3: return obj # stolen from yum.i18n - if isinstance(obj, unicode): + if isinstance(obj, str): obj = obj.encode('utf-8', errors) return obj @@ -649,7 +649,7 @@ return str(e) except UnicodeEncodeError: # always use byte strings - return unicode(e).encode('utf8') + return str(e).encode('utf8') ######################################################################## # END UTILITY FUNCTIONS @@ -1988,7 +1988,7 @@ if v is False: return 'False' if type(v) in six.integer_types + (float,): return str(v) - if not six.PY3 and type(v) == unicode: + if not six.PY3 and type(v) == str: v = v.encode('UTF8') if type(v) == str: def quoter(c): return _quoter_map.get(c, c) @@ -2178,10 +2178,10 @@ return ret def abort(self): - for dl in self.running.values(): + for dl in list(self.running.values()): self.epoll.unregister(dl.stdout) dl.abort() - for dl in self.cache.values(): + for dl in list(self.cache.values()): dl.abort() @@ -2475,8 +2475,8 @@ def _main_test(): try: url, filename = sys.argv[1:3] except ValueError: - print('usage:', sys.argv[0], \ - ' [copy_local=0|1] [close_connection=0|1]') + print(('usage:', sys.argv[0], \ + ' [copy_local=0|1] [close_connection=0|1]')) sys.exit() kwargs = {} @@ -2486,8 +2486,8 @@ set_throttle(1.0) set_bandwidth(32 * 1024) - print("throttle: %s, throttle bandwidth: %s B/s" % (default_grabber.throttle, - default_grabber.bandwidth)) + print(("throttle: %s, throttle bandwidth: %s B/s" % (default_grabber.throttle, + default_grabber.bandwidth))) try: from .progress import text_progress_meter except ImportError: pass @@ -2495,14 +2495,14 @@ try: name = urlgrab(*(url, filename), **kwargs) except URLGrabError as e: print(e) - else: print('LOCAL FILE:', name) + else: print(('LOCAL FILE:', name)) def _retry_test(): try: url, filename = sys.argv[1:3] except ValueError: - print('usage:', sys.argv[0], \ - ' [copy_local=0|1] [close_connection=0|1]') + print(('usage:', sys.argv[0], \ + ' [copy_local=0|1] [close_connection=0|1]')) sys.exit() kwargs = {} @@ -2515,7 +2515,7 @@ else: kwargs['progress_obj'] = text_progress_meter() def cfunc(filename, hello, there='foo'): - print(hello, there) + print((hello, there)) import random rnum = random.random() if rnum < .5: @@ -2530,12 +2530,12 @@ kwargs['checkfunc'] = (cfunc, ('hello',), {'there':'there'}) try: name = retrygrab(*(url, filename), **kwargs) except URLGrabError as e: print(e) - else: print('LOCAL FILE:', name) + else: print(('LOCAL FILE:', name)) def _file_object_test(filename=None): if filename is None: filename = __file__ - print('using file "%s" for comparisons' % filename) + print(('using file "%s" for comparisons' % filename)) fo = open(filename) s_input = fo.read() fo.close() @@ -2547,7 +2547,7 @@ fo_input = StringIO(s_input) fo_output = StringIO() wrapper = PyCurlFileObject(fo_input, None, 0) - print('testing %-30s ' % testfunc.__name__, testfunc(wrapper, fo_output)) + print(('testing %-30s ' % testfunc.__name__, testfunc(wrapper, fo_output))) s_output = fo_oRefactoringTool: Refactored ./urlgrabber/byterange.py RefactoringTool: No changes to ./urlgrabber/__init__.py RefactoringTool: Refactored ./test/threading/batchgrabber.py RefactoringTool: Refactored ./test/test_mirror.py utput.getvalue() if s_output == s_input: print('passed') else: print('FAILED') --- ./urlgrabber/byterange.py (original) +++ ./urlgrabber/byterange.py (refactored) @@ -261,7 +261,7 @@ from urllib.request import splitattr from urllib.response import addinfourl else: - from urllib import splitattr + from urllib.parse import splitattr from urllib import addinfourl --- ./test/threading/batchgrabber.py (original) +++ ./test/threading/batchgrabber.py (refactored) @@ -31,7 +31,7 @@ import os.path, sys if __name__ == '__main__': - print os.path.dirname(sys.argv[0]) + print(os.path.dirname(sys.argv[0])) sys.path.insert(0, (os.path.dirname(sys.argv[0]) or '.') + '/../..') from threading import Thread, Semaphore @@ -61,12 +61,12 @@ del self.queue[0] thread = Worker(self, url, filename, kwargs) self.threads.append(thread) - if DEBUG: print "starting worker: " + url + if DEBUG: print("starting worker: " + url) thread.start() else: for t in self.threads: if not t.isAlive(): - if DEBUG: print "cleaning up worker: " + t.url + if DEBUG: print("cleaning up worker: " + t.url) self.threads.remove(t) #if len(self.threads) == self.maxthreads: # sleep(0.2) @@ -81,15 +81,15 @@ self.kwargs = kwargs def run(self): - if DEBUG: print "worker thread started." + if DEBUG: print("worker thread started.") grabber = self.parent.grabber progress_obj = grabber.opts.progress_obj if isinstance(progress_obj, MultiFileMeter): self.kwargs['progress_obj'] = progress_obj.newMeter() try: rslt = self.parent.grabber.urlgrab(self.url, self.filename, **self.kwargs) - except URLGrabError, e: - print '%s, %s' % (e, self.url) + except URLGrabError as e: + print('%s, %s' % (e, self.url)) def main(): progress_obj = None @@ -98,13 +98,13 @@ g = BatchURLGrabber(keepalive=1, progress_obj=progress_obj) for arg in sys.argv[1:]: g.urlgrab(arg) - if DEBUG: print "before batchgrab" + if DEBUG: print("before batchgrab") try: g.batchgrab() except KeyboardInterrupt: sys.exit(1) - if DEBUG: print "after batchgrab" + if DEBUG: print("after batchgrab") if __name__ == '__main__': main() --- ./test/test_mirror.py (original) +++ ./test/test_mirror.py (refactored) @@ -119,8 +119,8 @@ tl.append(str(cb_obj.exception)) self.mg.failure_callback = failure_callback, (tricky_list, ), {} data = self.mg.urlread('reference') - self.assert_(data == reference_data) - self.assertEquals(tricky_list[0][:25], + self.assertTrue(data == reference_data) + self.assertEqual(tricky_list[0][:25], '[Errno 14] HTTP Error 403') def test_callback_reraise(self): @@ -209,8 +209,8 @@ 'MAIN mirrors: [a b c d e f] 2', 'MIRROR: trying somefile -> c/somefile'] - self.assertEquals(self.g.calls, expected_calls) - self.assertEquals(urlgrabber.mirror.DEBUG.logs, expected_logs) + self.assertEqual(self.g.calls, expected_calls) + self.assertEqual(urlgrabber.mirror.DEBUG.logs, expected_logs) def test_instance_action(self): 'test the effects of passed-in default_action' @@ -229,8 +229,8 @@ 'MAIN mirrors: [c d e f] 0', 'MIRROR: trying somefile -> c/somefile'] - self.assertEquals(self.g.calls, expected_calls) - self.assertEquals(urlgrabber.mirror.DEBUG.logs, expected_logs) + self.assertEqual(self.g.calls, expected_calls) + self.assertEqual(urlgrabber.mirror.DEBUG.logs, expected_logs) def test_method_action(self): 'test the effects of method-level default_action' @@ -248,8 +248,8 @@ 'MAIN mirrors: [c d e f] 0', 'MIRROR: trying somefile -> c/somefile'] - self.assertEquals(self.g.calls, expecRefactoringTool: Refactored ./test/test_grabber.py ted_calls) - self.assertEquals(urlgrabber.mirror.DEBUG.logs, expected_logs) + self.assertEqual(self.g.calls, expected_calls) + self.assertEqual(urlgrabber.mirror.DEBUG.logs, expected_logs) def callback(self, e): return {'fail': 1} @@ -266,8 +266,8 @@ 'GR mirrors: [b c d e f] 0', 'MAIN mirrors: [a b c d e f] 1'] - self.assertEquals(self.g.calls, expected_calls) - self.assertEquals(urlgrabber.mirror.DEBUG.logs, expected_logs) + self.assertEqual(self.g.calls, expected_calls) + self.assertEqual(urlgrabber.mirror.DEBUG.logs, expected_logs) from six.moves import _thread as thread import socket @@ -319,14 +319,14 @@ # single self.assertRaises(URLGrabError, self.mg.urlgrab, 'foo') - self.assertEquals(self.code, 503); del self.code + self.assertEqual(self.code, 503); del self.code # multi err = [] self.mg.urlgrab('foo', async = True, failfunc = err.append) urlgrabber.grabber.parallel_wait() - self.assertEquals([e.exception.errno for e in err], [256]) - self.assertEquals(self.code, 503); del self.code + self.assertEqual([e.exception.errno for e in err], [256]) + self.assertEqual(self.code, 503); del self.code def test_range(self): 'test client-side processing of HTTP ranges' @@ -336,10 +336,10 @@ # no range specified data = self.mg.urlread('foo') - self.assertEquals(data, 'ABCDEF') + self.assertEqual(data, 'ABCDEF') data = self.mg.urlread('foo', range = (3, 5)) - self.assertEquals(data, 'DE') + self.assertEqual(data, 'DE') def suite(): tl = TestLoader() --- ./test/test_grabber.py (original) +++ ./test/test_grabber.py (refactored) @@ -47,7 +47,7 @@ fo.write(reference_data.encode('utf-8')) fo.close() - self.fo_input = StringIO(unicode(reference_data) if not six.PY3 else reference_data) + self.fo_input = StringIO(str(reference_data) if not six.PY3 else reference_data) self.fo_output = StringIO() (url, parts) = grabber.default_grabber.opts.urlparser.parse( self.filename, grabber.default_grabber.opts) @@ -62,7 +62,7 @@ "PYCurlFileObject .read() method" s = self.wrapper.read() self.fo_output.write(s) - self.assert_(reference_data == self.fo_output.getvalue()) + self.assertTrue(reference_data == self.fo_output.getvalue()) def test_readline(self): "PyCurlFileObject .readline() method" @@ -70,13 +70,13 @@ s = self.wrapper.readline() self.fo_output.write(s) if not s: break - self.assert_(reference_data == self.fo_output.getvalue()) + self.assertTrue(reference_data == self.fo_output.getvalue()) def test_readlines(self): "PyCurlFileObject .readlines() method" li = self.wrapper.readlines() self.fo_output.write(''.join(li)) - self.assert_(reference_data == self.fo_output.getvalue()) + self.assertTrue(reference_data == self.fo_output.getvalue()) def test_smallread(self): "PyCurlFileObject .read(N) with small N" @@ -84,7 +84,7 @@ s = self.wrapper.read(23) self.fo_output.write(s) if not s: break - self.assert_(reference_data == self.fo_output.getvalue()) + self.assertTrue(reference_data == self.fo_output.getvalue()) class HTTPTests(TestCase): def test_reference_file(self): @@ -96,7 +96,7 @@ contents = fo.read() fo.close() - self.assert_(contents == reference_data) + self.assertTrue(contents == reference_data) def test_post(self): "do an HTTP post" @@ -163,38 +163,38 @@ proxies={'http' : 'http://www.proxy.com:9090'}, opener=opener ) opts = g.opts - self.assertEquals( opts.progress_obj, self.meter ) - self.assertEquals( opts.throttle, 0.9 ) - self.assertEquals( opts.bandwidth, 20 ) - self.assertEquals( opts.retry, 20 ) - self.assertEquals( opts.retrycodes, [5,6,7] ) - self.assertEquals( opts.copy_local, 1 ) - self.assertEquals( opts.close_connection, 1 ) - self.assertEquals( opts.user_agent, 'test ua/1.0' ) - self.assertEquals( opts.proxies, {'http' : 'http://www.proxy.com:9090'} ) - self.assertEquals( opts.opener, opener ) + self.assertEqual( opts.progress_obj, self.meter ) + self.assertEqual( opts.throttle, 0.9 ) + self.assertEqual( opts.bandwidth, 20 ) + self.assertEqual( opts.retry, 20 ) + self.assertEqual( opts.retrycodes, [5,6,7] ) + self.assertEqual( opts.copy_local, 1 ) + self.assertEqual( opts.close_connection, 1 ) + self.assertEqual( opts.user_agent, 'test ua/1.0' ) + self.assertEqual( opts.proxies, {'http' : 'http://www.proxy.com:9090'} ) + self.assertEqual( opts.opener, opener ) nopts = grabber.URLGrabberOptions(delegate=opts, throttle=0.5, copy_local=0) - self.assertEquals( nopts.progress_obj, self.meter ) - self.assertEquals( nopts.throttle, 0.5 ) - self.assertEquals( nopts.bandwidth, 20 ) - self.assertEquals( nopts.retry, 20 ) - self.assertEquals( nopts.retrycodes, [5,6,7] ) - self.assertEquals( nopts.copy_local, 0 ) - self.assertEquals( nopts.close_connection, 1 ) - self.assertEquals( nopts.user_agent, 'test ua/1.0' ) - self.assertEquals( nopts.proxies, {'http' : 'http://www.proxy.com:9090'} ) + self.assertEqual( nopts.progress_obj, self.meter ) + self.assertEqual( nopts.throttle, 0.5 ) + self.assertEqual( nopts.bandwidth, 20 ) + self.assertEqual( nopts.retry, 20 ) + self.assertEqual( nopts.retrycodes, [5,6,7] ) + self.assertEqual( nopts.copy_local, 0 ) + self.assertEqual( nopts.close_connection, 1 ) + self.assertEqual( nopts.user_agent, 'test ua/1.0' ) + self.assertEqual( nopts.proxies, {'http' : 'http://www.proxy.com:9090'} ) nopts.opener = None - self.assertEquals( nopts.opener, None ) + self.assertEqual( nopts.opener, None ) def test_make_callback(self): """grabber.URLGrabber._make_callback() tests""" def cb(e): pass tup_cb = (cb, ('stuff'), {'some': 'dict'}) g = URLGrabber() - self.assertEquals(g._make_callback(cb), (cb, (), {})) - self.assertEquals(g._make_callback(tup_cb), tup_cb) + self.assertEqual(g._make_callback(cb), (cb, (), {})) + self.assertEqual(g._make_callback(tup_cb), tup_cb) class URLParserTestCase(TestCase): def setUp(self): @@ -213,7 +213,7 @@ for b in bases: g = URLGrabber(prefix=b) (url, parts) = g.opts.urlparser.parse(filename, g.opts) - self.assertEquals(url, target) + self.assertEqual(url, target) def _test_url(self, urllist): g = URLGrabber() @@ -223,17 +223,17 @@ (url, parts) = g.opts.urlparser.parse(urllist[0], g.opts) if 1: - self.assertEquals(url, urllist[1]) - self.assertEquals(parts, urllist[2]) + self.assertEqual(url, urllist[1]) + self.assertEqual(parts, urllist[2]) else: if url == urllist[1] and parts == urllist[2]: - print('OK: %s' % urllist[0]) + print(('OK: %s' % urllist[0])) else: - print('ERROR: %s' % urllist[0]) - print(' ' + urllist[1]) - print(' ' + url) - print(' ' + urllist[2]) - print(' ' + parts) + print(('ERROR: %s' % urllist[0])) + print((' ' + urllist[1])) + print((' ' + url)) + print((' ' + urllist[2])) + print((' ' + parts)) url_tests_all = ( @@ -306,7 +306,7 @@ failure_callback=self._failure_callback) try: g.urlgrab(ref_404) except URLGrabError: pass - self.assertEquals(self.failure_callback_called, 1) + self.assertEqual(self.failure_callback_called, 1) def test_failure_callback_args(self): "failure callback is called with the proper args" @@ -315,14 +315,14 @@ failure_callback=fc) try: g.urlgrab(ref_404) except URLGrabError: pass - self.assert_(hasattr(self, 'obj')) - self.assert_(hasattr(self, 'args')) - self.assert_(hasattr(self, 'kwargs')) - self.assertEquals(self.args, ('foo',)) - self.assertEquals(self.kwargs, {'bar': 'baz'}) - self.assert_(isinstance(self.obj, CallbackObject)) - self.assertEquals(self.obj.url, ref_404) - self.assert_(isinstance(self.obj.exception, URLGrabError)) + self.assertTrue(hasattr(self, 'obj')) + self.assertTrue(hasattr(self, 'args')) + self.assertTrue(hasattr(self, 'kwargs')) + self.assertEqual(self.args, ('foo',)) + self.assertEqual(self.kwargs, {'bar': 'baz'}) + self.assertTrue(isinstance(self.obj, CallbackObject)) + self.assertEqual(self.obj.url, ref_404) + self.assertTrue(isinstance(self.obj.exception, URLGrabError)) del self.obj class InterruptTestCase(TestCase): @@ -351,7 +351,7 @@ interrupt_callback=ic) try: g.urlgrab(ref_http) except KeyboardInterrupt: pass - self.assertEquals(self.interrupt_callback_called, 1) + self.assertEqual(self.interrupt_callback_called, 1) def test_interrupt_callback_raises(self): "interrupt callback raises an exception" @@ -394,25 +394,25 @@ def _check_common_args(self): "check the args that are common to both urlgrab and urlread" - self.assert_(hasattr(self, 'obj')) - self.assert_(hasattr(self, 'args')) - self.assert_(hasattr(self, 'kwargs')) - self.assertEquals(self.args, ('foo',)) - self.assertEquals(self.kwargs, {'bar': 'baz'}) - self.assert_(isinstance(self.obj, CallbackObject)) - self.assertEquals(self.obj.url, short_ref_http) + self.assertTrue(hasattr(self, 'obj')) + self.assertTrue(hasattr(self, 'args')) + self.assertTrue(hasattr(self, 'kwargs')) + self.assertEqual(self.args, ('foo',)) + self.assertEqual(self.kwargs, {'bar': 'baz'}) + self.assertTrue(isinstance(self.obj, CallbackObject)) + self.assertEqual(self.obj.url, short_ref_http) def test_checkfunc_urlgrab_args(self): "check for proper args when used with urlgrab" self.g.urlgrab(short_ref_http, self.filename) self._check_common_args() - self.assertEquals(self.obj.filename, self.filename) + self.assertEqual(self.obj.filename, self.filename) def test_checkfunc_urlread_args(self): "check for proper args when used with urlread" self.g.urlread(short_ref_http) self._check_common_args() - self.assertEquals(self.obj.data, short_reference_data) + self.assertEqual(self.obj.data, short_reference_data) def test_checkfunc_urlgrab_success(self): "check success with urlgrab checkfunc" @@ -482,8 +482,8 @@ self.grabber.urlgrab(self.url, self.filename, reget='simple') data = self._read_file() - self.assertEquals(data[:int(self.hl)], '0'*int(self.hl)) - self.assertEquals(data[int(self.hl):], self.ref[int(self.hl):]) + self.assertEqual(data[:int(self.hl)], '0'*int(self.hl)) + self.assertEqual(data[int(self.hl):], self.ref[int(self.hl):]) class HTTPRegetTests(FTPRegetTests): def setUp(self): @@ -500,8 +500,8 @@ self.grabber.urlgrab(self.url, self.filename, reget='check_timestamp') data = self._read_file() - self.assertEquals(data[:int(self.hl)], '0'*int(self.hl)) - self.assertEquals(data[int(seRefactoringTool: Refactored ./test/test_byterange.py lf.hl):], self.ref[int(self.hl):]) + self.assertEqual(data[:int(self.hl)], '0'*int(self.hl)) + self.assertEqual(data[int(self.hl):], self.ref[int(self.hl):]) except NotImplementedError: self.skip() @@ -515,7 +515,7 @@ self.grabber.urlgrab(self.url, self.filename, reget='check_timestamp') data = self._read_file() - self.assertEquals(data, self.ref) + self.assertEqual(data, self.ref) except: self.skip() --- ./test/test_byterange.py (original) +++ ./test/test_byterange.py (refactored) @@ -40,7 +40,7 @@ # 0 1 2 3 4 5 6 7 8 9 # 0123456789012345678901234567890123456789012345678901234567 890123456789012345678901234567890 self.test = 'Why cannot we write the entire 24 volumes of Encyclopaedia\nBrittanica on the head of a pin?\n' - self.fo = StringIO(unicode(self.test) if not six.PY3 else self.test) + self.fo = StringIO(str(self.test) if not six.PY3 else self.test) self.rfo = RangeableFileObject(self.fo, (20,69)) def tearDown(self): @@ -49,38 +49,38 @@ def test_seek(self): """RangeableFileObject.seek()""" self.rfo.seek(11) - self.assertEquals('24', self.rfo.read(2)) + self.assertEqual('24', self.rfo.read(2)) self.rfo.seek(14) - self.assertEquals('volumes', self.rfo.read(7)) + self.assertEqual('volumes', self.rfo.read(7)) self.rfo.seek(1,1) - self.assertEquals('of', self.rfo.read(2)) + self.assertEqual('of', self.rfo.read(2)) def test_read(self): """RangeableFileObject.read()""" - self.assertEquals('the', self.rfo.read(3)) - self.assertEquals(' entire 24 volumes of ', self.rfo.read(22)) - self.assertEquals('Encyclopaedia\nBrittanica', self.rfo.read(50)) - self.assertEquals('', self.rfo.read()) + self.assertEqual('the', self.rfo.read(3)) + self.assertEqual(' entire 24 volumes of ', self.rfo.read(22)) + self.assertEqual('Encyclopaedia\nBrittanica', self.rfo.read(50)) + self.assertEqual('', self.rfo.read()) def test_readall(self): """RangeableFileObject.read(): to end of file.""" - text_compat = unicode(self.test) if not six.PY3 else self.test + text_compat = str(self.test) if not six.PY3 else self.test rfo = RangeableFileObject(StringIO(text_compat),(11,)) - self.assertEquals(self.test[11:],rfo.read()) + self.assertEqual(self.test[11:],rfo.read()) def test_readline(self): """RangeableFileObject.readline()""" - self.assertEquals('the entire 24 volumes of Encyclopaedia\n', self.rfo.readline()) - self.assertEquals('Brittanica', self.rfo.readline()) - self.assertEquals('', self.rfo.readline()) + self.assertEqual('the entire 24 volumes of Encyclopaedia\n', self.rfo.readline()) + self.assertEqual('Brittanica', self.rfo.readline()) + self.assertEqual('', self.rfo.readline()) def test_tell(self): """RangeableFileObject.tell()""" - self.assertEquals(0,self.rfo.tell()) + self.assertEqual(0,self.rfo.tell()) self.rfo.read(5) - self.assertEquals(5,self.rfo.tell()) + self.assertEqual(5,self.rfo.tell()) self.rfo.readline() - self.assertEquals(39,self.rfo.tell()) + self.assertEqual(39,self.rfo.tell()) class RangeModuleTestCase(TestCase): """Test module level functions defined in range.py""" @@ -104,7 +104,7 @@ (None, None) ) for test, ex in tests: - self.assertEquals( range_tuple_normalize(test), ex ) + self.assertEqual( range_tuple_normalize(test), ex ) try: range_tuple_normalize( (10,8) ) except RangeError: pass @@ -120,7 +120,7 @@ (None, None) RefactoringTool: No changes to ./test/runtests.py RefactoringTool: Refactored ./test/munittest.py RefactoringTool: Refactored ./test/grabberperf.py RefactoringTool: No changes to ./test/base_test_code.py RefactoringTool: Refactored ./setup.py RefactoringTool: Files that were modified: RefactoringTool: ./urlgrabber/progress.py RefactoringTool: ./urlgrabber/mirror.py RefactoringTool: ./urlgrabber/grabber.py RefactoringTool: ./urlgrabber/byterange.py RefactoringTool: ./urlgrabber/__init__.py RefactoringTool: ./test/threading/batchgrabber.py RefactoringTool: ./test/test_mirror.py RefactoringTool: ./test/test_grabber.py RefactoringTool: ./test/test_byterange.py RefactoringTool: ./test/runtests.py RefactoringTool: ./test/munittest.py RefactoringTool: ./test/grabberperf.py RefactoringTool: ./test/base_test_code.py RefactoringTool: ./setup.py RefactoringTool: Warnings/messages while refactoring: RefactoringTool: ### In file ./urlgrabber/byterange.py ### RefactoringTool: Line 347: could not convert: from urllib import ftpwrapper, addclosehook RefactoringTool: All module elements are invalid RefactoringTool: Line 347: could not convert: from urllib import ftpwrapper, addclosehook RefactoringTool: All module elements are invalid RefactoringTool: Line 347: could not convert: from urllib import ftpwrapper, addclosehook RefactoringTool: All module elements are invalid RefactoringTool: Line 347: could not convert: from urllib import ftpwrapper, addclosehook RefactoringTool: All module elements are invalid RefactoringTool: Line 347: could not convert: from urllib import ftpwrapper, addclosehook RefactoringTool: All module elements are invalid RefactoringTool: Line 347: could not convert: from urllib import ftpwrapper, addclosehook RefactoringTool: All module elements are invalid RefactoringTool: Line 347: could not convert: from urllib import ftpwrapper, addclosehook RefactoringTool: All module elements are invalid RefactoringTool: Line 347: could not convert: from urllib import ftpwrapper, addclosehook RefactoringTool: All module elements are invalid RefactoringTool: Line 347: could not convert: from urllib import ftpwrapper, addclosehook RefactoringTool: All module elements are invalid RefactoringTool: Line 347: could not convert: from urllib import ftpwrapper, addclosehook RefactoringTool: All module elements are invalid RefactoringTool: Line 347: could not convert: from urllib import ftpwrapper, addclosehook RefactoringTool: All module elements are invalid RefactoringTool: Line 347: could not convert: from urllib import ftpwrapper, addclosehook RefactoringTool: All module elements are invalid ) for test, ex in tests: - self.assertEquals( range_header_to_tuple(test), ex ) + self.assertEqual( range_header_to_tuple(test), ex ) def test_range_tuple_to_header(self): """byterange.range_tuple_to_header()""" @@ -134,7 +134,7 @@ (None, None), ) for test, ex in tests: - self.assertEquals( range_tuple_to_header(test), ex ) + self.assertEqual( range_tuple_to_header(test), ex ) try: range_tuple_to_header( ('not an int',500) ) except ValueError: pass --- ./test/munittest.py (original) +++ ./test/munittest.py (refactored) @@ -879,7 +879,7 @@ def usageExit(self, msg=None): if msg: print(msg) - print(self.USAGE % self.__dict__) + print((self.USAGE % self.__dict__)) sys.exit(2) def parseArgs(self, argv): --- ./test/grabberperf.py (original) +++ ./test/grabberperf.py (refactored) @@ -52,7 +52,7 @@ os.unlink(tempdst) def setuptemp(size): - if DEBUG: print('writing %d KB to temporary file (%s).' % (size / 1024, tempsrc)) + if DEBUG: print(('writing %d KB to temporary file (%s).' % (size / 1024, tempsrc))) file = open(tempsrc, 'w', 1024) chars = '0123456789' for i in range(size): @@ -122,7 +122,7 @@ if DEBUG: print('\r') - print("%d KB Results:" % (size / 1024)) + print(("%d KB Results:" % (size / 1024))) print_result('full', full_times) print_result('raw', raw_times) print_result('none', none_times) @@ -135,7 +135,7 @@ for i in result_list: mean += i mean = mean/len(result_list) median = result_list[int(len(result_list)/2)] - print(format % (label, mean, median, result_list[0], result_list[-1])) + print((format % (label, mean, median, result_list[0], result_list[-1]))) if __name__ == '__main__': main() --- ./setup.py (original) +++ ./setup.py (refactored) @@ -38,7 +38,7 @@ # load up distutils if __name__ == '__main__': config = globals().copy() - keys = config.keys() + keys = list(config.keys()) for k in keys: #print '%-20s -> %s' % (k, config[k]) if k.startswith('_'): del config[k] + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.85003 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd urlgrabber-3.10.1 + CFLAGS='-pipe -Wall -g -O2' + export CFLAGS + CXXFLAGS='-pipe -Wall -g -O2' + export CXXFLAGS + FFLAGS='-pipe -Wall -g -O2' + export FFLAGS + python3 setup.py build running build running build_py creating build creating build/lib creating build/lib/urlgrabber copying urlgrabber/progress.py -> build/lib/urlgrabber copying urlgrabber/mirror.py -> build/lib/urlgrabber copying urlgrabber/grabber.py -> build/lib/urlgrabber copying urlgrabber/byterange.py -> build/lib/urlgrabber copying urlgrabber/__init__.py -> build/lib/urlgrabber running build_scripts creating build/scripts-3.5 copying and adjusting scripts/urlgrabber -> build/scripts-3.5 changing mode of build/scripts-3.5/urlgrabber from 644 to 755 + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.27334 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python3-module-urlgrabber-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python3-module-urlgrabber-buildroot + cd urlgrabber-3.10.1 + python3 setup.py install --skip-build --root=/usr/src/tmp/python3-module-urlgrabber-buildroot --force --prefix=/usr running install running install_lib creating /usr/src/tmp/python3-module-urlgrabber-buildroot creating /usr/src/tmp/python3-module-urlgrabber-buildroot/usr creating /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib creating /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3 creating /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages creating /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber copying build/lib/urlgrabber/__init__.py -> /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber copying build/lib/urlgrabber/byterange.py -> /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber copying build/lib/urlgrabber/grabber.py -> /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber copying build/lib/urlgrabber/mirror.py -> /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber copying build/lib/urlgrabber/progress.py -> /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber byte-compiling /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/__init__.py to __init__.cpython-35.pyc byte-compiling /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/byterange.py to byterange.cpython-35.pyc byte-compiling /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/grabber.py to grabber.cpython-35.pyc byte-compiling /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/mirror.py to mirror.cpython-35.pyc byte-compiling /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/progress.py to progress.cpython-35.pyc running install_scripts creating /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/bin copying build/scripts-3.5/urlgrabber -> /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/bin changing mode of /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/bin/urlgrabber to 755 running install_data creating /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/share creating /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/share/doc creating /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/share/doc/urlgrabber-3.10.1 copying README -> /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/share/doc/urlgrabber-3.10.1 copying LICENSE -> /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/share/doc/urlgrabber-3.10.1 copying TODO -> /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/share/doc/urlgrabber-3.10.1 copying ChangeLog -> /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/share/doc/urlgrabber-3.10.1 creating /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/libexec copying scripts/urlgrabber-ext-down -> /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/libexec running install_egg_info Writing /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber-3.10.1-py3.5.egg-info + mv /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/libexec/urlgrabber-ext-down /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/bin/ + pushd /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/bin ~/tmp/python3-module-urlgrabber-buildroot/usr/bin ~/RPM/BUILD/urlgrabber-3.10.1 ++ ls + for i in '$(ls)' + sed -i 's|#! /usr/bin/python|#! /usr/bin/python3|' urlgrabber + 2to3 -w -n urlgrabber RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored urlgrabber --- urlgrabber (original) +++ urlgrabber (refactored) @@ -158,7 +158,7 @@ options_exclude = ['delegate', 'interrupt_callback', 'failure_callback', 'urlparser', 'opener', 'checkfunc', 'progress_obj'] - for k in ugo.__dict__.keys(): + for k in list(ugo.__dict__.keys()): if (k not in ug_options) and (k not in options_exclude): ug_options.append(k) #print k @@ -178,8 +178,8 @@ try: optlist, args = getopt.getopt(sys.argv[1:], short_options, long_options + ug_long) - except getopt.GetoptError, e: - print >>sys.stderr, "Error:", e + except getopt.GetoptError as e: + print("Error:", e, file=sys.stderr) self.help([], ret=1) self.verbose = 0 @@ -209,7 +209,7 @@ self.repeat = int(v) if self.repeat < 1: raise ValueError() except ValueError: - print 'ERROR: repeat value must be an int >= 1' + print('ERROR: repeat value must be an int >= 1') sys.exit(1) if o == '-D': self.verbose = 3 @@ -218,20 +218,20 @@ if o in ug_dash: try: val = eval(v) - except Exception, e: - print "error processing option value: %s" % v - print e + except Exception as e: + print("error processing option value: %s" % v) + print(e) sys.exit(1) else: self.ugops[o[2:]] = val if len(self.args) > 1 and self.outputfile is not None: - print "ERROR: cannot use -o when grabbing multiple files" + print("ERROR: cannot use -o when grabbing multiple files") sys.exit(1) def help(self, args, ret=0): if not args: - print MAINHELP + print(MAINHELP) else: for a in args: m = getattr(self, 'help_'+a, None) @@ -240,20 +240,20 @@ elif a in self.ug_options: self.help_ug_option(a) else: - print 'ERROR: no help on command "%s"' % a + print('ERROR: no help on command "%s"' % a) sys.exit(ret) def help_doc(self): - print __doc__ + print(__doc__) def help_options(self): - width = max(map(len, self.ug_options)) + width = max(list(map(len, self.ug_options))) format = ' %-' + str(width) + 's = %s' hformat = ' %-' + str(width) + 's %s' - print hformat % ('OPTION', 'DEFAULT') - print '-'*(width + 20) + print(hformat % ('OPTION', 'DEFAULT')) + print('-'*(width + 20)) for k in self.ug_options: - print format % (k, self.ug_defaults[k]) + print(format % (k, self.ug_defaults[k])) def help_all(self): for k in self.ug_options: @@ -264,21 +264,21 @@ m = re.search(r'^( '+option+'.*?)\s*^ {,2}\S', urlgrabber.grabber.__doc__, re.M|re.S) if m: - print m.group(1) + print(m.group(1)) else: - print ' %s: no help found for this option' % option - print '' + print(' %s: no help found for this option' % option) + print('') class ugclient: def __init__(self): op = client_options() self.op = op if op.verbose >= 2 and op.ugops: - print "Module Options:" - width = max(map(len, op.ugops.keys())) + print("Module Options:") + width = max(list(map(len, list(op.ugops.keys())))) format = " %-" + str(width) + "s = %s" - for k, v in op.ugops.items(): - print format % (k, repr(v)) + for k, v in list(op.ugops.items()RefactoringTool: Files that were modified: RefactoringTool: urlgrabber ): + print(format % (k, repr(v))) if op.debug: self.set_debug_logger(op.debug) @@ -294,13 +294,13 @@ def run(self): for url in self.op.args: - if self.op.verbose: print 'grabbing: %s' % url + if self.op.verbose: print('grabbing: %s' % url) try: for i in range(0, self.op.repeat): f = self.g.urlgrab(url, self.op.outputfile) - if self.op.localfile: print f - except URLGrabError, e: - print e + if self.op.localfile: print(f) + except URLGrabError as e: + print(e) sys.exit(1) def set_debug_logger(self, dbspec): + mv urlgrabber urlgrabber.py3 + for i in '$(ls)' + sed -i 's|#! /usr/bin/python|#! /usr/bin/python3|' urlgrabber-ext-down + 2to3 -w -n urlgrabber-ext-down RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored urlgrabber-ext-down RefactoringTool: Files that were modified: RefactoringTool: urlgrabber-ext-down --- urlgrabber-ext-down (original) +++ urlgrabber-ext-down (refactored) @@ -25,7 +25,7 @@ def write(fmt, *arg): try: os.write(1, fmt % arg) - except OSError, e: + except OSError as e: if e.args[0] != errno.EPIPE: raise sys.exit(1) @@ -66,7 +66,7 @@ dlsz = fo._tm_last[0] - fo._tm_first[0] dltm = fo._tm_last[1] - fo._tm_first[1] ug_err = 'OK' - except URLGrabError, e: + except URLGrabError as e: size = 0 ug_err = '%d %d %s' % (e.errno, getattr(e, 'code', 0), e.strerror) write('%d %d %d %.3f %s\n', opts._id, size, dlsz, dltm, ug_err) + mv urlgrabber-ext-down urlgrabber-ext-down.py3 + popd ~/RPM/BUILD/urlgrabber-3.10.1 + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python3-module-urlgrabber-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python3-module-urlgrabber-buildroot (binconfig,pkgconfig,libtool,desktop) Compressing files in /usr/src/tmp/python3-module-urlgrabber-buildroot (auto) Adjusting library links in /usr/src/tmp/python3-module-urlgrabber-buildroot ./usr/lib: Verifying ELF objects in /usr/src/tmp/python3-module-urlgrabber-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-urlgrabber-buildroot using /usr/bin/python Bytecompiling python modules with optimization in /usr/src/tmp/python3-module-urlgrabber-buildroot using /usr/bin/python -O Bytecompiling python3 modules in /usr/src/tmp/python3-module-urlgrabber-buildroot using python3 unlink /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/__pycache__/__init__.cpython-35.pyc unlink /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/__pycache__/byterange.cpython-35.pyc unlink /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/__pycache__/grabber.cpython-35.pyc unlink /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/__pycache__/mirror.cpython-35.pyc unlink /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/__pycache__/progress.cpython-35.pyc compile /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/__init__.py compile /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/byterange.py compile /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/grabber.py compile /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/mirror.py compile /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/progress.py Bytecompiling python3 modules with optimization in /usr/src/tmp/python3-module-urlgrabber-buildroot using python3 -O compile /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/__init__.py compile /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/byterange.py compile /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/grabber.py compile /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/mirror.py compile /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/progress.py Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python3-module-urlgrabber-buildroot using python3 -OO compile /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/__init__.py compile /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/byterange.py compile /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/grabber.py compile /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/mirror.py compile /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/progress.py Hardlinking identical .pyc and .opt-?.pyc files './usr/lib/python3/site-packages/urlgrabber/__pycache__/mirror.cpython-35.opt-1.pyc' => './usr/lib/python3/site-packages/urlgrabber/__pycache__/mirror.cpython-35.pyc' './usr/lib/python3/site-packages/urlgrabber/__pycache__/__init__.cpython-35.opt-1.pyc' => './usr/lib/python3/site-packages/urlgrabber/__pycache__/__init__.cpython-35.pyc' Hardlinking identical .pyc and .pyo files Processing files: python3-module-urlgrabber-3.10.1-alt1.git20140204.1 Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.29232 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd urlgrabber-3.10.1 + DOCDIR=/usr/src/tmp/python3-module-urlgrabber-buildroot/usr/share/doc/python3-module-urlgrabber-3.10.1 + export DOCDIR + rm -rf /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/share/doc/python3-module-urlgrabber-3.10.1 + /bin/mkdir -p /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/share/doc/python3-module-urlgrabber-3.10.1 + cp -prL ChangeLog README TODO /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/share/doc/python3-module-urlgrabber-3.10.1 + chmod -R go-w /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/share/doc/python3-module-urlgrabber-3.10.1 + chmod -R a+rX /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/share/doc/python3-module-urlgrabber-3.10.1 + exit 0 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.O87O64 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.EQk2rr find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks) python3.req: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/bin/urlgrabber-ext-down.py3: skipping time python3.req: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/bin/urlgrabber-ext-down.py3: skipping errno python3.req: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/bin/urlgrabber-ext-down.py3: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/bin/urlgrabber-ext-down.py3: line=42 IGNORE (for REQ=slight and deep=8) module=signal python3.req: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/bin/urlgrabber.py3: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/bin/urlgrabber.py3: line=290 IGNORE (for REQ=slight and deep=15) module=urlgrabber /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/bin/urlgrabber.py3: line=309 IGNORE (for REQ=slight and deep=15) module=logging /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/bin/urlgrabber.py3: line=331 IGNORE (for REQ=slight and deep=12) module=profile /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/bin/urlgrabber.py3: line=332 IGNORE (for REQ=slight and deep=12) module=pstats python3.req: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/byterange.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/byterange.py: line=261 IGNORE (for REQ=slight and deep=8) module=urllib /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/byterange.py: line=262 IGNORE (for REQ=slight and deep=8) module=urllib /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/byterange.py: line=264 IGNORE (for REQ=slight and deep=8) module=urllib /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/byterange.py: line=265 IGNORE (for REQ=slight and deep=8) module=urllib /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/byterange.py: line=345 IGNORE (for REQ=slight and deep=8) module=urllib /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/byterange.py: line=347 IGNORE (for REQ=slight and deep=8) module=urllib /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/byterange.py: line=425 IGNORE (for REQ=slight and deep=12) module=re python3.req: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/grabber.py: skipping sys python3.req: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/grabber.py: skipping time /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/grabber.py: line=522 IGNORE (for REQ=slight and deep=8) module=xattr /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/grabber.py: line=539 IGNORE (for REQ=slight and deep=8) module=i18n /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/grabber.py: line=595 IGNORE (for REQ=slight and deep=12) module=logging /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/grabber.py: line=923 IGNORE (for REQ=slight and deep=23) module=libproxy /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/grabber.py: line=2492 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/grabber.py: line=2513 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/grabber.py: line=2519 IGNORE (for REQ=slight and deep=12) module=random python3.req: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/mirror.py: skipping sys python3.req: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/progress.py: skipping sys python3.req: /usr/src/tmp/python3-module-urlgrabber-buildroot/usr/lib/python3/site-packages/urlgrabber/progress.py: skipping time Provides: python3(urlgrabber), python3(urlgrabber.byterange), python3(urlgrabber.grabber), python3(urlgrabber.mirror), python3(urlgrabber.progress), python3.3(urlgrabber), python3.3(urlgrabber.byterange), python3.3(urlgrabber.grabber), python3.3(urlgrabber.mirror), python3.3(urlgrabber.progress) Requires: /usr/bin/python3, /usr/lib/python3/site-packages, python3(collections) < 0, python3(email) < 0, python3(fcntl) < 0, python3(ftplib) < 0, python3(getopt) < 0, python3(io) < 0, python3(math) < 0, python3(mimetypes) < 0, python3(os) < 0, python3(pycurl) < 0, python3(random) < 0, python3(re) < 0, python3(select) < 0, python3(six) < 0, python3(socket) < 0, python3(stat) < 0, python3(string) < 0, python3(struct) < 0, python3(subprocess) < 0, python3(termios) < 0, python3(types) < 0 warning: Installed (but unpackaged) file(s) found: /usr/lib/python3/site-packages/urlgrabber-3.10.1-py3.5.egg-info Wrote: /usr/src/RPM/RPMS/noarch/python3-module-urlgrabber-3.10.1-alt1.git20140204.1.noarch.rpm 8.07user 0.38system 0:16.32elapsed 51%CPU (0avgtext+0avgdata 51988maxresident)k 0inputs+0outputs (0major+171434minor)pagefaults 0swaps 13.32user 2.32system 0:27.81elapsed 56%CPU (0avgtext+0avgdata 122012maxresident)k 80inputs+0outputs (0major+391548minor)pagefaults 0swaps --- python3-module-urlgrabber-3.10.1-alt1.git20140204.1.noarch.rpm.repo 2016-03-16 19:16:51.000000000 +0000 +++ python3-module-urlgrabber-3.10.1-alt1.git20140204.1.noarch.rpm.hasher 2019-04-14 01:19:58.398960413 +0000 @@ -4,10 +4,17 @@ /usr/lib/python3/site-packages/urlgrabber/__pycache__ 40755 -/usr/lib/python3/site-packages/urlgrabber/__pycache__/byterange.cpython-33.pyc 100644 -/usr/lib/python3/site-packages/urlgrabber/__pycache__/byterange.cpython-33.pyo 100644 -/usr/lib/python3/site-packages/urlgrabber/__pycache__/grabber.cpython-33.pyc 100644 -/usr/lib/python3/site-packages/urlgrabber/__pycache__/grabber.cpython-33.pyo 100644 -/usr/lib/python3/site-packages/urlgrabber/__pycache__/mirror.cpython-33.pyc 100644 -/usr/lib/python3/site-packages/urlgrabber/__pycache__/mirror.cpython-33.pyo 100644 -/usr/lib/python3/site-packages/urlgrabber/__pycache__/progress.cpython-33.pyc 100644 -/usr/lib/python3/site-packages/urlgrabber/__pycache__/progress.cpython-33.pyo 100644 +/usr/lib/python3/site-packages/urlgrabber/__pycache__/__init__.cpython-35.opt-1.pyc 100644 +/usr/lib/python3/site-packages/urlgrabber/__pycache__/__init__.cpython-35.opt-2.pyc 100644 +/usr/lib/python3/site-packages/urlgrabber/__pycache__/__init__.cpython-35.pyc 100644 +/usr/lib/python3/site-packages/urlgrabber/__pycache__/byterange.cpython-35.opt-1.pyc 100644 +/usr/lib/python3/site-packages/urlgrabber/__pycache__/byterange.cpython-35.opt-2.pyc 100644 +/usr/lib/python3/site-packages/urlgrabber/__pycache__/byterange.cpython-35.pyc 100644 +/usr/lib/python3/site-packages/urlgrabber/__pycache__/grabber.cpython-35.opt-1.pyc 100644 +/usr/lib/python3/site-packages/urlgrabber/__pycache__/grabber.cpython-35.opt-2.pyc 100644 +/usr/lib/python3/site-packages/urlgrabber/__pycache__/grabber.cpython-35.pyc 100644 +/usr/lib/python3/site-packages/urlgrabber/__pycache__/mirror.cpython-35.opt-1.pyc 100644 +/usr/lib/python3/site-packages/urlgrabber/__pycache__/mirror.cpython-35.opt-2.pyc 100644 +/usr/lib/python3/site-packages/urlgrabber/__pycache__/mirror.cpython-35.pyc 100644 +/usr/lib/python3/site-packages/urlgrabber/__pycache__/progress.cpython-35.opt-1.pyc 100644 +/usr/lib/python3/site-packages/urlgrabber/__pycache__/progress.cpython-35.opt-2.pyc 100644 +/usr/lib/python3/site-packages/urlgrabber/__pycache__/progress.cpython-35.pyc 100644 /usr/lib/python3/site-packages/urlgrabber/byterange.py 100644 @@ -26,24 +33,23 @@ Requires: /usr/lib/python3/site-packages -Requires: python3.3(collections) -Requires: python3.3(email) -Requires: python3.3(fcntl) -Requires: python3.3(ftplib) -Requires: python3.3(getopt) -Requires: python3.3(io) -Requires: python3.3(math) -Requires: python3.3(mimetypes) -Requires: python3.3(os) -Requires: python3.3(pycurl) -Requires: python3.3(random) -Requires: python3.3(re) -Requires: python3.3(select) -Requires: python3.3(six) -Requires: python3.3(socket) -Requires: python3.3(stat) -Requires: python3.3(string) -Requires: python3.3(struct) -Requires: python3.3(subprocess) -Requires: python3.3(termios) -Requires: python3.3(time) -Requires: python3.3(types) +Requires: python3(collections) < 0 +Requires: python3(email) < 0 +Requires: python3(fcntl) < 0 +Requires: python3(ftplib) < 0 +Requires: python3(getopt) < 0 +Requires: python3(io) < 0 +Requires: python3(math) < 0 +Requires: python3(mimetypes) < 0 +Requires: python3(os) < 0 +Requires: python3(pycurl) < 0 +Requires: python3(random) < 0 +Requires: python3(re) < 0 +Requires: python3(select) < 0 +Requires: python3(six) < 0 +Requires: python3(socket) < 0 +Requires: python3(stat) < 0 +Requires: python3(string) < 0 +Requires: python3(struct) < 0 +Requires: python3(subprocess) < 0 +Requires: python3(termios) < 0 +Requires: python3(types) < 0 Requires: rpmlib(PayloadIsLzma)