<86>Apr 10 07:55:30 userdel[18982]: delete user 'rooter' <86>Apr 10 07:55:30 userdel[18982]: removed group 'rooter' owned by 'rooter' <86>Apr 10 07:55:30 userdel[18982]: removed shadow group 'rooter' owned by 'rooter' <86>Apr 10 07:55:30 groupadd[18987]: group added to /etc/group: name=rooter, GID=678 <86>Apr 10 07:55:30 groupadd[18987]: group added to /etc/gshadow: name=rooter <86>Apr 10 07:55:30 groupadd[18987]: new group: name=rooter, GID=678 <86>Apr 10 07:55:30 useradd[18991]: new user: name=rooter, UID=678, GID=678, home=/root, shell=/bin/bash <86>Apr 10 07:55:30 userdel[18997]: delete user 'builder' <86>Apr 10 07:55:30 userdel[18997]: removed group 'builder' owned by 'builder' <86>Apr 10 07:55:30 userdel[18997]: removed shadow group 'builder' owned by 'builder' <86>Apr 10 07:55:30 groupadd[19002]: group added to /etc/group: name=builder, GID=679 <86>Apr 10 07:55:30 groupadd[19002]: group added to /etc/gshadow: name=builder <86>Apr 10 07:55:30 groupadd[19002]: new group: name=builder, GID=679 <86>Apr 10 07:55:30 useradd[19006]: new user: name=builder, UID=679, GID=679, home=/usr/src, shell=/bin/bash <13>Apr 10 07:55:32 rpmi: libgdbm-1.8.3-alt10 1454943313 installed <13>Apr 10 07:55:32 rpmi: libexpat-2.4.3-alt1 p9+293696.100.1.1 1643124786 installed <13>Apr 10 07:55:32 rpmi: libp11-kit-0.23.15-alt2 p9+254920.2400.19.1 1601385869 installed <13>Apr 10 07:55:32 rpmi: libtasn1-4.14-alt1 p9+235792.100.2.1 1565425233 installed <13>Apr 10 07:55:32 rpmi: rpm-macros-alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Apr 10 07:55:32 rpmi: alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Apr 10 07:55:32 rpmi: ca-certificates-2021.10.06-alt1 p9+289862.100.1.1 1637033643 installed <13>Apr 10 07:55:32 rpmi: ca-trust-0.1.2-alt1 p9+233349.100.1.1 1561655062 installed <13>Apr 10 07:55:32 rpmi: p11-kit-trust-0.23.15-alt2 p9+254920.2400.19.1 1601385869 installed <13>Apr 10 07:55:32 rpmi: libcrypto1.1-1.1.1n-alt2 p9+297595.100.1.1 1648753395 installed <13>Apr 10 07:55:32 rpmi: libssl1.1-1.1.1n-alt2 p9+297595.100.1.1 1648753395 installed <13>Apr 10 07:55:32 rpmi: python3-3.7.11-alt1 p9+273501.10.37.1 1629720188 installed <13>Apr 10 07:55:32 rpmi: libpython3-3.7.11-alt1 p9+273501.10.37.1 1629720188 installed <13>Apr 10 07:55:33 rpmi: python3-base-3.7.11-alt1 p9+273501.10.37.1 1629720188 installed <13>Apr 10 07:55:33 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>Apr 10 07:55:33 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>Apr 10 07:55:35 rpmi: python3-module-pkg_resources-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>Apr 10 07:55:35 rpmi: python-modules-curses-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Apr 10 07:55:35 rpmi: libtinfo-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686221 installed <13>Apr 10 07:55:35 rpmi: libncurses-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686221 installed <13>Apr 10 07:55:35 rpmi: python3-dev-3.7.11-alt1 p9+273501.10.37.1 1629720188 installed <13>Apr 10 07:55:35 rpmi: libverto-0.3.0-alt1_7 sisyphus+225932.100.1.1 1553994917 installed <13>Apr 10 07:55:35 rpmi: libkeyutils-1.6-alt2 sisyphus+226520.100.2.1 1554512088 installed <13>Apr 10 07:55:35 rpmi: libcom_err-1.44.6-alt1 sisyphus+224154.100.1.1 1552091653 installed <86>Apr 10 07:55:35 groupadd[20768]: group added to /etc/group: name=_keytab, GID=499 <86>Apr 10 07:55:35 groupadd[20768]: group added to /etc/gshadow: name=_keytab <86>Apr 10 07:55:35 groupadd[20768]: new group: name=_keytab, GID=499 <13>Apr 10 07:55:35 rpmi: libkrb5-1.17.2-alt3 p9+296674.100.1.1 1647341120 installed <13>Apr 10 07:55:35 rpmi: libtirpc-1.0.3-alt1 1532008015 installed <13>Apr 10 07:55:35 rpmi: libnsl2-1.1.0-alt1_1 1511548748 installed <13>Apr 10 07:55:35 rpmi: python-modules-compiler-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Apr 10 07:55:35 rpmi: python-modules-email-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Apr 10 07:55:35 rpmi: python-modules-unittest-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Apr 10 07:55:35 rpmi: python-modules-encodings-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Apr 10 07:55:35 rpmi: python-modules-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Apr 10 07:55:35 rpmi: python-modules-nis-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Apr 10 07:55:35 rpmi: python-modules-ctypes-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Apr 10 07:55:35 rpmi: python-modules-multiprocessing-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Apr 10 07:55:35 rpmi: python-modules-logging-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Apr 10 07:55:35 rpmi: python-tools-2to3-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Apr 10 07:55:35 rpmi: python-modules-xml-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Apr 10 07:55:35 rpmi: python-modules-hotshot-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Apr 10 07:55:35 rpmi: python-modules-bsddb-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Apr 10 07:55:35 rpmi: python-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Apr 10 07:55:35 rpmi: python-modules-distutils-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Apr 10 07:55:35 rpmi: python-module-pkg_resources-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>Apr 10 07:55:35 rpmi: libnsl2-devel-1.1.0-alt1_1 1511548748 installed <13>Apr 10 07:55:35 rpmi: python-dev-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Apr 10 07:55:35 rpmi: python-module-setuptools-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>Apr 10 07:55:35 rpmi: python3-module-setuptools-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed Building target platforms: x86_64 Building for target x86_64 Wrote: /usr/src/in/nosrpm/python-module-mechanize-0.2.5-alt1.1.1.2.nosrc.rpm (w1.gzdio) Installing python-module-mechanize-0.2.5-alt1.1.1.2.src.rpm Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.85119 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf mechanize-0.2.5 + echo 'Source #0 (mechanize-0.2.5.tar):' Source #0 (mechanize-0.2.5.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/mechanize-0.2.5.tar + cd mechanize-0.2.5 + /bin/chmod -c -Rf u+rwX,go-w . + cp -fR . ../python3 + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/mechanize-0.2.5 + echo 'Patch #0 (mechanize-0.2.5-alt-python3.patch):' Patch #0 (mechanize-0.2.5-alt-python3.patch): + /usr/bin/patch -p2 patching file mechanize/_http.py patching file mechanize/_response.py patching file mechanize/_urllib2_fork.py patching file test/test_browser.py patching file test/test_cookies.py patching file test/test_urllib2.py patching file test/test_urllib2_localnet.py + popd ~/RPM/BUILD/mechanize-0.2.5 + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.85119 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd mechanize-0.2.5 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export FFLAGS + /usr/bin/python2.7 setup.py build running build running build_py creating build creating build/lib creating build/lib/mechanize copying mechanize/_version.py -> build/lib/mechanize copying mechanize/_util.py -> build/lib/mechanize copying mechanize/_useragent.py -> build/lib/mechanize copying mechanize/_urllib2_fork.py -> build/lib/mechanize copying mechanize/_urllib2.py -> build/lib/mechanize copying mechanize/_testcase.py -> build/lib/mechanize copying mechanize/_sockettimeout.py -> build/lib/mechanize copying mechanize/_sgmllib_copy.py -> build/lib/mechanize copying mechanize/_rfc3986.py -> build/lib/mechanize copying mechanize/_response.py -> build/lib/mechanize copying mechanize/_request.py -> build/lib/mechanize copying mechanize/_pullparser.py -> build/lib/mechanize copying mechanize/_opener.py -> build/lib/mechanize copying mechanize/_msiecookiejar.py -> build/lib/mechanize copying mechanize/_mozillacookiejar.py -> build/lib/mechanize copying mechanize/_mechanize.py -> build/lib/mechanize copying mechanize/_markupbase.py -> build/lib/mechanize copying mechanize/_lwpcookiejar.py -> build/lib/mechanize copying mechanize/_http.py -> build/lib/mechanize copying mechanize/_html.py -> build/lib/mechanize copying mechanize/_headersutil.py -> build/lib/mechanize copying mechanize/_gzip.py -> build/lib/mechanize copying mechanize/_form.py -> build/lib/mechanize copying mechanize/_firefox3cookiejar.py -> build/lib/mechanize copying mechanize/_debug.py -> build/lib/mechanize copying mechanize/_clientcookie.py -> build/lib/mechanize copying mechanize/_beautifulsoup.py -> build/lib/mechanize copying mechanize/_auth.py -> build/lib/mechanize copying mechanize/__init__.py -> build/lib/mechanize + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/mechanize-0.2.5 + 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 ./test/test_urllib2_localnet.py --- ./test/test_urllib2_localnet.py (original) +++ ./test/test_urllib2_localnet.py (refactored) @@ -4,9 +4,9 @@ import email.message import threading -import urlparse +import urllib.parse import mechanize -import BaseHTTPServer +import http.server import unittest from mechanize._testcase import TestCase @@ -17,13 +17,13 @@ # Loopback http server infrastructure -class LoopbackHttpServer(BaseHTTPServer.HTTPServer): +class LoopbackHttpServer(http.server.HTTPServer): """HTTP server w/ a few modifications that make it useful for loopback testing purposes. """ def __init__(self, server_address, RequestHandlerClass): - BaseHTTPServer.HTTPServer.__init__(self, + http.server.HTTPServer.__init__(self, server_address, RequestHandlerClass) @@ -168,13 +168,13 @@ if len(self._users) == 0: return True - if not request_handler.headers.has_key('Proxy-Authorization'): + if 'Proxy-Authorization' not in request_handler.headers: return self._return_auth_challenge(request_handler) else: auth_dict = self._create_auth_dict( request_handler.headers['Proxy-Authorization'] ) - if self._users.has_key(auth_dict["username"]): + if auth_dict["username"] in self._users: password = self._users[ auth_dict["username"] ] else: return self._return_auth_challenge(request_handler) @@ -201,7 +201,7 @@ # Proxy test infrastructure -class FakeProxyHandler(BaseHTTPServer.BaseHTTPRequestHandler): +class FakeProxyHandler(http.server.BaseHTTPRequestHandler): """This is a 'fake proxy' that makes it look like the entire internet has gone down due to a sudden zombie invasion. It main utility is in providing us with authentication support for @@ -214,7 +214,7 @@ # This has to be set before calling our parent's __init__(), which will # try to call do_GET(). self.digest_auth_handler = digest_auth_handler - BaseHTTPServer.BaseHTTPRequestHandler.__init__(self, *args, **kwargs) + http.server.BaseHTTPRequestHandler.__init__(self, *args, **kwargs) def log_message(self, format, *args): # Uncomment the next line for debugging. @@ -222,7 +222,7 @@ pass def do_GET(self): - (scm, netloc, path, params, query, fragment) = urlparse.urlparse( + (scm, netloc, path, params, query, fragment) = urllib.parse.urlparse( self.path, 'http') self.short_path = path if self.digest_auth_handler.handle_request(self): @@ -310,7 +310,7 @@ result.close() -class RecordingHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): +class RecordingHTTPRequestHandler(http.server.BaseHTTPRequestHandler): server_version = "TestHTTP/" protocol_version = "HTTP/1.0" @@ -322,7 +322,7 @@ self._get_next_response = get_next_response self._record_request = record_request self._record_received_headers = record_received_headers - BaseHTTPServer.BaseHTTPRequestHandler.__init__(self, *args, **kwds) + http.server.BaseHTTPRequestHandler.__init__(self, *args, **kwds) def do_GET(self): body = self.send_head() @@ -416,8 +416,8 @@ data = f.read() f.close() - self.assertEquals(data, expected_response) - self.assertEquals(handler.requests, ['/', '/somewhere_else']) + self.assertEqual(data, expected_response) + self.assertEqual(handler.requests, ['/', '/somewhere_else']) def test_404(self): expected_response = 'Bad bad bad...' @@ -425,7 +425,7 @@ try: mechanize.urlopen('http://localhost:%s/weeble' % handler.port) - except mechanize.URLError, f: + except mechanize.URLError as f: pass else: self.fail('404 should raise URLError') @@ -433,8 +433,8 @@ data = f.rRefactoringTool: Refactored ./test/test_urllib2.py ead() f.close() - self.assertEquals(data, expected_response) - self.assertEquals(handler.requests, ['/weeble']) + self.assertEqual(data, expected_response) + self.assertEqual(handler.requests, ['/weeble']) def test_200(self): expected_response = 'pycon 2008...' @@ -444,8 +444,8 @@ data = f.read() f.close() - self.assertEquals(data, expected_response) - self.assertEquals(handler.requests, ['/bizarre']) + self.assertEqual(data, expected_response) + self.assertEqual(handler.requests, ['/bizarre']) def test_200_with_parameters(self): expected_response = 'pycon 2008...' @@ -456,8 +456,8 @@ data = f.read() f.close() - self.assertEquals(data, expected_response) - self.assertEquals(handler.requests, ['/bizarre', 'get=with_feeling']) + self.assertEqual(data, expected_response) + self.assertEqual(handler.requests, ['/bizarre', 'get=with_feeling']) def test_sending_headers(self): handler = self._make_request_handler([(200, [], "we don't care")]) --- ./test/test_urllib2.py (original) +++ ./test/test_urllib2.py (refactored) @@ -10,8 +10,8 @@ # CacheFTPHandler (hard to write) # parse_keqv_list, parse_http_list -import StringIO -import httplib +import io +import http.client import os import sys import unittest @@ -76,7 +76,7 @@ ('a, b, "c", "d", "e,f", g, h', ['a', 'b', '"c"', '"d"', '"e,f"', 'g', 'h']), ('a="b\\"c", d="e\\,f", g="h\\\\i"', ['a="b"c"', 'd="e,f"', 'g="h\\i"'])] for string, list in tests: - self.assertEquals(mechanize._urllib2_fork.parse_http_list(string), + self.assertEqual(mechanize._urllib2_fork.parse_http_list(string), list) @@ -275,15 +275,15 @@ """ f = [] - for kv in mapping.items(): + for kv in list(mapping.items()): f.append("%s: %s" % kv) f.append("") - msg = httplib.HTTPMessage(StringIO.StringIO("\r\n".join(f))) + msg = http.client.HTTPMessage(io.StringIO("\r\n".join(f))) return msg -class MockResponse(StringIO.StringIO): +class MockResponse(io.StringIO): def __init__(self, code, msg, headers, data, url=None): - StringIO.StringIO.__init__(self, data) + io.StringIO.__init__(self, data) self.code, self.msg, self.headers, self.url = code, msg, headers, url def info(self): return self.headers @@ -400,7 +400,7 @@ self.requests = [] def http_open(self, req): import email.message, copy - from StringIO import StringIO + from io import StringIO self.requests.append(copy.deepcopy(req)) if self._count == 0: self._count = self._count + 1 @@ -507,7 +507,7 @@ o.add_handler(p) o._maybe_reindex_handlers() self.assertEqual(o.handle_open, {"http": [h]}) - self.assertEqual(len(o.process_response.keys()), 1) + self.assertEqual(len(list(o.process_response.keys())), 1) self.assertEqual(list(o.process_response["http"]), [p]) self.assertEqual(list(o._any_response), [p]) self.assertEqual(o.handlers, [h, p]) @@ -650,23 +650,23 @@ enumerate(zip(o.calls, calls))): if i < 2: # *_request - self.assert_((handler, name) == calls) - self.assert_(len(args) == 1) - self.assert_(isinstance(args[0], Request)) + self.assertTrue((handler, name) == calls) + self.assertTrue(len(args) == 1) + self.assertTrue(isinstance(args[0], Request)) else: # *_response - self.assert_((handler, name) == calls) - self.assert_(len(args) == 2) - self.assert_(isinstance(args[0], Request)) + self.assertTrue((handler, name) == calls) + self.assertTrue(len(args) == 2) + self.assertTrue(isinstance(args[0], Request)) # response from opener.open is None, because there's no # handler that defines http_open to handle it - self.assert_(args[1] is None or + self.assertTrue(args[1] is None or isinstance(args[1], MockResponse)) def sanepathname2url(path): - import urllib - urlpath = urllib.pathname2url(path) + import urllib.request, urllib.parse, urllib.error + urlpath = urllib.request.pathname2url(path) if os.name == "nt" and urlpath.startswith("///"): urlpath = urlpath[2:] # XXX don't ask me about the mac... @@ -712,7 +712,7 @@ def __init__(self, data): self.data = data def retrfile(self, filename, filetype): self.filename, self.filetype = filename, filetype - return StringIO.StringIO(self.data), len(self.data) + return io.StringIO(self.data), len(self.data) class NullFTPHandler(mechanize.FTPHandler): def __init__(self, data): self.data = data @@ -751,7 +751,7 @@ self.assertEqual(h.port, port) self.assertEqual(h.dirs, dirs) if sys.version_info >= (2, 6): - self.assertEquals(h.timeout, timeout) + self.assertEqual(h.timeout, timeout) self.assertEqual(h.ftpwrapper.filename, filename) self.assertEqual(h.ftpwrapper.filetype, type_) headers = r.info() @@ -851,7 +851,7 @@ def request(self, method, url, body=None, headers={}): self.method = method self.selector = url - self.req_headers += headers.items() + self.req_headers += list(headers.items()) self.req_headers.sort() if body: self.data = body @@ -980,17 +980,17 @@ req = Request(url) r = MockResponse(200, "OK", {}, "", url) newr = h.http_response(req, r) - self.assert_(r is newr) - self.assert_(h.referer == url) + self.assertTrue(r is newr) + self.assertTrue(h.referer == url) newreq = h.http_request(req) - self.assert_(req is newreq) - self.assert_(req.unredirected_hdrs["Referer"] == url) + self.assertTrue(req is newreq) + self.assertTrue(req.unredirected_hdrs["Referer"] == url) # don't clobber existing Referer ref = "http://set.by.user.com/" req.add_unredirected_header("Referer", ref) newreq = h.http_request(req) - self.assert_(req is newreq) - self.assert_(req.unredirected_hdrs["Referer"] == ref) + self.assertTrue(req is newreq) + self.assertTrue(req.unredirected_hdrs["Referer"] == ref) def test_raise_http_errors(self): # HTTPDefaultErrorHandler should raise HTTPError if no error handler @@ -1006,11 +1006,11 @@ try: h.http_error_default( request, response, code, msg, response.info()) - except mechanize.HTTPError, exc: - self.assert_(exc is not response) - self.assert_(exc.fp is response) + except mechanize.HTTPError as exc: + self.assertTrue(exc is not response) + self.assertTrue(exc.fp is response) else: - self.assert_(False) + self.assertTrue(False) # case 2. response object is already an HTTPError, so just re-raise it error = mechanize.HTTPError( @@ -1018,10 +1018,10 @@ try: h.http_error_default( request, error, code, msg, error.info()) - except mechanize.HTTPError, exc: - self.assert_(exc is error) + except mechanize.HTTPError as exc: + self.assertTrue(exc is error) else: - self.assert_(False) + self.assertTrue(False) def test_robots(self): # XXX useragent @@ -1036,7 +1036,7 @@ # first time: initialise anRefactoringTool: Refactored ./test/test_cookies.py d set up robots.txt parser before checking # whether OK to fetch URL h.http_request(req) - self.assertEquals(rfpc.calls, [ + self.assertEqual(rfpc.calls, [ "__call__", ("set_opener", opener), ("set_url", "http://example.com:80/robots.txt"), @@ -1048,7 +1048,7 @@ rfpc.clear() req = Request(url) h.http_request(req) - self.assert_(rfpc.calls == [ + self.assertTrue(rfpc.calls == [ ("can_fetch", "", url), ]) # different URL on same server: same again @@ -1056,7 +1056,7 @@ url = "http://example.com:80/blah.html" req = Request(url) h.http_request(req) - self.assert_(rfpc.calls == [ + self.assertTrue(rfpc.calls == [ ("can_fetch", "", url), ]) # disallowed URL @@ -1066,9 +1066,9 @@ req = Request(url) try: h.http_request(req) - except mechanize.HTTPError, e: - self.assert_(e.request == req) - self.assert_(e.code == 403) + except mechanize.HTTPError as e: + self.assertTrue(e.request == req) + self.assertTrue(e.code == 403) # new host: reload robots.txt (even though the host and port are # unchanged, we treat this as a new host because # "example.com" != "example.com:80") @@ -1077,7 +1077,7 @@ url = "http://example.com/rhubarb.html" req = Request(url) h.http_request(req) - self.assertEquals(rfpc.calls, [ + self.assertEqual(rfpc.calls, [ "__call__", ("set_opener", opener), ("set_url", "http://example.com/robots.txt"), @@ -1090,7 +1090,7 @@ url = "https://example.org/rhubarb.html" req = Request(url) h.http_request(req) - self.assertEquals(rfpc.calls, [ + self.assertEqual(rfpc.calls, [ "__call__", ("set_opener", opener), ("set_url", "https://example.org/robots.txt"), @@ -1103,7 +1103,7 @@ url = "ftp://example.com/" req = Request(url) h.http_request(req) - self.assert_(rfpc.calls == []) + self.assertTrue(rfpc.calls == []) def test_redirected_robots_txt(self): # redirected robots.txt fetch shouldn't result in another attempted @@ -1117,8 +1117,8 @@ def __init__(self): self.requests = [] def http_open(self, req): - import email.message, httplib, copy - from StringIO import StringIO + import email.message, http.client, copy + from io import StringIO self.requests.append(copy.deepcopy(req)) if req.get_full_url() == "http://example.com/robots.txt": hdr = "Location: http://example.com/en/robots.txt\r\n\r\n" @@ -1149,7 +1149,7 @@ r = MockResponse(200, "OK", {}, "") newreq = h.http_request(req) self.assertTrue(cj.ach_req is req is newreq) - self.assertEquals(req.get_origin_req_host(), "example.com") + self.assertEqual(req.get_origin_req_host(), "example.com") self.assertFalse(cj.ach_u) newr = h.http_response(req, r) self.assertTrue(cj.ec_req is req) @@ -1346,7 +1346,7 @@ HTTPCookieProcessor, HTTPError, HTTPDefaultErrorHandler, \ HTTPRedirectHandler - from test_cookies import interact_netscape + from .test_cookies import interact_netscape cj = CookieJar() interact_netscape(cj, "http://www.example.com/", "spam=eggs") @@ -1569,7 +1569,7 @@ []) ] for html, result in htmls: - self.assertEqual(parse_head(StringIO.StringIO(html), HeadParser()), result) + self.assertEqual(parse_head(io.StringIO(html), HeadParser()), result) --- ./test/test_cookies.py (original) +++ ./test/test_cookies.py (refactored) @@ -1,6 +1,6 @@ """Tests for _clientcookie.""" -import StringIO +import io import errno import inspect import email.message @@ -22,7 +22,7 @@ """ headers: list of RFC822-style 'Key: value' strings """ - f = StringIO.StringIO("\n".join(headers)) + f = io.StringIO("\n".join(headers)) self._headers = email.message.Message(f) self._url = url def info(self): return self._headers @@ -55,7 +55,7 @@ for fn in self._tempfiles: try: os.remove(fn) - except IOError, exc: + except IOError as exc: if exc.errno != errno.ENOENT: raise @@ -114,8 +114,8 @@ jar.add_cookie_header(request) expect_called = attribute_names(MockRequest) - set( ["port", "get_header", "header_items", "log_called"]) - self.assertEquals(request.called, expect_called) - self.assertEquals(request.added_headers, [("Cookie", "foo=bar")]) + self.assertEqual(request.called, expect_called) + self.assertEqual(request.added_headers, [("Cookie", "foo=bar")]) def test_extract_cookies(self): from mechanize import CookieJar @@ -151,8 +151,8 @@ jar.extract_cookies(response, request) expect_called = attribute_names(StubRequest) - set( ["port", "log_called"]) - self.assertEquals(request.called, expect_called) - self.assertEquals([(cookie.name, cookie.value) for cookie in jar], + self.assertEqual(request.called, expect_called) + self.assertEqual([(cookie.name, cookie.value) for cookie in jar], [("foo", "bar")]) def test_unverifiable(self): @@ -171,14 +171,14 @@ raise AttributeError(name) request = StubRequest(dict(is_unverifiable=lambda: False)) - self.assertEquals(request_is_unverifiable(request), False) + self.assertEqual(request_is_unverifiable(request), False) request = StubRequest(dict(is_unverifiable=lambda: False, unverifiable=True)) - self.assertEquals(request_is_unverifiable(request), False) + self.assertEqual(request_is_unverifiable(request), False) request = StubRequest(dict(unverifiable=False)) - self.assertEquals(request_is_unverifiable(request), False) + self.assertEqual(request_is_unverifiable(request), False) class CookieTests(unittest.TestCase): @@ -233,7 +233,7 @@ policy = mechanize.DefaultCookiePolicy() jar = mechanize.CookieJar() jar.set_policy(policy) - self.assertEquals(jar.get_policy(), policy) + self.assertEqual(jar.get_policy(), policy) def test_make_cookies_doesnt_change_jar_state(self): from mechanize import CookieJar, Request, Cookie @@ -252,12 +252,12 @@ jar = CookieJar() jar._policy._now = jar._now = int(time.time()) jar.set_cookie(cookie) - self.assertEquals(len(jar), 1) + self.assertEqual(len(jar), 1) set_cookie = "spam=eggs; expires=%s" % time2netscape(time.time()- 1000) url = "http://example.com/" response = test_response(url=url, headers=[("Set-Cookie", set_cookie)]) jar.make_cookies(response, Request(url)) - self.assertEquals(len(jar), 1) + self.assertEqual(len(jar), 1) def test_domain_return_ok(self): # test optimization: .domain_return_ok() should filter out most @@ -287,8 +287,8 @@ ]: request = mechanize.Request(url) r = pol.domain_return_ok(domain, request) - if ok: self.assert_(r) - else: self.assert_(not r) + if ok: self.assertTrue(r) + else: self.assertTrue(not r) def test_missing_name(self): from mechanize import MozillaCookieJar, lwp_cookie_str @@ -336,7 +336,7 @@ c = CookieJar(policy) interact_netscape(c, "http://www.example.com/", "ni=ni; Version=1") cookie = c._cookies["www.example.com"]["/"]["ni"] - self.assert_(cookie.rfc2109) + self.assertTrue(cookie.rfc2109) self.assertEqual(cookie.version, version) def test_ns_parser(self): @@ -387,8 +387,8 @@ interact_netscape(c, "http://www.acme.com/", 'version=eggs; spam=eggs') cookies = c._cookies["www.acme.com"]["/"] - self.assert_(cookies.has_key('expires')) - self.assert_(cookies.has_key('version')) + self.assertTrue('expires' in cookies) + self.assertTrue('version' in cookies) def test_expires(self): from mechanize._util import time2netscape @@ -439,39 +439,39 @@ c = CookieJar(pol) interact_2965(c, "http://www.acme.com/", 'spam="bar"; Version="1"') - assert c._cookies["www.acme.com"].has_key("/") + assert "/" in c._cookies["www.acme.com"] c = CookieJar(pol) interact_2965(c, "http://www.acme.com/blah", 'eggs="bar"; Version="1"') - assert c._cookies["www.acme.com"].has_key("/") + assert "/" in c._cookies["www.acme.com"] c = CookieJar(pol) interact_2965(c, "http://www.acme.com/blah/rhubarb", 'eggs="bar"; Version="1"') - assert c._cookies["www.acme.com"].has_key("/blah/") + assert "/blah/" in c._cookies["www.acme.com"] c = CookieJar(pol) interact_2965(c, "http://www.acme.com/blah/rhubarb/", 'eggs="bar"; Version="1"') - assert c._cookies["www.acme.com"].has_key("/blah/rhubarb/") + assert "/blah/rhubarb/" in c._cookies["www.acme.com"] # Netscape c = CookieJar() interact_netscape(c, "http://www.acme.com/", 'spam="bar"') - assert c._cookies["www.acme.com"].has_key("/") + assert "/" in c._cookies["www.acme.com"] c = CookieJar() interact_netscape(c, "http://www.acme.com/blah", 'eggs="bar"') - assert c._cookies["www.acme.com"].has_key("/") + assert "/" in c._cookies["www.acme.com"] c = CookieJar() interact_netscape(c, "http://www.acme.com/blah/rhubarb", 'eggs="bar"') - assert c._cookies["www.acme.com"].has_key("/blah") + assert "/blah" in c._cookies["www.acme.com"] c = CookieJar() interact_netscape(c, "http://www.acme.com/blah/rhubarb/", 'eggs="bar"') - assert c._cookies["www.acme.com"].has_key("/blah/rhubarb") + assert "/blah/rhubarb" in c._cookies["www.acme.com"] def test_default_path_with_query(self): cj = mechanize.CookieJar() @@ -502,25 +502,25 @@ ("/foo\031/bar", "/foo%19/bar"), ("/\175foo/bar", "/%7Dfoo/bar"), # unicode - (u"/foo/bar\uabcd", "/foo/bar%EA%AF%8D"), # UTF-8 encoded + ("/foo/bar\uabcd", "/foo/bar%EA%AF%8D"), # UTF-8 encoded ] for arg, result in cases: - self.assert_(escape_path(arg) == result) + self.assertTrue(escape_path(arg) == result) def test_request_path(self): from mechanize._clientcookie import request_path # with parameters req = Request("http://www.example.com/rheum/rhaponticum;" "foo=bar;sing=song?apples=pears&spam=eggs#ni") - self.assertEquals(request_path(req), + self.assertEqual(request_path(req), "/rheum/rhaponticum;foo=bar;sing=song") # without parameters req = Request("http://www.example.com/rheum/rhaponticum?" "apples=pears&spam=eggs#ni") - self.assertEquals(request_path(req), "/rheum/rhaponticum") + self.assertEqual(request_path(req), "/rheum/rhaponticum") # missing final slash req = Request("http://www.example.com") - self.assert_(request_path(req) == "/") + self.assertTrue(request_path(req) == "/") def test_request_port(self): from mechanize._clientcookie import request_port, DEFAULT_HTTP_PORT @@ -558,10 +558,10 @@ def test_effective_request_host(self): from mechanize import effective_request_host - self.assertEquals( + self.assertEqual( effective_request_host(Request("http://www.EXAMPLE.com/spam")), "www.EXAMPLE.com") - self.assertEquals( + self.assertEqual( effective_request_host(Request("http://bob/spam")), "bob.local") @@ -646,11 +646,11 @@ interact_netscape(cj, "http://example.co.uk/", 'no=problemo') interact_netscape(cj, "http://example.co.uk/", 'okey=dokey; Domain=.example.co.uk') - self.assertEquals(len(cj), 2) + self.assertEqual(len(cj), 2) for pseudo_tld in [".co.uk", ".org.za", ".tx.us", ".name.us"]: interact_netscape(cj, "http://example.%s/" % pseudo_tld, 'spam=eggs; Domain=.co.uk') - self.assertEquals(len(cj), 2) + self.assertEqual(len(cj), 2) # XXXX This should be compared with the Konqueror (kcookiejar.cpp) and # Mozilla implementations. @@ -1065,11 +1065,11 @@ interact_netscape(cj, "http://example.com/", "short=path") interact_netscape(cj, "http://example.com/longer/path", "longer=path") for_short_path = cj.cookies_for_request(Request("http://example.com/")) - self.assertEquals([cookie.name for cookie in for_short_path], + self.assertEqual([cookie.name for cookie in for_short_path], ["short"]) for_long_path = cj.cookies_for_request(Request( "http://example.com/longer/path")) - self.assertEquals([cookie.name for cookie in for_long_path], + self.assertEqual([cookie.name for cookie in for_long_path], ["longer", "short"]) @@ -1110,11 +1110,11 @@ return cj cj = create_cookiejar() self._interact(cj) - self.assertEquals(len(cj), 6) + self.assertEqual(len(cj), 6) cj.close() cj = create_cookiejar() - self.assert_("name='foo1', value='bar'" in repr(cj)) - self.assertEquals(len(cj), 4) + self.assertTrue("name='foo1', value='bar'" in repr(cj)) + self.assertEqual(len(cj), 4) def test_firefox3_cookiejar_iteration(self): try: @@ -1133,7 +1133,7 @@ cj.connect() self._interact(cj) summary = "\n".join([str(cookie) for cookie in cj]) - self.assertEquals(summary, + self.assertEqual(summary, """\ <Cookie foo2=bar for www.acme.com:80/> <Cookie foo3=bar for www.acme.com/> @@ -1160,7 +1160,7 @@ self._interact(cj) cj.clear("www.acme.com", "/", "foo2") def summary(): return "\n".join([str(cookie) for cookie in cj]) - self.assertEquals(summary(), + self.assertEqual(summary(), """\ <Cookie foo3=bar for www.acme.com/> <Cookie foo1=bar for www.acme.com/> @@ -1168,7 +1168,7 @@ <Cookie foob=bar for .foo.com/> <Cookie fooc=bar for .www.foo.com/>""") cj.clear("www.acme.com") - self.assertEquals(summary(), + self.assertEqual(summary(), """\ <Cookie fooa=bar for www.foo.com/> <Cookie foob=bar for .foo.com/> @@ -1200,11 +1200,11 @@ interact_netscape(cj, "http://www.foo.com/", "foob=bar; %s" % expires) ca, cb = cj - self.assert_(ca.discard) + self.assertTrue(ca.discard) self.assertFalse(cb.discard) request = Request("http://www.foo.com/") cj.add_cookie_header(request) - self.assertEquals(request.get_header("Cookie"), + self.assertEqual(request.get_header("Cookie"), "fooa=bar; foob=bar") def test_mozilla_cookiejar(self): @@ -1248,12 +1248,12 @@ cj = MozillaCookieJar(filename) cj.revert(ignore_discard=True) cookies = cj._cookies["a.com"]["/"] - self.aRefactoringTool: Refactored ./test/test_browser.py ssertEquals(cookies["name"].value, "val\tstillthevalue") - self.assertEquals(cookies["name2"].value, "value") + self.assertEqual(cookies["name"].value, "val\tstillthevalue") + self.assertEqual(cookies["name2"].value, "value") finally: try: os.remove(filename) - except IOError, exc: + except IOError as exc: if exc.errno != errno.ENOENT: raise @@ -1271,7 +1271,7 @@ finally: try: os.remove(filename) - except IOError, exc: + except IOError as exc: if exc.errno != errno.ENOENT: raise @@ -1709,7 +1709,7 @@ assert not cookie # unicode URL doesn't raise exception, as it used to! - cookie = interact_2965(c, u"http://www.acme.com/\xfc") + cookie = interact_2965(c, "http://www.acme.com/\xfc") def test_netscape_misc(self): # Some additional Netscape cookies tests. --- ./test/test_browser.py (original) +++ ./test/test_browser.py (refactored) @@ -1,7 +1,7 @@ #!/usr/bin/env python """Tests for mechanize.Browser.""" -import StringIO +import io from unittest import TestCase import re @@ -18,18 +18,18 @@ self.handle = handle self.action = action def __call__(self, *args): - return apply(self.handle, (self.meth_name, self.action)+args) + return self.handle(*(self.meth_name, self.action)+args) class MockHeaders(dict): def getheaders(self, name): name = name.lower() - return [v for k, v in self.iteritems() if name == k.lower()] + return [v for k, v in self.items() if name == k.lower()] class MockResponse: closeable_response = None def __init__(self, url="http://example.com/", data=None, info=None): self.url = url - self.fp = StringIO.StringIO(data) + self.fp = io.StringIO(data) if info is None: info = {} self._info = MockHeaders(info) def info(self): return self._info @@ -124,10 +124,10 @@ # Referer not added by .open()... req = mechanize.Request(url) b.open(req) - self.assert_(req.get_header("Referer") is None) + self.assertTrue(req.get_header("Referer") is None) # ...even if we're visiting a document b.open(req) - self.assert_(req.get_header("Referer") is None) + self.assertTrue(req.get_header("Referer") is None) # Referer added by .click_link() and .click() b.select_form("form1") req2 = b.click() @@ -143,22 +143,22 @@ "http://example.com/foo/bar.html") r4 = b.open(req4) req5 = b.click_link(name="apples") - self.assert_(not req5.has_header("Referer")) + self.assertTrue(not req5.has_header("Referer")) # Referer not added for non-http, non-https requests b.add_handler(make_mock_handler()([("blah_open", r)])) req6 = b.click_link(name="pears") - self.assert_(not req6.has_header("Referer")) + self.assertTrue(not req6.has_header("Referer")) # Referer not added when going from non-http, non-https URL r4 = b.open(req6) req7 = b.click_link(name="apples") - self.assert_(not req7.has_header("Referer")) + self.assertTrue(not req7.has_header("Referer")) # XXX Referer added for redirect def test_encoding(self): import mechanize - from StringIO import StringIO - import urllib, email.message + from io import StringIO + import urllib.request, urllib.parse, urllib.error, email.message # always take first encoding, since that's the one from the real HTTP # headers, rather than from HTTP-EQUIV b = mechanize.Browser() @@ -199,26 +199,26 @@ r1 = b.open("http://example.com/") self.assertRaises(mechanize.BrowserStateError, b.back) r2 = b.open("http://example.com/foo") - self.assert_(same_response(b.back(), r1)) + self.assertTrue(same_response(b.back(), r1)) r3 = b.open("http://example.com/bar") r4 = b.open("http://example.com/spam") - self.assert_(same_response(b.back(), r3)) - self.assert_(same_response(b.back(), r1)) - self.assertEquals(b.geturl(), "http://example.com/") + self.assertTrue(same_response(b.back(), r3)) + self.assertTrue(same_response(b.back(), r1)) + self.assertEqual(b.geturl(), "http://example.com/") self.assertRaises(mechanize.BrowserStateError, b.back) # reloading does a real HTTP fetch rather than using history cache r5 = b.reload() - self.assert_(not same_response(r5, r1)) + self.assertTrue(not same_response(r5, r1)) # .geturl() gets fed through to b.response - self.assertEquals(b.geturl(), "http://example.com/") + self.assertEqual(b.geturl(), "http://example.com/") # can go back n times r6 = b.open("spam") - self.assertEquals(b.geturl(), "http://example.com/spam") + self.assertEqual(b.geturl(), "http://example.com/spam") r7 = b.open("/spam") - self.assert_(same_response(b.response(), r7)) - self.assertEquals(b.geturl(), "http://example.com/spam") - self.assert_(same_response(b.back(2), r5)) - self.assertEquals(b.geturl(), "http://example.com/") + self.assertTrue(same_response(b.response(), r7)) + self.assertEqual(b.geturl(), "http://example.com/spam") + self.assertTrue(same_response(b.back(2), r5)) + self.assertEqual(b.geturl(), "http://example.com/") self.assertRaises(mechanize.BrowserStateError, b.back, 2) r8 = b.open("/spam") @@ -228,7 +228,7 @@ def https_open(self, request): r = mechanize.HTTPError( "https://example.com/bad", 503, "Oops", - MockHeaders(), StringIO.StringIO()) + MockHeaders(), io.StringIO()) return r b.add_handler(Handler2()) self.assertRaises(mechanize.HTTPError, b.open, @@ -236,7 +236,7 @@ self.assertEqual(b.response().geturl(), "https://example.com/bad") self.assertEqual(b.request.get_full_url(), "https://example.com/badreq") - self.assert_(same_response(b.back(), r8)) + self.assertTrue(same_response(b.back(), r8)) # .close() should make use of Browser methods and attributes complain # noisily, since they should not be called after .close() @@ -248,7 +248,7 @@ "encoding title select_form click submit click_link " "follow_link find_link".split() ): - self.assert_(getattr(b, attr) is None) + self.assertTrue(getattr(b, attr) is None) def test_reload_read_incomplete(self): import mechanize @@ -273,16 +273,16 @@ r = br.open("http://example.com") r.read(10) br.open('http://www.example.com/blah') - self.failIf(br.reloaded) + self.assertFalse(br.reloaded) br.back() - self.assert_(br.reloaded) + self.assertTrue(br.reloaded) # don't reload if already read br.reloaded = False br.response().read() br.open('http://www.example.com/blah') br.back() - self.failIf(br.reloaded) + self.assertFalse(br.reloaded) def test_viewing_html(self): # XXX not testing multiple Content-Type headers @@ -345,7 +345,7 @@ b = TestBrowser(factory=factory) - self.assert_(b.response() is None) + self.assertTrue(b.response() is None) # To open a relative reference (often called a "relative URL"), you # have to have already opened a URL for it "to be relative to". @@ -376,7 +376,7 @@ b.add_handler(make_mock_handler()( [("http_open", MockResponse(url, "", {}))])) r = b.open(url) - self.assert_(not b.viewing_html()) + self.assertTrue(not b.vieRefactoringTool: Refactored ./test/test_useragent.py RefactoringTool: Refactored ./test/test_unittest.py wing_html()) test_state_error("click links forms title select_form".split()) self.assertRaises(mechanize.BrowserStateError, b.submit, nr=0) self.assertRaises(mechanize.BrowserStateError, b.click_link, nr=0) @@ -481,7 +481,7 @@ Link = mechanize.Link try: - mdashx2 = u"\u2014".encode(encoding)*2 + mdashx2 = "\u2014".encode(encoding)*2 except UnicodeError: mdashx2 = '——' qmdashx2 = clean_url(mdashx2, encoding) @@ -746,9 +746,9 @@ "<TestBrowser (not visiting a URL)>" ) - fp = StringIO.StringIO('<html><form name="f"><input /></form></html>') + fp = io.StringIO('<html><form name="f"><input /></form></html>') headers = email.message.Message( - StringIO.StringIO("Content-type: text/html")) + io.StringIO("Content-type: text/html")) response = _response.response_seek_wrapper( _response.closeable_response( fp, headers, "http://example.com/", 200, "OK")) --- ./test/test_useragent.py (original) +++ ./test/test_useragent.py (refactored) @@ -4,7 +4,7 @@ import mechanize -from test_browser import make_mock_handler +from .test_browser import make_mock_handler class UserAgentTests(TestCase): --- ./test/test_unittest.py (original) +++ ./test/test_unittest.py (refactored) @@ -6,8 +6,8 @@ TestCase.{assert,fail}* methods (some are tested implicitly) """ -from StringIO import StringIO -import __builtin__ +from io import StringIO +import builtins import os import re import sys @@ -15,7 +15,7 @@ from unittest import TestCase, TestProgram import types from copy import deepcopy -from cStringIO import StringIO +from io import StringIO import pickle ### Support code @@ -93,7 +93,7 @@ self.fail("%r and %r do not hash equal" % (obj_1, obj_2)) except KeyboardInterrupt: raise - except Exception, e: + except Exception as e: self.fail("Problem hashing %r and %r: %s" % (obj_1, obj_2, e)) for obj_1, obj_2 in self.ne_pairs: @@ -103,7 +103,7 @@ (obj_1, obj_2)) except KeyboardInterrupt: raise - except Exception, e: + except Exception as e: self.fail("Problem hashing %s and %s: %s" % (obj_1, obj_2, e)) @@ -277,11 +277,11 @@ loader = unittest.TestLoader() suite = loader.loadTestsFromModule(m) - self.assertEquals(load_tests_args, [loader, suite, None]) + self.assertEqual(load_tests_args, [loader, suite, None]) load_tests_args = [] suite = loader.loadTestsFromModule(m, use_load_tests=False) - self.assertEquals(load_tests_args, []) + self.assertEqual(load_tests_args, []) ################################################################ ### /Tests for TestLoader.loadTestsFromModule() @@ -300,7 +300,7 @@ try: loader.loadTestsFromName('') - except ValueError, e: + except ValueError as e: self.assertEqual(str(e), "Empty module name") else: self.fail("TestLoader.loadTestsFromName failed to raise ValueError") @@ -333,7 +333,7 @@ try: loader.loadTestsFromName('sdasfasfasdf') - except ImportError, e: + except ImportError as e: self.assertEqual(str(e), "No module named sdasfasfasdf") else: self.fail("TestLoader.loadTestsFromName failed to raise ImportError") @@ -349,7 +349,7 @@ try: loader.loadTestsFromName('unittest.sdasfasfasdf') - except AttributeError, e: + except AttributeError as e: self.assertEqual(str(e), "'module' object has no attribute 'sdasfasfasdf'") else: self.fail("TestLoader.loadTestsFromName failed to raise AttributeError") @@ -366,7 +366,7 @@ try: loader.loadTestsFromName('sdasfasfasdf', unittest) - except AttributeError, e: + except AttributeError as e: self.assertEqual(str(e), "'module' object has no attribute 'sdasfasfasdf'") else: self.fail("TestLoader.loadTestsFromName failed to raise AttributeError") @@ -387,7 +387,7 @@ try: loader.loadTestsFromName('', unittest) - except AttributeError, e: + except AttributeError as e: pass else: self.fail("Failed to raise AttributeError") @@ -520,7 +520,7 @@ loader = unittest.TestLoader() try: loader.loadTestsFromName('testcase_1.testfoo', m) - except AttributeError, e: + except AttributeError as e: self.assertEqual(str(e), "type object 'MyTestCase' has no attribute 'testfoo'") else: self.fail("Failed to raise AttributeError") @@ -683,7 +683,7 @@ try: loader.loadTestsFromNames(['']) - except ValueError, e: + except ValueError as e: self.assertEqual(str(e), "Empty module name") else: self.fail("TestLoader.loadTestsFromNames failed to raise ValueError") @@ -718,7 +718,7 @@ try: loader.loadTestsFromNames(['sdasfasfasdf']) - except ImportError, e: + except ImportError as e: self.assertEqual(str(e), "No module named sdasfasfasdf") else: self.fail("TestLoader.loadTestsFromNames failed to raise ImportError") @@ -734,7 +734,7 @@ try: loader.loadTestsFromNames(['unittest.sdasfasfasdf', 'unittest']) - except AttributeError, e: + except AttributeError as e: self.assertEqual(str(e), "'module' object has no attribute 'sdasfasfasdf'") else: self.fail("TestLoader.loadTestsFromNames failed to raise AttributeError") @@ -753,7 +753,7 @@ try: loader.loadTestsFromNames(['sdasfasfasdf'], unittest) - except AttributeError, e: + except AttributeError as e: self.assertEqual(str(e), "'module' object has no attribute 'sdasfasfasdf'") else: self.fail("TestLoader.loadTestsFromName failed to raise AttributeError") @@ -772,7 +772,7 @@ try: loader.loadTestsFromNames(['TestCase', 'sdasfasfasdf'], unittest) - except AttributeError, e: + except AttributeError as e: self.assertEqual(str(e), "'module' object has no attribute 'sdasfasfasdf'") else: self.fail("TestLoader.loadTestsFromName failed to raise AttributeError") @@ -921,7 +921,7 @@ loader = unittest.TestLoader() try: loader.loadTestsFromNames(['testcase_1.testfoo'], m) - except AttributeError, e: + except AttributeError as e: self.assertEqual(str(e), "type object 'MyTestCase' has no attribute 'testfoo'") else: self.fail("Failed to raise AttributeError") @@ -1797,7 +1797,7 @@ def test_id(self): test = unittest.FunctionTestCase(lambda: None) - self.assertTrue(isinstance(test.id(), basestring)) + self.assertTrue(isinstance(test.id(), str)) # "Returns a one-line description of the test, or None if no description # has been provided. The default implementation of this method returns @@ -2429,7 +2429,7 @@ def runTest(self): pass - self.assertTrue(isinstance(Foo().id(), basestring)) + self.assertTrue(isinstance(Foo().id(), str)) # "If result is omitted or None, a temporary result object is created # and used, but is not made available to the caller. As TestCase owns the @@ -2747,47 +2747,47 @@ self.assertRaises(self.failureException, self.assertLessEqual, 'bug', 'ant') # Try Unicode - self.assertGreater(u'bug', u'ant') - self.assertGreaterEqual(u'bug', u'ant') - self.assertGreaterEqual(u'ant', u'ant') - self.assertLess(u'ant', u'bug') - self.assertLessEqual(u'ant', u'bug') - self.assertLessEqual(u'ant', u'ant') - self.assertRaises(self.failureException, self.assertGreater, u'ant', u'bug') - self.assertRaises(self.failureException, self.assertGreater, u'ant', u'ant') - self.assertRaises(self.failureException, self.assertGreaterEqual, u'ant', - u'bug') - self.assertRaises(self.failureException, self.assertLess, u'bug', u'ant') - self.assertRaises(self.failureException, self.assertLess, u'ant', u'ant') - self.assertRaises(self.failureException, self.assertLessEqual, u'bug', u'ant') + self.assertGreater('bug', 'ant') + self.assertGreaterEqual('bug', 'ant') + self.assertGreaterEqual('ant', 'ant') + self.assertLess('ant', 'bug') + self.assertLessEqual('ant', 'bug') + self.assertLessEqual('ant', 'ant') + self.assertRaises(self.failureException, self.assertGreater, 'ant', 'bug') + self.assertRaises(self.failureException, self.assertGreater, 'ant', 'ant') + self.assertRaises(self.failureException, self.assertGreaterEqual, 'ant', + 'bug') + self.assertRaises(self.failureException, self.assertLess, 'bug', 'ant') + self.assertRaises(self.failureException, self.assertLess, 'ant', 'ant') + self.assertRaises(self.failureException, self.assertLessEqual, 'bug', 'ant') # Try Mixed String/Unicode - self.assertGreater('bug', u'ant') - self.assertGreater(u'bug', 'ant') - self.assertGreaterEqual('bug', u'ant') - self.assertGreaterEqual(u'bug', 'ant') - self.assertGreaterEqual('ant', u'ant') - self.assertGreaterEqual(u'ant', 'ant') - self.assertLess('ant', u'bug') - self.assertLess(u'ant', 'bug') - self.assertLessEqual('ant', u'bug') - self.assertLessEqual(u'ant', 'bug') - self.assertLessEqual('ant', u'ant') - self.assertLessEqual(u'ant', 'ant') - self.assertRaises(self.failureException, self.assertGreater, 'ant', u'bug') - self.assertRaises(self.failureException, self.assertGreater, u'ant', 'bug') - self.assertRaises(self.failureException, self.assertGreater, 'ant', u'ant') - self.assertRaises(self.failureException, self.assertGreater, u'ant', 'ant') + self.assertGreater('bug', 'ant') + self.assertGreater('bug', 'ant') + self.assertGreaterEqual('bug', 'ant') + self.assertGreaterEqual('bug', 'ant') + self.assertGreaterEqual('ant', 'ant') + self.assertGreaterEqual('ant', 'ant') + self.assertLess('ant', 'bug') + self.assertLess('ant', 'bug') + self.assertLessEqual('ant', 'bug') + self.assertLessEqual('ant', 'bug') + self.assertLessEqual('ant', 'ant') + self.assertLessEqual('ant', 'ant') + self.assertRaises(self.failureException, self.assertGreater, 'ant', 'bug') + self.assertRaises(self.failureException, self.assertGreater, 'ant', 'bug') + self.assertRaises(self.failureException, self.assertGreater, 'ant', 'ant') + self.assertRaises(self.failureException, self.assertGreater, 'ant', 'ant') self.assertRaises(self.failureException, self.assertGreaterEqual, 'ant', - u'bug') - self.assertRaises(self.failureException, self.assertGreaterEqual, u'ant', 'bug') - self.assertRaises(self.failureException, self.assertLess, 'bug', u'ant') - self.assertRaises(self.failureException, self.assertLess, u'bug', 'ant') - self.assertRaises(self.failureException, self.assertLess, 'ant', u'ant') - self.assertRaises(self.failureException, self.assertLess, u'ant', 'ant') - self.assertRaises(self.failureException, self.assertLessEqual, 'bug', u'ant') - self.assertRaises(self.failureException, self.assertLessEqual, u'bug', 'ant') + self.assertRaises(self.failureException, self.assertGreaterEqual, 'ant', + 'bug') + self.assertRaises(self.failureException, self.assertLess, 'bug', 'ant') + self.assertRaises(self.failureException, self.assertLess, 'bug', 'ant') + self.assertRaises(self.failureException, self.assertLess, 'ant', 'ant') + self.assertRaises(self.failureException, self.assertLess, 'ant', 'ant') + self.assertRaises(self.failureException, self.assertLessEqual, 'bug', 'ant') + self.assertRaises(self.failureException, self.assertLessEqual, 'bug', 'ant') def testAssertMultiLineEqual(self): sample_text = """\ @@ -2817,7 +2817,7 @@ try: self.assertMultiLineEqual(type_changer(sample_text), type_changer(revised_sample_text)) - except self.failureException, e: + except self.failureException as e: # no fair testing ourself with ourself, use assertEqual.. self.assertEqual(sample_text_error, str(e).encode('utf8')) @@ -2828,8 +2828,8 @@ self.assertRaises(self.failureException, self.assertIsNotNone, None) def testAssertRegexpMatches(self): - self.assertRegexpMatches('asdfabasdf', r'ab+') - self.assertRaises(self.failureException, self.assertRegexpMatches, + self.assertRegex('asdfabasdf', r'ab+') + self.assertRaises(self.failureException, self.assertRegex, 'saaas', r'aaaa') def testAssertRaisesRegexp(self): @@ -2839,42 +2839,42 @@ def Stub(): raise ExceptionMock('We expect') - self.assertRaisesRegexp(ExceptionMock, re.compile('expect$'), Stub) - self.assertRaisesRegexp(ExceptionMock, 'expect$', Stub) - self.assertRaisesRegexp(ExceptionMock, u'expect$', Stub) + self.assertRaisesRegex(ExceptionMock, re.compile('expect$'), Stub) + self.assertRaisesRegex(ExceptionMock, 'expect$', Stub) + self.assertRaisesRegex(ExceptionMock, 'expect$', Stub) def testAssertNotRaisesRegexp(self): - self.assertRaisesRegexp( + self.assertRaisesRegex( self.failureException, '^Exception not raised$', - self.assertRaisesRegexp, Exception, re.compile('x'), + self.assertRaisesRegex, Exception, re.compile('x'), lambda: None) - self.assertRaisesRegexp( + self.assertRaisesRegex( self.failureException, '^Exception not raised$', - self.assertRaisesRegexp, Exception, 'x', + self.assertRaisesRegex, Exception, 'x', lambda: None) - self.assertRaisesRegexp( + self.assertRaisesRegex( self.failureException, '^Exception not raised$', - self.assertRaisesRegexp, Exception, u'x', + self.assertRaisesRegex, Exception, 'x', lambda: None) def testAssertRaisesRegexpMismatch(self): def Stub(): raise Exception('Unexpected') - self.assertRaisesRegexp( + self.assertRaisesRegex( self.failureException, r'"\^Expected\$" does not match "Unexpected"', - self.assertRaisesRegexp, Exception, '^Expected$', + self.assertRaisesRegex, Exception, '^Expected$', Stub) - self.assertRaisesRegexp( + self.assertRaisesRegex( self.failureException, r'"\^Expected\$" does not match "Unexpected"', - self.assertRaisesRegexp, Exception, u'^Expected$', + self.assertRaisesRegex, Exception, '^Expected$', Stub) - self.assertRaisesRegexp( + self.assertRaisesRegex( self.failureException, r'"\^Expected\$" does not match "Unexpected"', - self.assertRaisesRegexp, Exception, + self.assertRaisesRegex, Exception, re.compile('^Expected$'), Stub) # def testAssertRaisesExcValue(self): @@ -2900,24 +2900,24 @@ This test confirms their continued existence and functionality in order tRefactoringTool: Refactored ./test/test_response.py o avoid breaking existing code. """ - self.assertNotEquals(3, 5) - self.assertEquals(3, 3) - self.assertAlmostEquals(2.0, 2.0) - self.assertNotAlmostEquals(3.0, 5.0) - self.assert_(True) + self.assertNotEqual(3, 5) + self.assertEqual(3, 3) + self.assertAlmostEqual(2.0, 2.0) + self.assertNotAlmostEqual(3.0, 5.0) + self.assertTrue(True) def testPendingDeprecationMethodNames(self): """Test fail* methods pending deprecation, they will warn in 3.2. Do not use these methods. They will go away in 3.3. """ - self.failIfEqual(3, 5) - self.failUnlessEqual(3, 3) - self.failUnlessAlmostEqual(2.0, 2.0) - self.failIfAlmostEqual(3.0, 5.0) - self.failUnless(True) - self.failUnlessRaises(TypeError, lambda _: 3.14 + u'spam') - self.failIf(False) + self.assertNotEqual(3, 5) + self.assertEqual(3, 3) + self.assertAlmostEqual(2.0, 2.0) + self.assertNotAlmostEqual(3.0, 5.0) + self.assertTrue(True) + self.assertRaises(TypeError, lambda _: 3.14 + 'spam') + self.assertFalse(False) # not sure why this is broken, don't care # def testDeepcopy(self): @@ -3058,8 +3058,8 @@ self.assertRaises(KeyError, _raise, KeyError("key")) try: self.assertRaises(KeyError, lambda: None) - except self.failureException, e: - self.assert_("KeyError not raised" in e, str(e)) + except self.failureException as e: + self.assertTrue("KeyError not raised" in e, str(e)) else: self.fail("assertRaises() didn't fail") try: @@ -3115,11 +3115,11 @@ self.assertFalse(TestCase.longMessage) def test_formatMsg(self): - self.assertEquals(self.testableFalse._formatMessage(None, "foo"), "foo") - self.assertEquals(self.testableFalse._formatMessage("foo", "bar"), "foo") - - self.assertEquals(self.testableTrue._formatMessage(None, "foo"), "foo") - self.assertEquals(self.testableTrue._formatMessage("foo", "bar"), "bar : foo") + self.assertEqual(self.testableFalse._formatMessage(None, "foo"), "foo") + self.assertEqual(self.testableFalse._formatMessage("foo", "bar"), "foo") + + self.assertEqual(self.testableTrue._formatMessage(None, "foo"), "foo") + self.assertEqual(self.testableTrue._formatMessage("foo", "bar"), "bar : foo") def assertMessages(self, methodName, args, errors): def getMethod(i): @@ -3137,7 +3137,7 @@ if withMsg: kwargs = {"msg": "oops"} - self.assertRaisesRegexp(self.failureException, expected_regexp, + self.assertRaisesRegex(self.failureException, expected_regexp, lambda: testMethod(*args, **kwargs)) def testAssertTrue(self): @@ -3483,9 +3483,9 @@ def test_pickle_unpickle(self): # Issue #7197: a TextTestRunner should be (un)pickleable. This is # required by test_multiprocessing under Windows (in verbose mode). - import StringIO + import io # cStringIO objects are not pickleable, but StringIO objects are. - stream = StringIO.StringIO("foo") + stream = io.StringIO("foo") runner = unittest.TextTestRunner(stream) for protocol in range(pickle.HIGHEST_PROTOCOL + 1): s = pickle.dumps(runner, protocol=protocol) --- ./test/test_response.py (original) +++ ./test/test_response.py (refactored) @@ -1,12 +1,12 @@ """Tests for mechanize._response.seek_wrapper and friends.""" import copy -import cStringIO +import io from unittest import TestCase class TestUnSeekable: def __init__(self, text): - self._file = cStringIO.StringIO(text) + self._file = io.StringIO(text) self.log = [] def tell(self): return self._file.tell() @@ -52,7 +52,7 @@ dog. """ - text_lines = map(lambda l: l+"\n", text.split("\n")[:-1]) + text_lines = [l+"\n" for l in text.split("\n")[RefactoringTool: Refactored ./test/test_pullparser.py :-1]] def testSeekable(self): from mechanize._response import seek_wrapper @@ -139,10 +139,10 @@ limit = 10 while count < limit: if count == 5: - self.assertRaises(StopIteration, sfh.next) + self.assertRaises(StopIteration, sfh.__next__) break else: - sfh.next() == text_lines[count] + next(sfh) == text_lines[count] count = count + 1 else: assert False, "StopIteration not raised" @@ -151,9 +151,9 @@ text = self.text sfh.read(10) sfh.seek(5) - self.assert_(sfh.invariant()) + self.assertTrue(sfh.invariant()) sfh.seek(0, 2) - self.assert_(sfh.invariant()) + self.assertTrue(sfh.invariant()) sfh.seek(0) self.assertEqual(sfh.read(), text) @@ -163,9 +163,9 @@ r = TestUnSeekableResponse(self.text, hdrs) rsw = response_seek_wrapper(r) rsw2 = self._testCopy(rsw) - self.assert_(rsw is not rsw2) + self.assertTrue(rsw is not rsw2) self.assertEqual(rsw.info(), rsw2.info()) - self.assert_(rsw.info() is not rsw2.info()) + self.assertTrue(rsw.info() is not rsw2.info()) # should be able to close already-closed object rsw2.close() --- ./test/test_pullparser.py (original) +++ ./test/test_pullparser.py (refactored) @@ -13,7 +13,7 @@ PARSERS = [(PullParser, False), (TolerantPullParser, True)] def data_and_file(self): - from StringIO import StringIO + from io import StringIO data = """<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> @@ -41,7 +41,7 @@ for pc, tolerant in PullParserTests.PARSERS: self._test_encoding(pc, tolerant) def _test_encoding(self, parser_class, tolerant): - from StringIO import StringIO + from io import StringIO datas = ["<a>ф</a>", "<a>ф</a>"] def get_text(data, encoding): p = _get_parser(data, encoding) @@ -66,10 +66,10 @@ self.assertEqual(get_text(data, "UTF-8"), "\xd1\x84") self.assertEqual(get_text("<a>—</a>", "UTF-8"), - u"\u2014".encode('utf8')) + "\u2014".encode('utf8')) self.assertEqual( get_attr('<a name="—">blah</a>', "UTF-8", "a", "name"), - u"\u2014".encode('utf8')) + "\u2014".encode('utf8')) self.assertEqual(get_text("<a>—</a>", "ascii"), "—") # response = urllib.addinfourl(f, {"content-type": "text/html; charset=XXX"}, req.get_full_url()) @@ -208,7 +208,7 @@ data, f = self.data_and_file() p = parser_class(f) self.assertEqual(p.get_text(endat=("endtag", "html")), - u"\n\n\nTitle\n\n\nThis is a data blah & a[IMG]" + "\n\n\nTitle\n\n\nThis is a data blah & a[IMG]" " & that was an entityref and this a is\na charref. ." "\n\n\n\n\n\n") f.close() @@ -234,7 +234,7 @@ data, f = self.data_and_file() p = parser_class(f) self.assertEqual(p.get_compressed_text(endat=("endtag", "html")), - u"Title This is a data blah & a[IMG]" + "Title This is a data blah & a[IMG]" " & that was an entityref and this a is a charref. .") f.close() @@ -252,7 +252,7 @@ ] for i, token in enumerate(p.tags()): - self.assertEquals(token.data, expected_tag_names[i]) + self.assertEqual(token.data, expected_tag_names[i]) f.close() # tag name args @@ -266,7 +266,7 @@ ] for i, token in enumerate(p.tags("head", "p")): - self.assertEquals(token, expected_tokens[i]) + self.assertEqual(token, expected_tokens[i]) f.close() def test_tokens(self):RefactoringTool: Refactored ./test/test_pickle.py RefactoringTool: No changes to ./test/test_performance.py RefactoringTool: Refactored ./test/test_opener.py @@ -287,7 +287,7 @@ ] for i, token in enumerate(p.tokens()): - self.assertEquals(token.type, expected_token_types[i]) + self.assertEqual(token.type, expected_token_types[i]) f.close() # token type args @@ -300,7 +300,7 @@ ] for i, token in enumerate(p.tokens("charref", "entityref")): - self.assertEquals(token, expected_tokens[i]) + self.assertEqual(token, expected_tokens[i]) f.close() def test_token_eq(self): @@ -311,9 +311,9 @@ (Token('endtag', 'html', {'woof': 'bark'}), ('endtag', 'html', {'woof': 'bark'})), ]: - self.assertEquals(a, a) - self.assertEquals(a, b) - self.assertEquals(b, a) + self.assertEqual(a, a) + self.assertEqual(a, b) + self.assertEqual(b, a) if __name__ == "__main__": import unittest --- ./test/test_pickle.py (original) +++ ./test/test_pickle.py (refactored) @@ -1,5 +1,5 @@ -import cPickle -import cStringIO as StringIO +import pickle +import io as StringIO import pickle import mechanize --- ./test/test_opener.py (original) +++ ./test/test_opener.py (refactored) @@ -105,12 +105,12 @@ open=fs.open) except mechanize.URLError: pass - fs.verify(self.assertEquals) + fs.verify(self.assertEqual) def test_retrieve_closes_on_success(self): response_verifier = ResponseCloseVerifier() self._check_retrieve(urlopen=response_verifier.open) - response_verifier.verify(self.assertEquals) + response_verifier.verify(self.assertEqual) def test_retrieve_closes_on_failure(self): def fail_to_open(): @@ -122,7 +122,7 @@ raise mechanize.URLError("dummy reason") response_verifier = ResponseCloseVerifier(read=fail_to_read) self._check_retrieve(urlopen=response_verifier.open) - response_verifier.verify(self.assertEquals) + response_verifier.verify(self.assertEqual) def test_retrieve(self): # The .retrieve() method deals with a number of different cases. In @@ -181,7 +181,7 @@ self.assertEqual(verif.count, math.ceil(op.nr_blocks) + 1) op.close() # .close()ing the opener does NOT remove non-temporary files - self.assert_(os.path.isfile(filename)) + self.assertTrue(os.path.isfile(filename)) finally: killfile(filename) @@ -198,9 +198,9 @@ self.assertEqual(open(filename, "rb").read(), op.data) self.assertEqual(len(op.calls), 1) # .close()ing the opener removes temporary files - self.assert_(os.path.exists(filename)) + self.assertTrue(os.path.exists(filename)) op.close() - self.failIf(os.path.exists(filename)) + self.assertFalse(os.path.exists(filename)) self.assertEqual(verif.count, math.ceil(op.nr_blocks) + 1) # case 3: "file:" URL with no filename supplied @@ -224,7 +224,7 @@ self.assertEqual(verif.count, 0) op.close() # .close()ing the opener does NOT remove the file! - self.assert_(os.path.isfile(tifn)) + self.assertTrue(os.path.isfile(tifn)) finally: killfile(tifn) @@ -249,7 +249,7 @@ self.assertEqual(verif.count, math.ceil(op.nr_blocks) + 1) op.close() # .close()ing the opener does NOT remove non-temporary files - self.assert_(os.path.isfile(tfn)) + self.assertTrue(os.path.isfile(tfn)) finally: killfile(tfn) finally: @@ -263,7 +263,7 @@ try: try: op.retrieve(url, reporthook=verif.callback) - except mechanize.ContentTooShortError, exc: + except mechanize.ContentTooShortError as exc: filename, headers = exc.result self.assertNotRefactoringTool: Refactored ./test/test_import.py RefactoringTool: Refactored ./test/test_html.py RefactoringTool: Refactored ./test/test_headers.py Equal(filename, tfn) self.assertEqual(headers["foo"], 'Bar') @@ -273,9 +273,9 @@ self.assertEqual(len(op.calls), 1) self.assertEqual(verif.count, math.ceil(op.nr_blocks) + 1) # cleanup should still take place - self.assert_(os.path.isfile(filename)) + self.assertTrue(os.path.isfile(filename)) op.close() - self.failIf(os.path.isfile(filename)) + self.assertFalse(os.path.isfile(filename)) else: self.fail() finally: --- ./test/test_import.py (original) +++ ./test/test_import.py (refactored) @@ -8,7 +8,7 @@ def test_import_all(self): for name in mechanize.__all__: - exec "from mechanize import %s" % name + exec("from mechanize import %s" % name) if __name__ == "__main__": --- ./test/test_html.py (original) +++ ./test/test_html.py (refactored) @@ -67,54 +67,54 @@ log = [] cgenf = self._get_simple_cgenf(log) for repeat in range(2): - for ii, jj in zip(cgenf(), range(2)): + for ii, jj in zip(cgenf(), list(range(2))): self.assertEqual(ii, jj) - self.assertEqual(log, range(2)) # work only done once + self.assertEqual(log, list(range(2))) # work only done once def test_interleaved(self): log = [] cgenf = self._get_simple_cgenf(log) cgen = cgenf() - self.assertEqual(cgen.next(), 0) + self.assertEqual(next(cgen), 0) self.assertEqual(log, [0]) cgen2 = cgenf() - self.assertEqual(cgen2.next(), 0) + self.assertEqual(next(cgen2), 0) self.assertEqual(log, [0]) - self.assertEqual(cgen.next(), 1) + self.assertEqual(next(cgen), 1) self.assertEqual(log, [0, 1]) - self.assertEqual(cgen2.next(), 1) + self.assertEqual(next(cgen2), 1) self.assertEqual(log, [0, 1]) - self.assertRaises(StopIteration, cgen.next) - self.assertRaises(StopIteration, cgen2.next) + self.assertRaises(StopIteration, cgen.__next__) + self.assertRaises(StopIteration, cgen2.__next__) class UnescapeTests(TestCase): def test_unescape_charref(self): from mechanize._html import unescape_charref - mdash_utf8 = u"\u2014".encode("utf-8") + mdash_utf8 = "\u2014".encode("utf-8") for ref, codepoint, utf8, latin1 in [ - ("38", 38, u"&".encode("utf-8"), "&"), + ("38", 38, "&".encode("utf-8"), "&"), ("x2014", 0x2014, mdash_utf8, "—"), ("8212", 8212, mdash_utf8, "—"), ]: - self.assertEqual(unescape_charref(ref, None), unichr(codepoint)) + self.assertEqual(unescape_charref(ref, None), chr(codepoint)) self.assertEqual(unescape_charref(ref, 'latin-1'), latin1) self.assertEqual(unescape_charref(ref, 'utf-8'), utf8) def test_unescape(self): - import htmlentitydefs + import html.entities from mechanize._html import unescape data = "& < — — —" - mdash_utf8 = u"\u2014".encode("utf-8") - ue = unescape(data, htmlentitydefs.name2codepoint, "utf-8") + mdash_utf8 = "\u2014".encode("utf-8") + ue = unescape(data, html.entities.name2codepoint, "utf-8") self.assertEqual("& < %s %s %s" % ((mdash_utf8,)*3), ue) for text, expect in [ ("&a&", "&a&"), ("a&", "a&"), ]: - got = unescape(text, htmlentitydefs.name2codepoint, "latin-1") + got = unescape(text, html.entities.name2codepoint, "latin-1") self.assertEqual(got, expect) --- ./test/test_headers.py (original) +++ ./test/test_headers.py (refactored) @@ -36,9 +36,9 @@ # quotes should be stripped assert parse_ns_headers(['foo=bar; expires=01 Jan 2040 22:23:32 GMT']) == \ - [[('foo', 'bar'), ('expiresRefactoringTool: Refactored ./test/test_functional.py ', 2209069412L), ('version', '0')]] + [[('foo', 'bar'), ('expires', 2209069412), ('version', '0')]] assert parse_ns_headers(['foo=bar; expires="01 Jan 2040 22:23:32 GMT"']) == \ - [[('foo', 'bar'), ('expires', 2209069412L), ('version', '0')]] + [[('foo', 'bar'), ('expires', 2209069412), ('version', '0')]] def test_parse_ns_headers_version(self): from mechanize._headersutil import parse_ns_headers @@ -49,7 +49,7 @@ 'foo=bar; version="1"', 'foo=bar; Version="1"', ]: - self.assertEquals(parse_ns_headers([hdr]), expected) + self.assertEqual(parse_ns_headers([hdr]), expected) def test_parse_ns_headers_special_names(self): # names such as 'expires' are not special in first name=value pair @@ -59,7 +59,7 @@ # Cookie with name 'expires' hdr = 'expires=01 Jan 2040 22:23:32 GMT' expected = [[("expires", "01 Jan 2040 22:23:32 GMT"), ("version", "0")]] - self.assertEquals(parse_ns_headers([hdr]), expected) + self.assertEqual(parse_ns_headers([hdr]), expected) def test_join_header_words(self): from mechanize._headersutil import join_header_words @@ -96,8 +96,8 @@ try: result = split_header_words([arg]) except: - import traceback, StringIO - f = StringIO.StringIO() + import traceback, io + f = io.StringIO() traceback.print_exc(None, f) result = "(error -- traceback follows)\n\n%s" % f.getvalue() assert result == expect, """ --- ./test/test_functional.py (original) +++ ./test/test_functional.py (refactored) @@ -12,8 +12,8 @@ import subprocess import sys import unittest -import urllib -import urllib2 +import urllib.request, urllib.parse, urllib.error +import urllib.request, urllib.error, urllib.parse import mechanize from mechanize import CookieJar, HTTPCookieProcessor, \ @@ -76,16 +76,16 @@ old_opener_u = urllib2._opener mechanize.install_opener(mechanize.build_opener( mechanize.ProxyHandler(proxies={}))) - urllib2.install_opener(urllib2.build_opener( - urllib2.ProxyHandler(proxies={}))) + urllib.request.install_opener(urllib.request.build_opener( + urllib.request.ProxyHandler(proxies={}))) def revert_install(): mechanize.install_opener(old_opener_m) - urllib2.install_opener(old_opener_u) + urllib.request.install_opener(old_opener_u) self.add_teardown(revert_install) def sanepathname2url(path): - urlpath = urllib.pathname2url(path) + urlpath = urllib.request.pathname2url(path) if os.name == "nt" and urlpath.startswith("///"): urlpath = urlpath[2:] # XXX don't ask me about the mac... @@ -128,7 +128,7 @@ def __getattr__(self, name): return getattr(self._delegate, name) - assertEquals = self.assertEquals + assertEquals = self.assertEqual class TimeoutLog(object): AnyValue = object() @@ -232,7 +232,7 @@ req = mechanize.Request(urljoin(self.test_uri, "test_fixtures"), timeout=timeout) r = self.browser.open(req) - self.assert_("GeneralFAQ.html" in r.read(2048)) + self.assertTrue("GeneralFAQ.html" in r.read(2048)) timeout_log.verify(timeout) def test_302_and_404(self): @@ -273,12 +273,12 @@ r = self.browser.open(urljoin(self.uri, "test_fixtures")) self.assertEqual(r.code, 200) self.assertTrue(301 in codes) - self.assert_("GeneralFAQ.html" in r.read(2048)) + self.assertTrue("GeneralFAQ.html" in r.read(2048)) def test_refresh(self): def refresh_request(seconds): uri = urljoin(self.uri, "/cgi-bin/cookietest.cgi") - val = urllib.quote_plus('%d; url="%s"' % (seconds, self.uri)) + val = urllib.parse.quote_plus('%d; url="%s"' % (seconds, self.uri)) return uri + ("?refresh=%s" % val) self.browser.set_handle_refresh(True, honor_time=False) r = self.browser.open(refresh_request(5)) @@ -300,7 +300,7 @@ url = "file://%s" % sanepathname2url( os.path.abspath(os.path.join("test", "test_functional.py"))) r = self.browser.open(url) - self.assert_("this string appears in this file ;-)" in r.read()) + self.assertTrue("this string appears in this file ;-)" in r.read()) def test_open_local_file(self): # Since the file: URL scheme is not well standardised, Browser has a @@ -312,20 +312,20 @@ def test_open_novisit(self): def test_state(br): - self.assert_(br.request is None) - self.assert_(br.response() is None) + self.assertTrue(br.request is None) + self.assertTrue(br.response() is None) self.assertRaises(mechanize.BrowserStateError, br.back) test_state(self.browser) uri = urljoin(self.uri, "test_fixtures") # note this involves a redirect, which should itself be non-visiting r = self.browser.open_novisit(uri) test_state(self.browser) - self.assert_("GeneralFAQ.html" in r.read(2048)) + self.assertTrue("GeneralFAQ.html" in r.read(2048)) # Request argument instead of URL r = self.browser.open_novisit(mechanize.Request(uri)) test_state(self.browser) - self.assert_("GeneralFAQ.html" in r.read(2048)) + self.assertTrue("GeneralFAQ.html" in r.read(2048)) def test_non_seekable(self): # check everything still works without response_seek_wrapper and @@ -334,9 +334,9 @@ ua.set_seekable_responses(False) ua.set_handle_equiv(False) response = ua.open(self.test_uri) - self.failIf(hasattr(response, "seek")) + self.assertFalse(hasattr(response, "seek")) data = response.read() - self.assert_("Python bits" in data) + self.assertTrue("Python bits" in data) class ResponseTests(TestCase): @@ -364,18 +364,18 @@ opener.set_seekable_responses(True) try: opener.open(urljoin(self.uri, "nonexistent")) - except mechanize.HTTPError, exc: - self.assert_("HTTPError instance" in repr(exc)) + except mechanize.HTTPError as exc: + self.assertTrue("HTTPError instance" in repr(exc)) def test_no_seek(self): # should be possible to turn off UserAgent's .seek() functionality def check_no_seek(opener): r = opener.open(urljoin(self.uri, "test_fixtures/cctest2.txt")) - self.assert_(not hasattr(r, "seek")) + self.assertTrue(not hasattr(r, "seek")) try: opener.open(urljoin(self.uri, "nonexistent")) - except mechanize.HTTPError, exc: - self.assert_(not hasattr(exc, "seek")) + except mechanize.HTTPError as exc: + self.assertTrue(not hasattr(exc, "seek")) # mechanize.UserAgent opener = self.make_user_agent() @@ -399,13 +399,13 @@ self.assertEqual(data, r.read(), r.get_data()) try: opener.open(urljoin(self.uri, "nonexistent")) - except mechanize.HTTPError, exc: + except mechanize.HTTPError as exc: data = exc.read() if excs_also: exc.seek(0) self.assertEqual(data, exc.read(), exc.get_data()) else: - self.assert_(False) + self.assertTrue(False) opener = self.make_user_agent() opener.set_debug_http(False) @@ -489,11 +489,11 @@ referer = urljoin(self.uri, "test_fixtures/referertest.html") info = urljoin(self.uri, "/cgi-bin/cookietest.cgi") r = br.open(info) - self.assert_(referer not in r.get_data()) + self.assertTrue(referer nRefactoringTool: Refactored ./test/test_form_mutation.py ot in r.get_data()) br.open(referer) r = br.follow_link(text="Here") - self.assert_(referer in r.get_data()) + self.assertTrue(referer in r.get_data()) def test_cookies(self): # this test page depends on cookies, and an http-equiv refresh @@ -513,14 +513,14 @@ opener = self.build_opener(handlers) r = opener.open(urljoin(self.uri, "/cgi-bin/cookietest.cgi")) data = r.read() - self.assert_(data.find("Your browser supports cookies!") >= 0) - self.assertEquals(len(cj), 2) + self.assertTrue(data.find("Your browser supports cookies!") >= 0) + self.assertEqual(len(cj), 2) # test response.seek() (added by HTTPEquivProcessor) r.seek(0) samedata = r.read() r.close() - self.assertEquals(samedata, data) + self.assertEqual(samedata, data) def test_robots(self): plain_opener = self.build_opener( @@ -533,7 +533,7 @@ opener.open, urljoin(self.uri, "norobots")) def _check_retrieve(self, url, filename, headers): - from urllib import urlopen + from urllib.request import urlopen self.assertEqual(headers.get('Content-Type'), 'text/html') if self.no_proxies: proxies = {} @@ -550,7 +550,7 @@ filename, headers = opener.retrieve(url, test_filename, verif.callback) self.assertEqual(filename, test_filename) self._check_retrieve(url, filename, headers) - self.assert_(os.path.isfile(filename)) + self.assertTrue(os.path.isfile(filename)) def test_retrieve(self): # not passing an explicit filename downloads to a temporary file @@ -560,11 +560,11 @@ verif = CallbackVerifier(self) request = mechanize.Request(url) filename, headers = opener.retrieve(request, reporthook=verif.callback) - self.assertEquals(request.visit, False) + self.assertEqual(request.visit, False) self._check_retrieve(url, filename, headers) opener.close() # closing the opener removed the temporary file - self.failIf(os.path.isfile(filename)) + self.assertFalse(os.path.isfile(filename)) def test_urlretrieve(self): timeout_log = self._monkey_patch_socket() @@ -585,7 +585,7 @@ # if we don't do anything and go straight to another page, most of the # last page's response won't be .read()... r2 = browser.open(urljoin(self.uri, "mechanize")) - self.assert_(len(r1.get_data()) < 4097) # we only .read() a little bit + self.assertTrue(len(r1.get_data()) < 4097) # we only .read() a little bit # ...so if we then go back, .follow_link() for a link near the end (a # few kb in, past the point that always gets read in HTML files because # of HEAD parsing) will only work if it causes a .reload()... @@ -712,8 +712,8 @@ url = urljoin(self.uri, "/cgi-bin/cookietest.cgi") # no cookie was set on the first request html = br.open(url).read() - self.assertEquals(html.find("Your browser supports cookies!"), -1) - self.assertEquals(len(cookiejar), 2) + self.assertEqual(html.find("Your browser supports cookies!"), -1) + self.assertEqual(len(cookiejar), 2) # ... but now we have the cookie html = br.open(url).read() self.assertIn("Your browser supports cookies!", html) @@ -733,7 +733,7 @@ cj = mechanize.MozillaCookieJar(filename=filename) try: cj.revert() - except IOError, exc: + except IOError as exc: if exc.errno != errno.ENOENT: raise return cj --- ./test/test_form_mutation.py (original) +++ ./test/test_form_mutation.py (refactored) @@ -16,7 +16,7 @@ combined = form.controls + more.controls for control in more.controls: control.add_to_form(form) - self.assertEquals(form.controls, combined) + self.assertEqual(form.coRefactoringTool: Refactored ./test/test_form.py ntrols, combined) if __name__ == "__main__": --- ./test/test_form.py (original) +++ ./test/test_form.py (refactored) @@ -6,7 +6,7 @@ # Copyright 2005 Zope Corporation # Copyright 1998-2000 Gisle Aas. -from cStringIO import StringIO +from io import StringIO import os import string import unittest @@ -78,13 +78,13 @@ def test_unescape_charref(self): unescape_charref = _form.unescape_charref - mdash_utf8 = u"\u2014".encode("utf-8") + mdash_utf8 = "\u2014".encode("utf-8") for ref, codepoint, utf8, latin1 in [ - ("38", 38, u"&".encode("utf-8"), "&"), + ("38", 38, "&".encode("utf-8"), "&"), ("x2014", 0x2014, mdash_utf8, "—"), ("8212", 8212, mdash_utf8, "—"), ]: - self.assertEqual(unescape_charref(ref, None), unichr(codepoint)) + self.assertEqual(unescape_charref(ref, None), chr(codepoint)) self.assertEqual(unescape_charref(ref, 'latin-1'), latin1) self.assertEqual(unescape_charref(ref, 'utf-8'), utf8) @@ -92,11 +92,11 @@ get_entitydefs = _form.get_entitydefs ed = get_entitydefs() for name, char in [ - ("&", u"&"), - ("<", u"<"), - (">", u">"), - ("—", u"\u2014"), - ("♠", u"\u2660"), + ("&", "&"), + ("<", "<"), + (">", ">"), + ("—", "\u2014"), + ("♠", "\u2660"), ]: self.assertEqual(ed[name], char) @@ -104,7 +104,7 @@ unescape = _form.unescape get_entitydefs = _form.get_entitydefs data = "& < — — —" - mdash_utf8 = u"\u2014".encode("utf-8") + mdash_utf8 = "\u2014".encode("utf-8") ue = unescape(data, get_entitydefs(), "utf-8") self.assertEqual("& < %s %s %s" % ((mdash_utf8,)*3), ue) @@ -132,7 +132,7 @@ self.assertEqual(unescape("&", {}), "&") for encoding, expected in [ - ("utf-8", u"&\u06aa\u2014\u2014".encode("utf-8")), + ("utf-8", "&\u06aa\u2014\u2014".encode("utf-8")), ("latin-1", "&ڪ——")]: self.assertEqual( expected, @@ -147,7 +147,7 @@ forms = mechanize.ParseFile(file, "http://localhost/", backwards_compat=False, encoding="utf-8") form = forms[0] - test_string = "&"+(u"\u2014".encode('utf8')*3) + test_string = "&"+("\u2014".encode('utf8')*3) self.assertEqual(form.action, "http://localhost/"+test_string) control = form.find_control(type="textarea", nr=0) self.assertEqual(control.value, "val"+test_string) @@ -164,7 +164,7 @@ """) #" forms = mechanize.ParseFileEx(f, "http://localhost/", encoding="utf-8") form = forms[1] - test_string = "&"+(u"\u2014".encode('utf8')*3) + test_string = "&"+("\u2014".encode('utf8')*3) control = form.find_control(nr=0) for ii in range(len(control.items)): item = control.items[ii] @@ -192,7 +192,7 @@ def testEmptyParse(self): forms = mechanize.ParseFile(StringIO(""), "http://localhost", backwards_compat=False) - self.assert_(len(forms) == 0) + self.assertTrue(len(forms) == 0) def _forms(self): file = StringIO("""<form action="abc"> @@ -207,8 +207,8 @@ def testParse(self): forms = self._forms() - self.assert_(len(forms) == 1) - self.assert_(forms[0]["firstname"] == "Gisle") + self.assertTrue(len(forms) == 1) + self.assertTrue(forms[0]["firstname"] == "Gisle") def testFillForm(self): forms = self._forms() @@ -220,8 +220,8 @@ return "POST" else: return "GET" - self.assert_(request_method(req) == "GET") - self.assert_(req.get_full_url() == "http://localhost/abc?firstname=Gisle+Aas") + self.assertTrue(request_method(req) == "GET") + self.assertTrue(req.get_full_url() == "http://localhost/abc?firstname=Gisle+Aas") def get_header(req, name): try: @@ -233,7 +233,7 @@ try: return req.header_items() except AttributeError: - return req.headers.items() + return list(req.headers.items()) class MockResponse: def __init__(self, f, url): @@ -268,7 +268,7 @@ mechanize.ParseError, mechanize.ParseFile, f, base_uri, backwards_compat=False, ) - self.assert_(issubclass(mechanize.ParseError, + self.assertTrue(issubclass(mechanize.ParseError, sgmllib.SGMLParseError)) def test_unknown_control(self): @@ -282,7 +282,7 @@ forms = mechanize.ParseFile(f, base_uri, backwards_compat=False) form = forms[0] for ctl in form.controls: - self.assert_(isinstance(ctl, _form.TextControl)) + self.assertTrue(isinstance(ctl, _form.TextControl)) def test_ParseFileEx(self): # empty "outer form" (where the "outer form" is the form consisting of @@ -384,10 +384,10 @@ base_uri = "http://localhost/" try: mechanize.ParseFile(f, base_uri, backwards_compat=False) - except mechanize.ParseError, e: - self.assert_(e.base_uri == base_uri) + except mechanize.ParseError as e: + self.assertTrue(e.base_uri == base_uri) else: - self.assert_(0) + self.assertTrue(0) def test_base_uri(self): # BASE element takes priority over document URI @@ -400,7 +400,7 @@ forms = mechanize.ParseFile(file, "http://localhost/", backwards_compat=False) form = forms[0] - self.assert_(form.action == "http://example.com/abc") + self.assertTrue(form.action == "http://example.com/abc") file = StringIO( """<form action="abc"> @@ -410,7 +410,7 @@ forms = mechanize.ParseFile(file, "http://localhost/", backwards_compat=False) form = forms[0] - self.assert_(form.action == "http://localhost/abc") + self.assertTrue(form.action == "http://localhost/abc") def testTextarea(self): file = StringIO( @@ -431,19 +431,19 @@ """) forms = mechanize.ParseFile(file, "http://localhost/", backwards_compat=False, encoding="utf-8") - self.assert_(len(forms) == 1) + self.assertTrue(len(forms) == 1) form = forms[0] - self.assert_(form.name is None) + self.assertTrue(form.name is None) self.assertEqual( form.action, - "http://localhost/abc&"+u"\u2014".encode('utf8')+"d") + "http://localhost/abc&"+"\u2014".encode('utf8')+"d") control = form.find_control(type="textarea", nr=0) - self.assert_(control.name is None) - self.assert_(control.value == "blah, blah,\r\nRhubarb.\r\n\r\n") + self.assertTrue(control.name is None) + self.assertTrue(control.value == "blah, blah,\r\nRhubarb.\r\n\r\n") empty_control = form.find_control(type="textarea", nr=1) - self.assert_(str(empty_control) == "<TextareaControl(<None>=)>") - self.assert_(empty_control.value == "") + self.assertTrue(str(empty_control) == "<TextareaControl(<None>=)>") + self.assertTrue(empty_control.value == "") entity_ctl = form.find_control(type="textarea", nr=2) self.assertEqual(entity_ctl.name, '"ta"') @@ -464,11 +464,11 @@ """) forms = mechanize.ParseFile(file, "http://localhost/", backwards_compat=False) - self.assert_(len(forms) == 1) + self.assertTrue(len(forms) == 1) form = forms[0] entity_ctl = form.find_control(type="select") - self.assert_(entity_ctl.name == "foo") + self.assertTrue(entity_ctl.name == "foo") self.assertEqual(entity_ctl.value[0], "Hello testers & &blah; users!") hide_deprecations() @@ -496,14 +496,14 @@ forms = mechanize.ParseFile(file, "http://localhost/", backwards_compat=False) form = forms[0] - self.assert_(form.name == "myform") + self.assertTrue(form.name == "myform") control = form.find_control(name="b") - self.assert_(control.type == "submitbutton") - self.assert_(control.value == "") - self.assert_(form.find_control("b2").type == "resetbutton") - self.assert_(form.find_control("b3").type == "buttonbutton") + self.assertTrue(control.type == "submitbutton") + self.assertTrue(control.value == "") + self.assertTrue(form.find_control("b2").type == "resetbutton") + self.assertTrue(form.find_control("b3").type == "buttonbutton") pairs = form.click_pairs() - self.assert_(pairs == [("moo", "cow"), ("b", "")]) + self.assertTrue(pairs == [("moo", "cow"), ("b", "")]) def testIsindex(self): file = StringIO( @@ -518,14 +518,14 @@ backwards_compat=False) form = forms[0] control = form.find_control(type="isindex") - self.assert_(control.type == "isindex") - self.assert_(control.name is None) - self.assert_(control.value == "") + self.assertTrue(control.type == "isindex") + self.assertTrue(control.name is None) + self.assertTrue(control.value == "") control.value = "some stuff" - self.assert_(form.click_pairs() == []) - self.assert_(form.click_request_data() == + self.assertTrue(form.click_pairs() == []) + self.assertTrue(form.click_request_data() == ("http://localhost/abc?some+stuff", None, [])) - self.assert_(form.click().get_full_url() == + self.assertTrue(form.click().get_full_url() == "http://localhost/abc?some+stuff") def testEmptySelect(self): @@ -542,11 +542,11 @@ form = forms[0] control0 = form.find_control(type="select", nr=0) control1 = form.find_control(type="select", nr=1) - self.assert_(str(control0) == "<SelectControl(foo=[])>") - self.assert_(str(control1) == "<SelectControl(bar=[])>") + self.assertTrue(str(control0) == "<SelectControl(foo=[])>") + self.assertTrue(str(control1) == "<SelectControl(bar=[])>") form.set_value([], "foo") self.assertRaises(ItemNotFoundError, form.set_value, ["oops"], "foo") - self.assert_(form.click_pairs() == []) + self.assertTrue(form.click_pairs() == []) # XXX figure out what to do in these sorts of cases ## def badSelect(self): @@ -645,7 +645,7 @@ forms = mechanize.ParseFile(file, "http://localhost/", backwards_compat=False) form = forms[0] - self.assert_(form.controls[0].name is None) + self.assertTrue(form.controls[0].name is None) def testNamelessListItems(self): # XXX SELECT @@ -673,17 +673,17 @@ backwards_compat=False) form = forms[0] hide_deprecations() - self.assert_(form.possible_items("foo") == ["on"]) - self.assert_(form.possible_items("bar") == ["on"]) + self.assertTrue(form.possible_items("foo") == ["on"]) + self.assertTrue(form.possible_items("bar") == ["on"]) reset_deprecations() #self.assert_(form.possible_items("baz") == []) - self.assert_(form["foo"] == []) - self.assert_(form["bar"] == []) + self.assertTrue(form["foo"] == []) + self.assertTrue(form["bar"] == []) #self.assert_(form["baz"] == []) form["foo"] = ["on"] form["bar"] = ["on"] pairs = form.click_pairs() - self.assert_(pairs == [("foo", "on"), ("bar", "on"), ("submit", "")]) + self.assertTrue(pairs == [("foo", "on"), ("bar", "on"), ("submit", "")]) def testSingleSelectFixup(self): # HTML 4.01 section 17.6.1: single selection SELECT controls shouldn't @@ -755,9 +755,9 @@ backwards_compat=False) form = forms[0] control = form.find_control("a") - self.assert_(control.value == []) + self.assertTrue(control.value == []) single_control = form.find_control("b") - self.assert_(single_control.value == ["1"]) + self.assertTrue(single_control.value == ["1"]) file.seek(0) forms = mechanize.ParseFile(file, "http://localhost/", @@ -765,9 +765,9 @@ form = forms[0] # select_default only affects *multiple* selection select controls control = form.find_control(type="select", nr=0) - self.assert_(control.value == ["1"]) + self.assertTrue(control.value == ["1"]) single_control = form.find_control(type="select", nr=1) - self.assert_(single_control.value == ["1"]) + self.assertTrue(single_control.value == ["1"]) def test_close_base_tag(self): # Benji York: a single newline immediately after a start tag is @@ -814,7 +814,7 @@ backwards_compat=False, ) form = forms[0] - self.assertEquals(len(form.controls), 2) + self.assertEqual(len(form.controls), 2) ctl = form.find_control(name="a", nr=0) self.assertEqual([item.name for item in ctl.items], ["b", "c"]) ctl = form.find_control(name="a", nr=1) @@ -849,7 +849,7 @@ def test_empty_document(self): forms = mechanize.ParseFileEx(StringIO(""), "http://example.com/") - self.assertEquals(len(forms), 1) # just the "global form" + self.assertEqual(len(forms), 1) # just the "global form" def test_missing_closing_body_tag(self): # Even if there is no closing form or body tag, the last form on the @@ -858,8 +858,8 @@ StringIO('<form name="spam">'), "http://example.com/", ) - self.assertEquals(len(forms), 2) - self.assertEquals(forms[1].name, "spam") + self.assertEqual(len(forms), 2) + self.assertEqual(forms[1].name, "spam") class DisabledTests(unittest.TestCase): @@ -968,48 +968,48 @@ control = get_control("foo") hide_deprecations() for name in 7, 8, 10: - self.assert_(control.get_item_disabled(str(name))) + self.assertTrue(control.get_item_disabled(str(name))) if not compat: # a disabled option is never "successful" (see above) so never # in value - self.assert_(str(name) not in control.value) + self.assertTrue(str(name) not in control.value) # a disabled option always is always upset if you try to set it self.assertRaises(AttributeError, control.set, True, str(name)) - self.assert_(str(name) not in control.value) + self.assertTrue(str(name) not in control.value) self.assertRaises(AttributeError, control.set, False, str(name)) - self.assert_(str(name) not in control.value) + self.assertTrue(str(name) not in control.value) self.assertRaises(AttributeError, control.toggle, str(name)) - self.assert_(str(name) not in control.value) + self.assertTrue(str(name) not in control.value) else: self.assertRaises(AttributeError, control.set, True, str(name)) control.set(False, str(name)) - self.assert_(str(name) not in control.value) + self.assertTrue(str(name) not in control.value) control.set(False, str(name)) - self.assert_(str(name) not in control.value) + self.assertTrue(str(name) not in control.value) self.assertRaises(AttributeError, control.toggle, str(name)) - self.assert_(str(name) not in control.value) + self.assertTrue(str(name) not in control.value) self.assertRaises(AttributeError, control.set, True, str(name)) - self.assert_(str(name) not in control.value) + self.assertTrue(str(name) not in control.value) control = get_control("foo") for name in 1, 2, 3, 4, 5, 6, 9: - self.assert_(not control.get_item_disabled(str(name))) + self.assertTrue(not control.get_item_disabled(str(name))) control.set(False, str(name)) - self.assert_(str(name) not in control.value) + self.assertTrue(str(name) not in control.value) control.toggle(str(name)) - self.assert_(str(name) in control.value) + self.assertTrue(str(name) in control.value) control.set(True, str(name)) - self.assert_(str(name) in control.value) + self.assertTrue(str(name) in control.value) control.toggle(str(name)) - self.assert_(str(name) not in control.value) + self.assertTrue(str(name) not in control.value) control = get_control("foo") - self.assert_(control.get_item_disabled("7")) + self.assertTrue(control.get_item_disabled("7")) control.set_item_disabled(True, "7") - self.assert_(control.get_item_disabled("7")) + self.assertTrue(control.get_item_disabled("7")) self.assertRaises(AttributeError, control.set, True, "7") control.set_item_disabled(False, "7") - self.assert_(not control.get_item_disabled("7")) + self.assertTrue(not control.get_item_disabled("7")) control.set(True, "7") control.set(False, "7") control.toggle("7") @@ -1042,50 +1042,50 @@ control = get_control("bar") hide_deprecations() for name in 7, 8, 10: - self.assert_(control.get_item_disabled(str(name))) + self.assertTrue(control.get_item_disabled(str(name))) if not compat: # a disabled option is never "successful" (see above) so never in # value - self.assert_(str(name) not in control.value) + self.assertTrue(str(name) not in control.value) # a disabled option always is always upset if you try to set it self.assertRaises(AttributeError, control.set, True, str(name)) - self.assert_(str(name) not in control.value) + self.assertTrue(str(name) not in control.value) self.assertRaises(AttributeError, control.set, False, str(name)) - self.assert_(str(name) not in control.value) + self.assertTrue(str(name) not in control.value) self.assertRaises(AttributeError, control.toggle, str(name)) - self.assert_(str(name) not in control.value) + self.assertTrue(str(name) not in control.value) else: self.assertRaises(AttributeError, control.set, True, str(name)) control.set(False, str(name)) - self.assert_(str(name) != control.value) + self.assertTrue(str(name) != control.value) control.set(False, str(name)) - self.assert_(str(name) != control.value) + self.assertTrue(str(name) != control.value) self.assertRaises(AttributeError, control.toggle, str(name)) - self.assert_(str(name) != control.value) + self.assertTrue(str(name) != control.value) self.assertRaises(AttributeError, control.set, True, str(name)) - self.assert_(str(name) != control.value) + self.assertTrue(str(name) != control.value) control = get_control("bar") for name in 1, 2, 3, 4, 5, 6, 9: - self.assert_(not control.get_item_disabled(str(name))) + self.assertTrue(not control.get_item_disabled(str(name))) control.set(False, str(name)) - self.assert_(str(name) not in control.value) + self.assertTrue(str(name) not in control.value) control.toggle(str(name)) - self.assert_(str(name) == control.value[0]) + self.assertTrue(str(name) == control.value[0]) control.set(True, str(name)) - self.assert_(str(name) == control.value[0]) + self.assertTrue(str(name) == control.value[0]) control.toggle(str(name)) - self.assert_(str(name) not in control.value) + self.assertTrue(str(name) not in control.value) control = get_control("bar") - self.assert_(control.get_item_disabled("7")) + self.assertTrue(control.get_item_disabled("7")) control.set_item_disabled(True, "7") - self.assert_(control.get_item_disabled("7")) + self.assertTrue(control.get_item_disabled("7")) self.assertRaises(AttributeError, control.set, True, "7") self.assertEqual(control.value, value) control.set_item_disabled(False, "7") self.assertEqual(control.value, ["7"]) - self.assert_(not control.get_item_disabled("7")) + self.assertTrue(not control.get_item_disabled("7")) control.set(True, "7") control.set(False, "7") control.toggle("7") @@ -1159,7 +1159,7 @@ hide_deprecations() item = control.get_item_attrs("2") reset_deprecations() - self.assertEqual(bool(item.has_key("disabled")), item_disabled) + self.assertEqual(bool("disabled" in item), item_disabled) def bad_assign(value, control=control): control.value = value hide_deprecations() @@ -1181,9 +1181,9 @@ hide_deprecations() self.assertRaises(TypeError, control.set_item_disabled, "1") # by_label - self.assert_(not control.get_item_disabled("a", by_label=True)) + self.assertTrue(not control.get_item_disabled("a", by_label=True)) control.set_item_disabled(True, "a", by_label=True) - self.assert_(control.get_item_disabled("a", by_label=True)) + self.assertTrue(control.get_item_disabled("a", by_label=True)) reset_deprecations() def testDisabledRadio(self): @@ -1204,7 +1204,7 @@ # since all items are disabled, .fixup() should not select # anything - self.assertEquals( + self.assertEqual( [item.name for item in control.items if item.selected], [], ) @@ -1240,11 +1240,11 @@ ("bar", False, True), ("baz", False, True)]: control = form.find_control(name) - self.assert_(bool(control.disabled) == control_disabled) + self.assertTrue(bool(control.disabled) == control_disabled) hide_deprecations() item = control.get_item_attrs("2") - self.assert_(bool(item.has_key("disabled")) == item_disabled) - self.assert_(control.get_item_disabled("2") == item_disabled) + self.assertTrue(bool("disabled" in item) == item_disabled) + self.assertTrue(control.get_item_disabled("2") == item_disabled) def bad_assign(value, control=control): control.value = value if item_disabled: @@ -1262,10 +1262,10 @@ # missing disabled arg self.assertRaises(TypeError, control.set_item_disabled, "1") # by_label - self.failIf(control.get_item_disabled('a', by_label=True)) - self.assert_(not control.get_item_disabled("1")) + self.assertFalse(control.get_item_disabled('a', by_label=True)) + self.assertTrue(not control.get_item_disabled("1")) control.set_item_disabled(True, 'a', by_label=True) - self.assert_(control.get_item_disabled("1")) + self.assertTrue(control.get_item_disabled("1")) reset_deprecations() @@ -1278,52 +1278,52 @@ "id": "foo"} c = _form.TextControl("texT", "ath_Uname", attrs) c.fixup() - self.assert_(c.type == "text") - self.assert_(c.name == "ath_Uname") - self.assert_(c.id == "foo") - self.assert_(c.value == "") - self.assert_(str(c) == "<TextControl(ath_Uname=)>") - self.assert_(c.pairs() == [("ath_Uname", "")]) + self.assertTrue(c.type == "text") + self.assertTrue(c.name == "ath_Uname") + self.assertTrue(c.id == "foo") + self.assertTrue(c.value == "") + self.assertTrue(str(c) == "<TextControl(ath_Uname=)>") + self.assertTrue(c.pairs() == [("ath_Uname", "")]) def bad_assign(c=c): c.type = "sometype" self.assertRaises(AttributeError, bad_assign) - self.assert_(c.type == "text") + self.assertTrue(c.type == "text") def bad_assign(c=c): c.name = "somename" self.assertRaises(AttributeError, bad_assign) - self.assert_(c.name == "ath_Uname") + self.assertTrue(c.name == "ath_Uname") c.value = "2" - self.assert_(c.value == "2") + self.assertTrue(c.value == "2") c.readonly = True self.assertRaises(AttributeError, c.clear) c.readonly = False c.clear() - self.assert_(c.value is None) + self.assertTrue(c.value is None) - self.assert_(c.pairs() == []) + self.assertTrue(c.pairs() == []) c.value = "2" # reset value... - self.assert_(str(c) == "<TextControl(ath_Uname=2)>") + self.assertTrue(str(c) == "<TextControl(ath_Uname=2)>") def bad_assign(c=c): c.value = ["foo"] self.assertRaises(TypeError, bad_assign) - self.assert_(c.value == "2") - self.assert_(not c.readonly) + self.assertTrue(c.value == "2") + self.assertTrue(not c.readonly) c.readonly = True def bad_assign(c=c): c.value = "foo" self.assertRaises(AttributeError, bad_assign) - self.assert_(c.value == "2") + self.assertTrue(c.value == "2") c.disabled = True - self.assert_(str(c) == + self.assertTrue(str(c) == "<TextControl(ath_Uname=2) (disabled, readonly)>") c.readonly = False - self.assert_(str(c) == "<TextControl(ath_Uname=2) (disabled)>") + self.assertTrue(str(c) == "<TextControl(ath_Uname=2) (disabled)>") self.assertRaises(AttributeError, bad_assign) - self.assert_(c.value == "2") - self.assert_(c.pairs() == []) + self.assertTrue(c.value == "2") + self.assertTrue(c.pairs() == []) c.disabled = False - self.assert_(str(c) == "<TextControl(ath_Uname=2)>") - - self.assert_(c.attrs.has_key("maxlength")) + self.assertTrue(str(c) == "<TextControl(ath_Uname=2)>") + + self.assertTrue("maxlength" in c.attrs) for key in "name", "type", "value": - self.assert_(c.attrs.has_key(key)) + self.assertTrue(key in c.attrs) # initialisation of readonly and disabled attributes attrs["readonly"] = True @@ -1337,7 +1337,7 @@ self.assertRaises(AttributeError, bad_assign) del attrs["disabled"] c = _form.TextControl("hidden", "ath_Uname", attrs) - self.assert_(c.readonly) + self.assertTrue(c.readonly) def bad_assign(c=c): c.value = "foo" self.assertRaises(AttributeError, bad_assign) @@ -1347,58 +1347,58 @@ c.add_file(fp) fp2 = StringIO() c.add_file(fp2, None, "fp2 file test") - self.assert_(str(c) == '<FileControl(test_file=<Unnamed file>, fp2 file test)>') + self.assertTrue(str(c) == '<FileControl(test_file=<Unnamed file>, fp2 file test)>') c.readonly = True self.assertRaises(AttributeError, c.clear) c.readonly = False c.clear() - self.assert_(str(c) == '<FileControl(test_file=<No files added>)>') + self.assertTrue(str(c) == '<FileControl(test_file=<No files added>)>') def testIsindexControl(self): attrs = {"type": "this is ignored", "prompt": ">>>"} c = _form.IsindexControl("isIndex", None, attrs) c.fixup() - self.assert_(c.type == "isindex") - self.assert_(c.name is None) - self.assert_(c.value == "") - self.assert_(str(c) == "<IsindexControl()>") - self.assert_(c.pairs() == []) + self.assertTrue(c.type == "isindex") + self.assertTrue(c.name is None) + self.assertTrue(c.value == "") + self.assertTrue(str(c) == "<IsindexControl()>") + self.assertTrue(c.pairs() == []) def set_type(c=c): c.type = "sometype" self.assertRaises(AttributeError, set_type) - self.assert_(c.type == "isindex") + self.assertTrue(c.type == "isindex") def set_name(c=c): c.name = "somename" self.assertRaises(AttributeError, set_name) def set_value(value, c=c): c.value = value self.assertRaises(TypeError, set_value, [None]) - self.assert_(c.name is None) + self.assertTrue(c.name is None) c.value = "2" - self.assert_(c.value == "2") - self.assert_(str(c) == "<IsindexControl(2)>") + self.assertTrue(c.value == "2") + self.assertTrue(str(c) == "<IsindexControl(2)>") c.disabled = True - self.assert_(str(c) == "<IsindexControl(2) (disabled)>") + self.assertTrue(str(c) == "<IsindexControl(2) (disabled)>") self.assertRaises(AttributeError, set_value, "foo") - self.assert_(c.value == "2") - self.assert_(c.pairs() == []) + self.assertTrue(c.value == "2") + self.assertTrue(c.pairs() == []) c.readonly = True - self.assert_(str(c) == "<IsindexControl(2) (disabled, readonly)>") + self.assertTrue(str(c) == "<IsindexControl(2) (disabled, readonly)>") self.assertRaises(AttributeError, set_value, "foo") c.disabled = False - self.assert_(str(c) == "<IsindexControl(2) (readonly)>") + self.assertTrue(str(c) == "<IsindexControl(2) (readonly)>") self.assertRaises(AttributeError, set_value, "foo") c.readonly = False - self.assert_(str(c) == "<IsindexControl(2)>") - - self.assert_(c.attrs.has_key("type")) - self.assert_(c.attrs.has_key("prompt")) - self.assert_(c.attrs["prompt"] == ">>>") + self.assertTrue(str(c) == "<IsindexControl(2)>") + + self.assertTrue("type" in c.attrs) + self.assertTrue("prompt" in c.attrs) + self.assertTrue(c.attrs["prompt"] == ">>>") for key in "name", "value": - self.assert_(not c.attrs.has_key(key)) + self.assertTrue(key not in c.attrs) c.value = "foo 1 bar 2" class FakeForm: action = "http://localhost/" form = FakeForm() - self.assert_(c._click(form, (1,1), "request_data") == + self.assertTrue(c._click(form, (1,1), "request_data") == ("http://localhost/?foo+1+bar+2", None, [])) c.value = "foo 1 bar 2" @@ -1406,22 +1406,22 @@ self.assertRaises(AttributeError, c.clear) c.readonly = False c.clear() - self.assert_(c.value is None) + self.assertTrue(c.value is None) def testIgnoreControl(self): attrs = {"type": "this is ignored"} c = _form.IgnoreControl("reset", None, attrs) - self.assert_(c.type == "reset") - self.assert_(c.value is None) - self.assert_(str(c) == "<IgnoreControl(<None>=<None>)>") + self.assertTrue(c.type == "reset") + self.assertTrue(c.value is None) + self.assertTrue(str(c) == "<IgnoreControl(<None>=<None>)>") def set_value(value, c=c): c.value = value self.assertRaises(AttributeError, set_value, "foo") - self.assert_(c.value is None) + self.assertTrue(c.value is None) # this is correct, but silly; basically nothing should happen c.clear() - self.assert_(c.value is None) + self.assertTrue(c.value is None) def testSubmitControl(self): attrs = {"type": "this is ignored", @@ -1429,16 +1429,16 @@ "value": "value_value", "img": "foo.gif"} c = _form.SubmitControl("submit", "name_value", attrs) - self.assert_(c.type == "submit") - self.assert_(c.name == "name_value") - self.assert_(c.value == "value_value") - self.assert_(str(c) == "<SubmitControl(name_value=value_value) (readonly)>") + self.assertTrue(c.type == "submit") + self.assertTrue(c.name == "name_value") + self.assertTrue(c.value == "value_value") + self.assertTrue(str(c) == "<SubmitControl(name_value=value_value) (readonly)>") c.readonly = True self.assertRaises(AttributeError, c.clear) c.readonly = False c.clear() - self.assert_(c.value is None) + self.assertTrue(c.value is None) c.value = "value_value" c.readonly = True @@ -1446,62 +1446,62 @@ self.assertRaises(TypeError, set_value, ["foo"]) c.disabled = True self.assertRaises(AttributeError, set_value, "value_value") - self.assert_(str(c) == "<SubmitControl(name_value=value_value) " + self.assertTrue(str(c) == "<SubmitControl(name_value=value_value) " "(disabled, readonly)>") c.disabled = False c.readonly = False set_value("value_value") - self.assert_(str(c) == "<SubmitControl(name_value=value_value)>") + self.assertTrue(str(c) == "<SubmitControl(name_value=value_value)>") c.readonly = True # click on button form = _form.HTMLForm("http://foo.bar.com/") c.add_to_form(form) - self.assert_(c.pairs() == []) + self.assertTrue(c.pairs() == []) pairs = c._click(form, (1,1), "pairs") request = c._click(form, (1,1), "request") data = c._click(form, (1,1), "request_data") - self.assert_(c.pairs() == []) - self.assert_(pairs == [("name_value", "value_value")]) - self.assert_(request.get_full_url() == + self.assertTrue(c.pairs() == []) + self.assertTrue(pairs == [("name_value", "value_value")]) + self.assertTrue(request.get_full_url() == "http://foo.bar.com/?name_value=value_value") - self.assert_(data == + self.assertTrue(data == ("http://foo.bar.com/?name_value=value_value", None, [])) c.disabled = True pairs = c._click(form, (1,1), "pairs") request = c._click(form, (1,1), "request") data = c._click(form, (1,1), "request_data") - self.assert_(pairs == []) + self.assertTrue(pairs == []) # XXX not sure if should have '?' on end of this URL, or if it really matters... - self.assert_(request.get_full_url() == "http://foo.bar.com/") - self.assert_(data == ("http://foo.bar.com/", None, [])) + self.assertTrue(request.get_full_url() == "http://foo.bar.com/") + self.assertTrue(data == ("http://foo.bar.com/", None, [])) def testImageControl(self): attrs = {"type": "this is ignored", "name": "name_value", "img": "foo.gif"} c = _form.ImageControl("image", "name_value", attrs, index=0) - self.assert_(c.type == "image") - self.assert_(c.name == "name_value") - self.assert_(c.value == "") - self.assert_(str(c) == "<ImageControl(name_value=)>") + self.assertTrue(c.type == "image") + self.assertTrue(c.name == "name_value") + self.assertTrue(c.value == "") + self.assertTrue(str(c) == "<ImageControl(name_value=)>") c.readonly = True self.assertRaises(AttributeError, c.clear) c.readonly = False c.clear() - self.assert_(c.value is None) + self.assertTrue(c.value is None) c.value = "" # click, at coordinate (0, 55), on image form = _form.HTMLForm("http://foo.bar.com/") c.add_to_form(form) - self.assert_(c.pairs() == []) + self.assertTrue(c.pairs() == []) request = c._click(form, (0, 55), "request") - self.assert_(c.pairs() == []) - self.assert_(request.get_full_url() == + self.assertTrue(c.pairs() == []) + self.assertTrue(request.get_full_url() == "http://foo.bar.com/?name_value.x=0&name_value.y=55") - self.assert_(c._click(form, (0,55), return_type="request_data") == + self.assertTrue(c._click(form, (0,55), return_type="request_data") == ("http://foo.bar.com/?name_value.x=0&name_value.y=55", None, [])) c.value = "blah" @@ -1511,17 +1511,17 @@ c.disabled = True self.assertEqual(c.value, "blah") - self.assert_(str(c) == "<ImageControl(name_value=blah) (disabled)>") + self.assertTrue(str(c) == "<ImageControl(name_value=blah) (disabled)>") def set_value(value, c=c): c.value = value self.assertRaises(AttributeError, set_value, "blah") - self.assert_(c._click(form, (1,1), return_type="pairs") == []) + self.assertTrue(c._click(form, (1,1), return_type="pairs") == []) c.readonly = True - self.assert_(str(c) == "<ImageControl(name_value=blah) " + self.assertTrue(str(c) == "<ImageControl(name_value=blah) " "(disabled, readonly)>") self.assertRaises(AttributeError, set_value, "blah") - self.assert_(c._click(form, (1,1), return_type="pairs") == []) + self.assertTrue(c._click(form, (1,1), return_type="pairs") == []) c.disabled = c.readonly = False - self.assert_(c._click(form, (1,1), return_type="pairs") == + self.assertTrue(c._click(form, (1,1), return_type="pairs") == [("name_value.x", "1"), ("name_value.y", "1"), ('name_value', 'blah')]) @@ -1535,18 +1535,18 @@ c = _form.CheckboxControl("checkbox", "name_value", attrs) c.add_to_form(form) c.fixup() - self.assert_(c.type == "checkbox") - self.assert_(c.name == "name_value") - self.assert_(c.value == []) - hide_deprecations() - self.assert_(c.possible_items() == ["value_value"]) + self.assertTrue(c.type == "checkbox") + self.assertTrue(c.name == "name_value") + self.assertTrue(c.value == []) + hide_deprecations() + self.assertTrue(c.possible_items() == ["value_value"]) reset_deprecations() def set_type(c=c): c.type = "sometype" self.assertRaises(AttributeError, set_type) - self.assert_(c.type == "checkbox") + self.assertTrue(c.type == "checkbox") def set_name(c=c): c.name = "somename" self.assertRaises(AttributeError, set_name) - self.assert_(c.name == "name_value") + self.assertTrue(c.name == "name_value") # construct larger list from length-1 lists c = _form.CheckboxControl("checkbox", "name_value", attrs) @@ -1557,88 +1557,88 @@ c.merge_control(c2) c.add_to_form(form) c.fixup() - self.assert_(str(c) == "<CheckboxControl(" + self.assertTrue(str(c) == "<CheckboxControl(" "name_value=[value_value, value_value2])>") hide_deprecations() - self.assert_(c.possible_items() == ["value_value", "value_value2"]) + self.assertTrue(c.possible_items() == ["value_value", "value_value2"]) attrs = c.get_item_attrs("value_value") for key in "alt", "name", "value", "type": - self.assert_(attrs.has_key(key)) + self.assertTrue(key in attrs) self.assertRaises(ItemNotFoundError, c.get_item_attrs, "oops") reset_deprecations() def set_value(value, c=c): c.value = value c.value = ["value_value", "value_value2"] - self.assert_(c.value == ["value_value", "value_value2"]) + self.assertTrue(c.value == ["value_value", "value_value2"]) c.value = ["value_value"] self.assertEqual(c.value, ["value_value"]) self.assertRaises(ItemNotFoundError, set_value, ["oops"]) self.assertRaises(TypeError, set_value, "value_value") c.value = ["value_value2"] - self.assert_(c.value == ["value_value2"]) + self.assertTrue(c.value == ["value_value2"]) hide_deprecations() c.toggle("value_value") - self.assert_(c.value == ["value_value", "value_value2"]) + self.assertTrue(c.value == ["value_value", "value_value2"]) c.toggle("value_value2") reset_deprecations() - self.assert_(c.value == ["value_value"]) + self.assertTrue(c.value == ["value_value"]) hide_deprecations() self.assertRaises(ItemNotFoundError, c.toggle, "oops") reset_deprecations() - self.assert_(c.value == ["value_value"]) + self.assertTrue(c.value == ["value_value"]) c.readonly = True self.assertRaises(AttributeError, c.clear) c.readonly = False c.clear() - self.assert_(c.value == []) + self.assertTrue(c.value == []) # set hide_deprecations() c.set(True, "value_value") - self.assert_(c.value == ["value_value"]) + self.assertTrue(c.value == ["value_value"]) c.set(True, "value_value2") - self.assert_(c.value == ["value_value", "value_value2"]) + self.assertTrue(c.value == ["value_value", "value_value2"]) c.set(True, "value_value2") - self.assert_(c.value == ["value_value", "value_value2"]) + self.assertTrue(c.value == ["value_value", "value_value2"]) c.set(False, "value_value2") - self.assert_(c.value == ["value_value"]) + self.assertTrue(c.value == ["value_value"]) c.set(False, "value_value2") - self.assert_(c.value == ["value_value"]) + self.assertTrue(c.value == ["value_value"]) self.assertRaises(ItemNotFoundError, c.set, True, "oops") self.assertRaises(TypeError, c.set, True, ["value_value"]) self.assertRaises(ItemNotFoundError, c.set, False, "oops") self.assertRaises(TypeError, c.set, False, ["value_value"]) reset_deprecations() - self.assert_(str(c) == "<CheckboxControl(" + self.assertTrue(str(c) == "<CheckboxControl(" "name_value=[*value_value, value_value2])>") c.disabled = True self.assertRaises(AttributeError, set_value, ["value_value"]) - self.assert_(str(c) == "<CheckboxControl(" + self.assertTrue(str(c) == "<CheckboxControl(" "name_value=[*value_value, value_value2]) " "(disabled)>") - self.assert_(c.value == ["value_value"]) - self.assert_(c.pairs() == []) + self.assertTrue(c.value == ["value_value"]) + self.assertTrue(c.pairs() == []) c.readonly = True self.assertRaises(AttributeError, set_value, ["value_value"]) - self.assert_(str(c) == "<CheckboxControl(" + self.assertTrue(str(c) == "<CheckboxControl(" "name_value=[*value_value, value_value2]) " "(disabled, readonly)>") - self.assert_(c.value == ["value_value"]) - self.assert_(c.pairs() == []) + self.assertTrue(c.value == ["value_value"]) + self.assertTrue(c.pairs() == []) c.disabled = False - self.assert_(str(c) == "<CheckboxControl(" + self.assertTrue(str(c) == "<CheckboxControl(" "name_value=[*value_value, value_value2]) " "(readonly)>") self.assertRaises(AttributeError, set_value, ["value_value"]) - self.assert_(c.value == ["value_value"]) - self.assert_(c.pairs() == [("name_value", "value_value")]) + self.assertTrue(c.value == ["value_value"]) + self.assertTrue(c.pairs() == [("name_value", "value_value")]) c.readonly = False c.value = [] - self.assert_(c.value == []) + self.assertTrue(c.value == []) def testSelectControlMultiple(self): attrs = {"type": "this is ignored", @@ -1656,20 +1656,20 @@ c = _form.SelectControl("select", "select_name", attrs) c.add_to_form(form) c.fixup() - self.assert_(c.type == "select") - self.assert_(c.name == "select_name") - self.assert_(c.value == []) - hide_deprecations() - self.assert_(c.possible_items() == ["value_value"]) - reset_deprecations() - self.assert_(c.attrs.has_key("name")) - self.assert_(c.attrs.has_key("type")) - self.assert_(c.attrs["alt"] == "alt_text") + self.assertTrue(c.type == "select") + self.assertTrue(c.name == "select_name") + self.assertTrue(c.value == []) + hide_deprecations() + self.assertTrue(c.possible_items() == ["value_value"]) + reset_deprecations() + self.assertTrue("name" in c.attrs) + self.assertTrue("type" in c.attrs) + self.assertTrue(c.attrs["alt"] == "alt_text") # ... and with RFC 1866 default selection c = _form.SelectControl("select", "select_name", attrs, select_default=True) c.add_to_form(form) c.fixup() - self.assert_(c.value == ["value_value"]) + self.assertTrue(c.value == ["value_value"]) # construct larger list from length-1 lists c = _form.SelectControl("select", "select_name", attrs) @@ -1680,28 +1680,28 @@ c.merge_control(c2) c.add_to_form(form) c.fixup() - self.assert_(str(c) == "<SelectControl(" + self.assertTrue(str(c) == "<SelectControl(" "select_name=[value_value, value_value2])>") hide_deprecations() - self.assert_(c.possible_items() == ["value_value", "value_value2"]) + self.assertTrue(c.possible_items() == ["value_value", "value_value2"]) # get_item_attrs attrs3 = c.get_item_attrs("value_value") reset_deprecations() - self.assert_(attrs3.has_key("alt")) - self.assert_(not attrs3.has_key("multiple")) + self.assertTrue("alt" in attrs3) + self.assertTrue("multiple" not in attrs3) # HTML attributes dictionary should have been copied by ListControl # constructor. attrs["new_attr"] = "new" attrs2["new_attr2"] = "new2" for key in ("new_attr", "new_attr2"): - self.assert_(not attrs3.has_key(key)) + self.assertTrue(key not in attrs3) hide_deprecations() self.assertRaises(ItemNotFoundError, c.get_item_attrs, "oops") reset_deprecations() c.value = ["value_value", "value_value2"] - self.assert_(c.value == ["value_value", "value_value2"]) + self.assertTrue(c.value == ["value_value", "value_value2"]) c.value = ["value_value"] self.assertEqual(c.value, ["value_value"]) def set_value(value, c=c): c.value = value @@ -1709,42 +1709,42 @@ self.assertRaises(TypeError, set_value, "value_value") self.assertRaises(TypeError, set_value, None) c.value = ["value_value2"] - self.assert_(c.value == ["value_value2"]) + self.assertTrue(c.value == ["value_value2"]) hide_deprecations() c.toggle("value_value") - self.assert_(c.value == ["value_value", "value_value2"]) + self.assertTrue(c.value == ["value_value", "value_value2"]) c.toggle("value_value2") - self.assert_(c.value == ["value_value"]) + self.assertTrue(c.value == ["value_value"]) self.assertRaises(ItemNotFoundError, c.toggle, "oops") - self.assert_(c.value == ["value_value"]) + self.assertTrue(c.value == ["value_value"]) reset_deprecations() c.readonly = True self.assertRaises(AttributeError, c.clear) c.readonly = False c.clear() - self.assert_(c.value == []) + self.assertTrue(c.value == []) # test ordering of items c.value = ["value_value2", "value_value"] - self.assert_(c.value == ["value_value", "value_value2"]) + self.assertTrue(c.value == ["value_value", "value_value2"]) # set hide_deprecations() c.set(True, "value_value") - self.assert_(c.value == ["value_value", "value_value2"]) + self.assertTrue(c.value == ["value_value", "value_value2"]) c.set(True, "value_value2") - self.assert_(c.value == ["value_value", "value_value2"]) + self.assertTrue(c.value == ["value_value", "value_value2"]) c.set(False, "value_value") - self.assert_(c.value == ["value_value2"]) + self.assertTrue(c.value == ["value_value2"]) c.set(False, "value_value") - self.assert_(c.value == ["value_value2"]) + self.assertTrue(c.value == ["value_value2"]) self.assertRaises(ItemNotFoundError, c.set, True, "oops") self.assertRaises(TypeError, c.set, True, ["value_value"]) self.assertRaises(ItemNotFoundError, c.set, False, "oops") self.assertRaises(TypeError, c.set, False, ["value_value"]) reset_deprecations() c.value = [] - self.assert_(c.value == []) + self.assertTrue(c.value == []) def testSelectControlMultiple_label(self): ## <SELECT name=year> @@ -1786,66 +1786,66 @@ c.fixup() hide_deprecations() - self.assert_(c.possible_items() == ["0", "1", "2000"]) - self.assert_(c.possible_items(by_label=True) == + self.assertTrue(c.possible_items() == ["0", "1", "2000"]) + self.assertTrue(c.possible_items(by_label=True) == ["2002", "2001", "2000"]) - self.assert_(c.value == []) + self.assertTrue(c.value == []) c.toggle("2002", by_label=True) - self.assert_(c.value == ["0"]) + self.assertTrue(c.value == ["0"]) c.toggle("0") - self.assert_(c.value == []) + self.assertTrue(c.value == []) c.toggle("0") - self.assert_(c.value == ["0"]) - self.assert_(c.get_value_by_label() == ["2002"]) + self.assertTrue(c.value == ["0"]) + self.assertTrue(c.get_value_by_label() == ["2002"]) c.toggle("2002", by_label=True) self.assertRaises(ItemNotFoundError, c.toggle, "blah", by_label=True) - self.assert_(c.value == []) + self.assertTrue(c.value == []) c.toggle("2000") reset_deprecations() - self.assert_(c.value == ["2000"]) - self.assert_(c.get_value_by_label() == ["2000"]) + self.assertTrue(c.value == ["2000"]) + self.assertTrue(c.get_value_by_label() == ["2000"]) def set_value(value, c=c): c.value = value self.assertRaises(ItemNotFoundError, set_value, ["2002"]) self.assertRaises(TypeError, set_value, "1") self.assertRaises(TypeError, set_value, None) - self.assert_(c.value == ["2000"]) + self.assertTrue(c.value == ["2000"]) c.value = ["0"] self.assertEqual(c.value, ["0"]) c.value = [] self.assertRaises(TypeError, c.set_value_by_label, "2002") c.set_value_by_label(["2002"]) - self.assert_(c.value == ["0"]) - self.assert_(c.get_value_by_label() == ["2002"]) + self.assertTrue(c.value == ["0"]) + self.assertTrue(c.get_value_by_label() == ["2002"]) c.set_value_by_label(["2000"]) - self.assert_(c.value == ["2000"]) - self.assert_(c.get_value_by_label() == ["2000"]) + self.assertTrue(c.value == ["2000"]) + self.assertTrue(c.get_value_by_label() == ["2000"]) c.set_value_by_label(["2000", "2002"]) - self.assert_(c.value == ["0", "2000"]) - self.assert_(c.get_value_by_label() == ["2002", "2000"]) + self.assertTrue(c.value == ["0", "2000"]) + self.assertTrue(c.get_value_by_label() == ["2002", "2000"]) c.readonly = True self.assertRaises(AttributeError, c.clear) c.readonly = False c.clear() - self.assert_(c.value == []) + self.assertTrue(c.value == []) c.set_value_by_label(["2000", "2002"]) hide_deprecations() c.set(False, "2002", by_label=True) - self.assert_(c.get_value_by_label() == c.value == ["2000"]) + self.assertTrue(c.get_value_by_label() == c.value == ["2000"]) c.set(False, "2002", by_label=True) - self.assert_(c.get_value_by_label() == c.value == ["2000"]) + self.assertTrue(c.get_value_by_label() == c.value == ["2000"]) c.set(True, "2002", by_label=True) - self.assert_(c.get_value_by_label() == ["2002", "2000"]) - self.assert_(c.value == ["0", "2000"]) + self.assertTrue(c.get_value_by_label() == ["2002", "2000"]) + self.assertTrue(c.value == ["0", "2000"]) c.set(False, "2000", by_label=True) - self.assert_(c.get_value_by_label() == ["2002"]) - self.assert_(c.value == ["0"]) + self.assertTrue(c.get_value_by_label() == ["2002"]) + self.assertTrue(c.value == ["0"]) c.set(True, "2001", by_label=True) - self.assert_(c.get_value_by_label() == ["2002", "2001"]) - self.assert_(c.value == ["0", "1"]) + self.assertTrue(c.get_value_by_label() == ["2002", "2001"]) + self.assertTrue(c.value == ["0", "1"]) self.assertRaises(ItemNotFoundError, c.set, True, "blah", by_label=True) self.assertRaises(ItemNotFoundError, c.set, @@ -1889,8 +1889,8 @@ c.fixup() hide_deprecations() - self.assert_(c.possible_items() == ["0", "1", "2000"]) - self.assert_(c.possible_items(by_label=True) == + self.assertTrue(c.possible_items() == ["0", "1", "2000"]) + self.assertTrue(c.possible_items(by_label=True) == ["2002", "2001", "2000"]) reset_deprecations() @@ -1898,11 +1898,11 @@ self.assertRaises(ItemNotFoundError, set_value, ["2002"]) self.assertRaises(TypeError, set_value, "1") self.assertRaises(TypeError, set_value, None) - self.assert_(c.value == ["0"]) + self.assertTrue(c.value == ["0"]) c.value = [] - self.assert_(c.value == []) + self.assertTrue(c.value == []) c.value = ["0"] - self.assert_(c.value == ["0"]) + self.assertTrue(c.value == ["0"]) c.value = [] self.assertRaises(TypeError, c.set_value_by_label, "2002") @@ -1910,17 +1910,17 @@ ["2000", "2001"]) self.assertRaises(ItemNotFoundError, c.set_value_by_label, ["foo"]) c.set_value_by_label(["2002"]) - self.assert_(c.value == ["0"]) - self.assert_(c.get_value_by_label() == ["2002"]) + self.assertTrue(c.value == ["0"]) + self.assertTrue(c.get_value_by_label() == ["2002"]) c.set_value_by_label(["2000"]) - self.assert_(c.value == ["2000"]) - self.assert_(c.get_value_by_label() == ["2000"]) + self.assertTrue(c.value == ["2000"]) + self.assertTrue(c.get_value_by_label() == ["2000"]) c.readonly = True self.assertRaises(AttributeError, c.clear) c.readonly = False c.clear() - self.assert_(c.value == []) + self.assertTrue(c.value == []) def testSelectControlSingle(self): attrs = {"type": "this is ignored", @@ -1936,21 +1936,21 @@ form = DummyForm() c.add_to_form(form) c.fixup() - self.assert_(c.type == "select") - self.assert_(c.name == "select_name") - self.assert_(c.value == ["value_value"]) - hide_deprecations() - self.assert_(c.possible_items() == ["value_value"]) - reset_deprecations() - self.assert_(c.attrs.has_key("name")) - self.assert_(c.attrs.has_key("type")) - self.assert_(c.attrs["alt"] == "alt_text") + self.assertTrue(c.type == "select") + self.assertTrue(c.name == "select_name") + self.assertTrue(c.value == ["value_value"]) + hide_deprecations() + self.assertTrue(c.possible_items() == ["value_value"]) + reset_deprecations() + self.assertTrue("name" in c.attrs) + self.assertTrue("type" in c.attrs) + self.assertTrue(c.attrs["alt"] == "alt_text") # ...and RFC 1866 behaviour are identical (unlike multiple SELECT). c = _form.SelectControl("select", "select_name", attrs, select_default=1) c.add_to_form(form) c.fixup() - self.assert_(c.value == ["value_value"]) + self.assertTrue(c.value == ["value_value"]) # construct larger list from length-1 lists c = _form.SelectControl("select", "select_name", attrs) @@ -1960,18 +1960,18 @@ c.merge_control(c2) c.add_to_form(form) c.fixup() - self.assert_(str(c) == "<SelectControl(" + self.assertTrue(str(c) == "<SelectControl(" "select_name=[*value_value, value_value2])>") c.value = [] - self.assert_(c.value == []) - self.assert_(str(c) == "<SelectControl(" + self.assertTrue(c.value == []) + self.assertTrue(str(c) == "<SelectControl(" "select_name=[value_value, value_value2])>") c.value = ["value_value"] - self.assert_(c.value == ["value_value"]) - self.assert_(str(c) == "<SelectControl(" + self.assertTrue(c.value == ["value_value"]) + self.assertTrue(str(c) == "<SelectControl(" "select_name=[*value_value, value_value2])>") hide_deprecations() - self.assert_(c.possible_items() == ["value_value", "value_value2"]) + self.assertTrue(c.possible_items() == ["value_value", "value_value2"]) reset_deprecations() def set_value(value, c=c): c.value = value @@ -1980,45 +1980,45 @@ self.assertRaises(TypeError, set_value, "value_value") self.assertRaises(TypeError, set_value, None) c.value = ["value_value2"] - self.assert_(c.value == ["value_value2"]) + self.assertTrue(c.value == ["value_value2"]) c.value = ["value_value"] - self.assert_(c.value == ["value_value"]) + self.assertTrue(c.value == ["value_value"]) self.assertRaises(ItemNotFoundError, set_value, ["oops"]) - self.assert_(c.value == ["value_value"]) + self.assertTrue(c.value == ["value_value"]) hide_deprecations() c.toggle("value_value") self.assertRaises(ItemNotFoundError, c.toggle, "oops") self.assertRaises(TypeError, c.toggle, ["oops"]) reset_deprecations() - self.assert_(c.value == []) + self.assertTrue(c.value == []) c.value = ["value_value"] - self.assert_(c.value == ["value_value"]) + self.assertTrue(c.value == ["value_value"]) # nothing selected is allowed c.value = [] - self.assert_(c.value == []) + self.assertTrue(c.value == []) hide_deprecations() c.set(True, "value_value") - self.assert_(c.value == ["value_value"]) + self.assertTrue(c.value == ["value_value"]) c.readonly = True self.assertRaises(AttributeError, c.clear) c.readonly = False c.clear() - self.assert_(c.value == []) + self.assertTrue(c.value == []) # set c.set(True, "value_value") - self.assert_(c.value == ["value_value"]) + self.assertTrue(c.value == ["value_value"]) c.set(True, "value_value") - self.assert_(c.value == ["value_value"]) + self.assertTrue(c.value == ["value_value"]) c.set(True, "value_value2") - self.assert_(c.value == ["value_value2"]) + self.assertTrue(c.value == ["value_value2"]) c.set(False, "value_value") - self.assert_("value_value2") + self.assertTrue("value_value2") c.set(False, "value_value2") - self.assert_(c.value == []) + self.assertTrue(c.value == []) c.set(False, "value_value2") - self.assert_(c.value == []) + self.assertTrue(c.value == []) self.assertRaises(ItemNotFoundError, c.set, True, "oops") self.assertRaises(TypeError, c.set, True, ["value_value"]) self.assertRaises(ItemNotFoundError, c.set, False, "oops") @@ -2035,19 +2035,19 @@ form = DummyForm() c.add_to_form(form) c.fixup() - self.assert_(c.type == "radio") - self.assert_(c.name == "name_value") - self.assert_(c.id == "blah") - self.assert_(c.value == []) - hide_deprecations() - self.assert_(c.possible_items() == ["value_value"]) + self.assertTrue(c.type == "radio") + self.assertTrue(c.name == "name_value") + self.assertTrue(c.id == "blah") + self.assertTrue(c.value == []) + hide_deprecations() + self.assertTrue(c.possible_items() == ["value_value"]) reset_deprecations() # ...and RFC 1866 behaviour c = _form.RadioControl("radio", "name_value", attrs, select_default=True) c.add_to_form(form) c.fixup() - self.assert_(c.value == ["value_value"]) + self.assertTrue(c.value == ["value_value"]) # construct larger list from length-1 lists c = _form.RadioControl("radio", "name_value", attrs, @@ -2059,10 +2059,10 @@ c.merge_control(c2) c.add_to_form(form) c.fixup() - self.assert_(str(c) == "<RadioControl(" + self.assertTrue(str(c) == "<RadioControl(" "name_value=[*value_value, value_value2])>") hide_deprecations() - self.assert_(c.possible_items() == ["value_value", "value_value2"]) + self.assertTrue(c.possible_items() == ["value_value", "value_value2"]) reset_deprecations() def set_value(value, c=c): c.value = value @@ -2105,7 +2105,7 @@ c.set(True, "value_value2") self.assertEqual(c.value, ["value_value2"]) c.set(False, "value_value") - self.assert_("value_value2") + self.assertTrue("value_value2") c.set(False, "value_value2") self.assertEqual(c.value, []) c.set(False, "value_value2") @@ -2147,17 +2147,17 @@ ['value_value', 'value_value', 'another_value']) reset_deprecations() self.assertEqual(c1.value, ['value_value']) - self.failIf(c1.items[0].selected) - self.failUnless(c1.items[1].selected) - self.failIf(c1.items[2].selected) + self.assertFalse(c1.items[0].selected) + self.assertTrue(c1.items[1].selected) + self.assertFalse(c1.items[2].selected) c1.value = ['value_value'] # should be no change - self.failUnless(c1.items[1].selected) + self.assertTrue(c1.items[1].selected) self.assertEqual(c1.value, ['value_value']) c1.value = ['another_value'] - self.failUnless(c1.items[2].selected) + self.assertTrue(c1.items[2].selected) self.assertEqual(c1.value, ['another_value']) c1.value = ['value_value'] - self.failUnless(c1.items[0].selected) + self.assertTrue(c1.items[0].selected) self.assertEqual(c1.value, ['value_value']) # id labels @@ -2197,7 +2197,7 @@ base_uri = "http://auth.athensams.net/" def _get_test_file(self, filename): - import test_form + from . import test_form this_dir = os.path.dirname(test_form.__file__) path = os.path.join(this_dir, "test_form_data", filename) return open(path) @@ -2392,8 +2392,8 @@ form = mechanize.ParseFile(file, "http://blah/", backwards_compat=False)[0] self.assertRaises(ControlNotFoundError, form.click, nr=2) - self.assert_(form.click().get_full_url() == "http://blah/abc?foo=") - self.assert_(form.click(name="bar").get_full_url() == "http://blah/abc?bar=") + self.assertTrue(form.click().get_full_url() == "http://blah/abc?foo=") + self.assertTrue(form.click(name="bar").get_full_url() == "http://blah/abc?bar=") for method in ["GET", "POST"]: file = StringIO( @@ -2409,15 +2409,15 @@ url = "http://blah/abc?foo=" else: url = "http://blah/abc?bang=whizz" - self.assert_(form.click().get_full_url() == url) + self.assertTrue(form.click().get_full_url() == url) def testAuth(self): fh = self._get_test_file("Auth.html") forms = mechanize.ParseFile(fh, self.base_uri, backwards_compat=False) - self.assert_(len(forms) == 1) + self.assertTrue(len(forms) == 1) form = forms[0] - self.assert_(form.action == + self.assertTrue(form.action == "http://auth.athensams.net/" "?ath_returl=%22http%3A%2F%2Ftame.mimas.ac.uk%2Fisicgi" "%2FWOS-login.cgi%22&ath_dspid=MIMAS.WOS") @@ -2436,17 +2436,17 @@ for i in range(len(keys)): key = keys[i] c = form.find_control(key) - self.assert_(c.value == values[i]) - self.assert_(c.type == types[i]) + self.assertTrue(c.value == values[i]) + self.assertTrue(c.type == types[i]) c = form.find_control(type="image") - self.assert_(c.name is None) - self.assert_(c.value == "") - self.assert_(c.type == "image") + self.assertTrue(c.name is None) + self.assertTrue(c.value == "") + self.assertTrue(c.type == "image") form["ath_uname"] = "jbloggs" form["ath_passwd"] = "foobar" - self.assert_(form.click_pairs() == + self.assertTrue(form.click_pairs() == [("ath_uname", "jbloggs"), ("ath_passwd", "foobar")]) @@ -2454,7 +2454,7 @@ fh = self._get_test_file("SearchType.html") forms = mechanize.ParseFile(fh, self.base_uri, backwards_compat=False) - self.assert_(len(forms) == 1) + self.assertTrue(len(forms) == 1) form = forms[0] keys = ["SID", "SESSION_DIR", "Full Search", "Easy Search", @@ -2465,11 +2465,11 @@ "hidden", "hidden"] for i in range(len(keys)): key = keys[i] - self.assert_(form.find_control(key).value == values[i]) - self.assert_(form.find_control(key).type == types[i]) + self.assertTrue(form.find_control(key).value == values[i]) + self.assertTrue(form.find_control(key).type == types[i]) pairs = form.click_pairs("Full Search") - self.assert_(pairs == [ + self.assertTrue(pairs == [ ("SID", "PMrU0IJYy4MAAELSXic_E2011300_PMrU0IJYy4MAAELSXic-0"), ("SESSION_DIR", ""), ("Full Search.x", "1"), ("Full Search.y", "1"), ("Form", "Welcome"), ("JavaScript", "No")]) @@ -2481,7 +2481,7 @@ fh = self._get_test_file("GeneralSearch.html") forms = mechanize.ParseFile(fh, self.base_uri, backwards_compat=False) - self.assert_(len(forms) == 1) + self.assertTrue(len(forms) == 1) form = forms[0] keys = ["SID", "SESSION_DIR", @@ -2511,34 +2511,34 @@ self.assertEqual(fc(name, nr=0).value, values[i]) self.assertEqual(fc(name, nr=0).type, type) self.assertEqual(fc(name, type, nr=0).name, name) - self.assert_(fc(type="hidden", nr=0).name == "SID") - self.assert_(fc(type="image", nr=0).name == "Home") - self.assert_(fc(nr=6).name == "Search") + self.assertTrue(fc(type="hidden", nr=0).name == "SID") + self.assertTrue(fc(type="image", nr=0).name == "Home") + self.assertTrue(fc(nr=6).name == "Search") self.assertRaises(ControlNotFoundError, fc, nr=50) self.assertRaises(ValueError, fc, nr=-1) - self.assert_(fc("Search", "image", nr=0).name == "Search") + self.assertTrue(fc("Search", "image", nr=0).name == "Search") self.assertRaises(ControlNotFoundError, fc, "Search", "hidden") s0 = fc("Search", "image", nr=0) s0b = fc("Search", "image", nr=0) s1 = fc("Search", "image", nr=1) - self.assert_(s0.name == s1.name == "Search") - self.assert_(s0 is s0b) - self.assert_(s0 is not s1) + self.assertTrue(s0.name == s1.name == "Search") + self.assertTrue(s0 is s0b) + self.assertTrue(s0 is not s1) self.assertRaises(ControlNotFoundError, fc, "Search", "image", nr=2) - self.assert_(fc(type="text", nr=2).name == "journal") - self.assert_(fc("Search", nr=0) is not fc("Search", nr=1)) + self.assertTrue(fc(type="text", nr=2).name == "journal") + self.assertTrue(fc("Search", nr=0) is not fc("Search", nr=1)) form["topic"] = "foo" - self.assert_(form["topic"] == "foo") + self.assertTrue(form["topic"] == "foo") form["author"] = "bar" form["journal"] = "" form["address"] = "baz" form["languagetype"] = ["English", "Catalan"] - self.assert_(form["languagetype"] == ["English", "Catalan"]) + self.assertTrue(form["languagetype"] == ["English", "Catalan"]) form["titleonly"] = ["on"] - self.assert_(form["titleonly"] == ["on"]) + self.assertTrue(form["titleonly"] == ["on"]) pairs = form.click_pairs("Search") - self.assert_(pairs == [ + self.assertTrue(pairs == [ ("SID", "PMrU0IJYy4MAAELSXic_E2011300_PMrU0IJYy4MAAELSXic-0"), ("SESSION_DIR", ""), ("Search.x", "1"), ("Search.y", "1"), @@ -2552,14 +2552,14 @@ hide_deprecations() pvs = form.possible_items("languagetype") - self.assert_(pvs[0] == "All languages") - self.assert_(len(pvs) == 47) + self.assertTrue(pvs[0] == "All languages") + self.assertTrue(len(pvs) == 47) self.assertRaises( ItemNotFoundError, lambda form=form: form.toggle("d'oh", "languagetype")) form.toggle("English", "languagetype") - self.assert_(form["languagetype"] == ["Catalan"]) + self.assertTrue(form["languagetype"] == ["Catalan"]) self.assertRaises(TypeError, form.toggle, ["Catalan"], "languagetype") self.assertRaises(TypeError, form.toggle, "Catalan", ["languagetype"]) @@ -2569,15 +2569,15 @@ # multiple select form["languagetype"] = [] - self.assert_(form["languagetype"] == []) + self.assertTrue(form["languagetype"] == []) form.set(True, "Catalan", "languagetype") - self.assert_(form["languagetype"] == ["Catalan"]) + self.assertTrue(form["languagetype"] == ["Catalan"]) form.set(True, "English", "languagetype") - self.assert_(form["languagetype"] == ["English", "Catalan"]) + self.assertTrue(form["languagetype"] == ["English", "Catalan"]) form.set(False, "English", "languagetype") - self.assert_(form["languagetype"] == ["Catalan"]) + self.assertTrue(form["languagetype"] == ["Catalan"]) form.set(False, "Catalan", "languagetype") - self.assert_(form["languagetype"] == []) + self.assertTrue(form["languagetype"] == []) self.assertRaises(ItemNotFoundError, form.set, True, "doh", "languagetype") self.assertRaises(ItemNotFoundError, form.set, False, "doh", "languagetype") self.assertRaises(ControlNotFoundError, form.set, True, "blah", "oops") @@ -2588,7 +2588,7 @@ def setitem(name, value, form=form): form[name] = value form["languagetype"] = ["Catalan"] - self.assert_(form["languagetype"] == ["Catalan"]) + self.assertTrue(form["languagetype"] == ["Catalan"]) self.assertRaises(ItemNotFoundError, setitem, "languagetype", ["doh"]) self.assertRaises(ControlNotFoundError, setitem, "oops", ["blah"]) @@ -2596,13 +2596,13 @@ # single select form["Sort"] = [] - self.assert_(form["Sort"] == []) + self.assertTrue(form["Sort"] == []) form.set(True, "Relevance", "Sort") - self.assert_(form["Sort"] == ["Relevance"]) + self.assertTrue(form["Sort"] == ["Relevance"]) form.set(True, "Times Cited", "Sort") - self.assert_(form["Sort"] == ["Times Cited"]) + self.assertTrue(form["Sort"] == ["Times Cited"]) form.set(False, "Times Cited", "Sort") - self.assert_(form["Sort"] == []) + self.assertTrue(form["Sort"] == []) self.assertRaises(ItemNotFoundError, form.set, True, "doh", "Sort") self.assertRaises(ItemNotFoundError, form.set, False, "doh", "Sort") self.assertRaises(ControlNotFoundError, form.set, True, "blah", "oops") @@ -2613,7 +2613,7 @@ reset_deprecations() form["Sort"] = ["Relevance"] - self.assert_(form["Sort"] == ["Relevance"]) + self.assertTrue(form["Sort"] == ["Relevance"]) self.assertRaises(ItemNotFoundError, setitem, "Sort", ["doh"]) self.assertRaises(ControlNotFoundError, setitem, "oops", ["blah"]) @@ -2924,13 +2924,13 @@ fh = self._get_test_file("Results.html") forms = mechanize.ParseFile(fh, self.base_uri, backwards_compat=False) - self.assert_(len(forms) == 1) + self.assertTrue(len(forms) == 1) form = forms[0] hide_deprecations() pvs = form.possible_items("marked_list_candidates") reset_deprecations() - self.assert_(pvs == [ + self.assertTrue(pvs == [ "000174872000059/1", "000174858300003/2", "000174827900006/3"]) def bad_setitem(form=form): form["marked_list_candidates"] = ["blah"] @@ -2958,11 +2958,11 @@ for i in range(len(keys)): key = keys[i] control = form.find_control(key, nr=0) - self.assert_(control.value == values[i]) - self.assert_(control.type == types[i]) + self.assertTrue(control.value == values[i]) + self.assertTrue(control.type == types[i]) pairs = form.click_pairs("Add all records retrieved to list") - self.assert_(pairs == [ + self.assertTrue(pairs == [ ("Add all records retrieved to list.x", "1"), ("Add all records retrieved to list.y", "1"), ("marked_list_candidates", pvs[0])]) @@ -2971,13 +2971,13 @@ fh = self._get_test_file("MarkedResults.html") forms = mechanize.ParseFile(fh, self.base_uri, backwards_compat=False) - self.assert_(len(forms) == 1) + self.assertTrue(len(forms) == 1) form = forms[0] pairs = form.click_pairs() # I've removed most of the INPUT elements from this page, and # corrected an HTML error - self.assert_(pairs == [ + self.assertTrue(pairs == [ ("Add marked records to list.x", "1"), ("Add marked records to list.y", "1"), ("marked_list_candidates", "000174872000059/1"), @@ -3076,12 +3076,12 @@ form = self.make_form() form.set_value(["v3"], type="select", kind="multilist") - self.assert_(form.get_value("d") == ["v3"]) + self.assertTrue(form.get_value("d") == ["v3"]) hide_deprecations() form.set_value(["l2"], type="select", kind="multilist", by_label=True) - self.assert_(form.get_value("d", by_label=True) == ["l2"]) - - self.assert_(form.get_value( + self.assertTrue(form.get_value("d", by_label=True) == ["l2"]) + + self.assertTrue(form.get_value( "b", "radio", "singlelist", None, 0, False) == []) form.set_value(["One"], "b", by_label=True) self.assertEqual( @@ -3096,14 +3096,14 @@ def test_id(self): form = self.make_form() - self.assert_(form.find_control("c").id == "cselect") - self.assert_(form.find_control("a").id == "1a") - self.assert_(form.find_control("b").id is None) - - self.assert_(form.find_control(id="cselect").id == "cselect") + self.assertTrue(form.find_control("c").id == "cselect") + self.assertTrue(form.find_control("a").id == "1a") + self.assertTrue(form.find_control("b").id is None) + + self.assertTrue(form.find_control(id="cselect").id == "cselect") self.assertRaises(ControlNotFoundError, form.find_control, id="coption1") - self.assert_(form.find_control(id="1a").id == "1a") + self.assertTrue(form.find_control(id="1a").id == "1a") self.assertRaises(ControlNotFoundError, form.find_control, id="1") def test_single(self): @@ -3116,21 +3116,21 @@ form.set_single(False, 'e', by_label=True) self.assertEqual(form.get_value("e"), []) form.toggle_single("e", "checkbox", "list", nr=0) - self.assert_("1" in form.get_value("e")) + self.assertTrue("1" in form.get_value("e")) form.set_single(False, "e", "checkbox", "list", nr=0) - self.assert_("1" not in form.get_value("e")) + self.assertTrue("1" not in form.get_value("e")) form.set_single(True, "e", "checkbox", "list", nr=0) - self.assert_("1" in form.get_value("e")) + self.assertTrue("1" in form.get_value("e")) reset_deprecations() def test_possible_items(self): form = self.make_form() hide_deprecations() - self.assert_(form.possible_items("c") == ["1", "2", "3"]) - self.assert_(form.possible_items("d", by_label=True) == + self.assertTrue(form.possible_items("c") == ["1", "2", "3"]) + self.assertTrue(form.possible_items("d", by_label=True) == ["l1", "l2", "l3"]) - self.assert_(form.possible_items("a") == ["1", "2", "3"]) + self.assertTrue(form.possible_items("a") == ["1", "2", "3"]) self.assertEqual(form.possible_items('e', by_label=True), [None]) self.assertEqual(form.possible_items('a', by_label=True), @@ -3144,10 +3144,10 @@ form.set_all_readonly(True) for c in form.controls: - self.assert_(c.readonly) + self.assertTrue(c.readonly) form.set_all_readonly(False) for c in form.controls: - self.assert_(not c.readonly) + self.assertTrue(not c.readonly) def test_clear_all(self): form = self.make_form() @@ -3156,7 +3156,7 @@ form.set_all_readonly(False) form.clear_all() for c in form.controls: - self.assert_(not c.value) + self.assertTrue(not c.value) def test_clear(self): form = self.make_form() @@ -3171,21 +3171,21 @@ def test_attrs(self): form = self.make_form() - self.assert_(form.attrs["blah"] == "nonsense") - self.assert_(form.attrs["name"] == "formname") + self.assertTrue(form.attrs["blah"] == "nonsense") + self.assertTrue(form.attrs["name"] == "formname") a = form.find_control("a") self.assertRaises(AttributeError, getattr, a, 'attrs') hide_deprecations() - self.assert_(a.get_item_attrs("1")["blah"] == "spam") - self.assert_(a.get_item_attrs("2")["blah"] == "eggs") - self.assert_(not a.get_item_attrs("3").has_key("blah")) + self.assertTrue(a.get_item_attrs("1")["blah"] == "spam") + self.assertTrue(a.get_item_attrs("2")["blah"] == "eggs") + self.assertTrue("blah" not in a.get_item_attrs("3")) c = form.find_control("c") - self.assert_(c.attrs["blah"] == "foo") - self.assert_(c.get_item_attrs("1")["blah"] == "bar") - self.assert_(c.get_item_attrs("2")["blah"] == "baz") - self.assert_(not c.get_item_attrs("3").has_key("blah")) + self.assertTrue(c.attrs["blah"] == "foo") + self.assertTrue(c.get_item_attrs("1")["blah"] == "bar") + self.assertTrue(c.get_item_attrs("2")["blah"] == "baz") + self.assertTrue("blah" not in c.get_item_attrs("3")) reset_deprecations() def test_select_control_nr_and_label(self): @@ -3385,7 +3385,7 @@ def test_choose_boundary(self): bndy = _form.choose_boundary() ii = string.find(bndy, '.') - self.assert_(ii < 0) + self.assertTrue(ii < 0) def make_form(self): html = """\ @@ -3421,9 +3421,9 @@ fs = cgi.FieldStoRefactoringTool: Refactored ./test/test_date.py RefactoringTool: Refactored ./test/test_cookie.py RefactoringTool: No changes to ./test/test_api.py RefactoringTool: No changes to ./test.py RefactoringTool: No changes to ./test-tools/unittest/util.py RefactoringTool: Refactored ./test-tools/unittest/suite.py rage(StringIO(req.get_data()), CaseInsensitiveDict(header_items(req)), environ={"REQUEST_METHOD": "POST"}) - self.assert_(fs["user"].value == "john") - self.assert_(fs["data"].value == data) - self.assertEquals(fs["data"].filename, "") + self.assertTrue(fs["user"].value == "john") + self.assertTrue(fs["data"].value == data) + self.assertEqual(fs["data"].filename, "") def test_file_request_with_filename(self): import cgi @@ -3435,16 +3435,16 @@ data = "blah\nbaz\n" data_control.add_file(StringIO(data), filename="afilename") req = form.click() - self.assert_(get_header(req, "Content-type").startswith( + self.assertTrue(get_header(req, "Content-type").startswith( "multipart/form-data; boundary=")) # ...and check the resulting request is understood by cgi module fs = cgi.FieldStorage(StringIO(req.get_data()), CaseInsensitiveDict(header_items(req)), environ={"REQUEST_METHOD": "POST"}) - self.assert_(fs["user"].value == "john") - self.assert_(fs["data"].value == data) - self.assert_(fs["data"].filename == "afilename") + self.assertTrue(fs["user"].value == "john") + self.assertTrue(fs["data"].value == data) + self.assertTrue(fs["data"].filename == "afilename") def test_multipart_file_request(self): import cgi @@ -3469,7 +3469,7 @@ fs = cgi.FieldStorage(StringIO(req.get_data()), CaseInsensitiveDict(header_items(req)), environ={"REQUEST_METHOD": "POST"}) - self.assert_(fs["user"].value == "john") + self.assertTrue(fs["user"].value == "john") fss = fs["data"][None] filenames = "filenamea", "", "filenamec" @@ -3478,8 +3478,8 @@ fs = fss[i] filename = filenames[i] data = datas[i] - self.assert_(fs.filename == filename) - self.assert_(fs.value == data) + self.assertTrue(fs.filename == filename) + self.assertTrue(fs.value == data) def test_upload_data(self): form = self.make_form() @@ -3511,7 +3511,7 @@ </form></html>"""), ".") form = forms[1] data = form.click().get_data() - self.assertEquals(data, """\ + self.assertEqual(data, """\ --123\r Content-Disposition: form-data; name="spam"; filename=""\r Content-Type: application/octet-stream\r --- ./test/test_date.py (original) +++ ./test/test_date.py (refactored) @@ -92,8 +92,8 @@ bad = False if http2time(test) is not None: - print "http2time(%s) is not None" % (test,) - print "http2time(test)", http2time(test) + print("http2time(%s) is not None" % (test,)) + print("http2time(test)", http2time(test)) bad = True assert not bad --- ./test/test_cookie.py (original) +++ ./test/test_cookie.py (refactored) @@ -41,7 +41,7 @@ def non_equal_value(value): if value is None: new_value = "80" - elif isinstance(value, basestring): + elif isinstance(value, str): new_value = value + "1" elif isinstance(value, bool): new_value = not value @@ -55,6 +55,6 @@ assert new_value != value, value return new_value cookie = make_cookie() - for arg, default_value in cookie_args().iteritems(): + for arg, default_value in cookie_args().items(): new_value = non_equal_value(default_value) self.assertNotEqual(make_cookie(**{arg: new_value}), cookie) --- ./test-tools/unittest/suite.py (original) +++ ./test-tools/unittest/suite.py (refactored) @@ -51,7 +51,7 @@ self._tests.append(test) def addTests(self, tests): - if isinstance(tests, basestring): + RefactoringTool: Refactored ./test-tools/unittest/runner.py RefactoringTool: No changes to ./test-tools/unittest/result.py RefactoringTool: Refactored ./test-tools/unittest/main.py RefactoringTool: Refactored ./test-tools/unittest/loader.py RefactoringTool: Refactored ./test-tools/unittest/case.py if isinstance(tests, str): raise TypeError("tests must be an iterable of tests, not a string") for test in tests: self.addTest(test) --- ./test-tools/unittest/runner.py (original) +++ ./test-tools/unittest/runner.py (refactored) @@ -147,14 +147,14 @@ self.stream.writeln("Ran %d test%s in %.3fs" % (run, run != 1 and "s" or "", timeTaken)) self.stream.writeln() - results = map(len, (result.expectedFailures, + results = list(map(len, (result.expectedFailures, result.unexpectedSuccesses, - result.skipped)) + result.skipped))) expectedFails, unexpectedSuccesses, skipped = results infos = [] if not result.wasSuccessful(): self.stream.write("FAILED") - failed, errored = map(len, (result.failures, result.errors)) + failed, errored = list(map(len, (result.failures, result.errors))) if failed: infos.append("failures=%d" % failed) if errored: --- ./test-tools/unittest/main.py (original) +++ ./test-tools/unittest/main.py (refactored) @@ -68,7 +68,7 @@ argv=None, testRunner=None, testLoader=loader.defaultTestLoader, exit=True, verbosity=1): - if isinstance(module, basestring): + if isinstance(module, str): self.module = __import__(module) for part in module.split('.')[1:]: self.module = getattr(self.module, part) @@ -88,8 +88,8 @@ def usageExit(self, msg=None): if msg: - print msg - print self.USAGE % self.__dict__ + print(msg) + print(self.USAGE % self.__dict__) sys.exit(2) def parseArgs(self, argv): @@ -119,7 +119,7 @@ else: self.testNames = (self.defaultTest,) self.createTests() - except getopt.error, msg: + except getopt.error as msg: self.usageExit(msg) def createTests(self): @@ -162,7 +162,7 @@ def runTests(self): if self.testRunner is None: self.testRunner = runner.TextTestRunner - if isinstance(self.testRunner, (type, types.ClassType)): + if isinstance(self.testRunner, type): try: testRunner = self.testRunner(verbosity=self.verbosity) except TypeError: --- ./test-tools/unittest/loader.py (original) +++ ./test-tools/unittest/loader.py (refactored) @@ -162,7 +162,7 @@ testCaseNames = self.getTestCaseNames(testCaseClass) if not testCaseNames and hasattr(testCaseClass, 'runTest'): testCaseNames = ['runTest'] - loaded_suite = self.suiteClass(map(testCaseClass, testCaseNames)) + loaded_suite = self.suiteClass(list(map(testCaseClass, testCaseNames))) return loaded_suite def loadTestsFromModule(self, module, use_load_tests=True): @@ -250,7 +250,7 @@ prefix=self.testMethodPrefix): return attrname.startswith(prefix) and \ hasattr(getattr(testCaseClass, attrname), '__call__') - testFnNames = filter(isTestMethod, dir(testCaseClass)) + testFnNames = list(filter(isTestMethod, dir(testCaseClass))) if self.sortTestMethodsUsing: testFnNames.sort(key=_CmpToKey(self.sortTestMethodsUsing)) return testFnNames --- ./test-tools/unittest/case.py (original) +++ ./test-tools/unittest/case.py (refactored) @@ -125,7 +125,7 @@ return True expected_regexp = self.expected_regex - if isinstance(expected_regexp, basestring): + if isinstance(expected_regexp, str): expected_regexp = re.compile(expected_regexp) if not expected_regexp.search(str(exc_value)): raise self.failureException('"%s" does not match "%s"' % @@ -292,7 +292,7 @@ success = False try: self.setUp() - RefactoringTool: No changes to ./test-tools/unittest/__main__.py RefactoringTool: No changes to ./test-tools/unittest/__init__.py RefactoringTool: Refactored ./test-tools/twisted-localserver.py except SkipTest, e: + except SkipTest as e: result.addSkip(self, str(e)) except Exception: result.addError(self, sys.exc_info()) @@ -301,11 +301,11 @@ testMethod() except self.failureException: result.addFailure(self, sys.exc_info()) - except _ExpectedFailure, e: + except _ExpectedFailure as e: result.addExpectedFailure(self, e.exc_info) except _UnexpectedSuccess: result.addUnexpectedSuccess(self) - except SkipTest, e: + except SkipTest as e: result.addSkip(self, str(e)) except Exception: result.addError(self, sys.exc_info()) @@ -569,7 +569,7 @@ elements = (seq_type_name.capitalize(), seq1_repr, seq2_repr) differing = '%ss differ: %s != %s\n' % elements - for i in xrange(min(len1, len2)): + for i in range(min(len1, len2)): try: item1 = seq1[i] except (TypeError, IndexError, NotImplementedError): @@ -657,16 +657,16 @@ """ try: difference1 = set1.difference(set2) - except TypeError, e: + except TypeError as e: self.fail('invalid type when attempting set difference: %s' % e) - except AttributeError, e: + except AttributeError as e: self.fail('first argument does not support set difference: %s' % e) try: difference2 = set2.difference(set1) - except TypeError, e: + except TypeError as e: self.fail('invalid type when attempting set difference: %s' % e) - except AttributeError, e: + except AttributeError as e: self.fail('second argument does not support set difference: %s' % e) if not (difference1 or difference2): @@ -710,8 +710,8 @@ self.fail(self._formatMessage(msg, standardMsg)) def assertDictEqual(self, d1, d2, msg=None): - self.assert_(isinstance(d1, dict), 'First argument is not a dictionary') - self.assert_(isinstance(d2, dict), 'Second argument is not a dictionary') + self.assertTrue(isinstance(d1, dict), 'First argument is not a dictionary') + self.assertTrue(isinstance(d2, dict), 'Second argument is not a dictionary') if d1 != d2: standardMsg = ('\n' + '\n'.join(difflib.ndiff( @@ -723,7 +723,7 @@ """Checks whether actual is a superset of expected.""" missing = [] mismatched = [] - for key, value in expected.iteritems(): + for key, value in expected.items(): if key not in actual: missing.append(key) elif value != actual[key]: @@ -775,9 +775,9 @@ def assertMultiLineEqual(self, first, second, msg=None): """Assert that two multi-line strings are equal.""" - self.assert_(isinstance(first, basestring), ( + self.assertTrue(isinstance(first, str), ( 'First argument is not a string')) - self.assert_(isinstance(second, basestring), ( + self.assertTrue(isinstance(second, str), ( 'Second argument is not a string')) if first != second: @@ -852,7 +852,7 @@ with_(context, lambda: callable_obj(*args, **kwargs)) def assertRegexpMatches(self, text, expected_regex, msg=None): - if isinstance(expected_regex, basestring): + if isinstance(expected_regex, str): expected_regex = re.compile(expected_regex) if not expected_regex.search(text): msg = msg or "Regexp didn't match" --- ./test-tools/twisted-localserver.py (original) +++ ./test-tools/twisted-localserver.py (refactored) @@ -161,7 +161,7 @@ return resource.Resource.locateChild(self, request, segments) def render(self, ctx): - print "render" + print("render") return http.RespoRefactoringTool: No changes to ./test-tools/twisted-ftpserver.py RefactoringTool: Refactored ./test-tools/testprogram.py RefactoringTool: Refactored ./test-tools/linecache_copy.py RefactoringTool: No changes to ./test-tools/functools_copy.py RefactoringTool: Refactored ./test-tools/doctest.py nse(responsecode.FORBIDDEN) --- ./test-tools/testprogram.py (original) +++ ./test-tools/testprogram.py (refactored) @@ -35,7 +35,7 @@ import sys import time import unittest -import urllib +import urllib.request, urllib.parse, urllib.error import mechanize import mechanize._rfc3986 @@ -151,7 +151,7 @@ report_hook("forcefully killing") try: os.kill(pid, signal.SIGKILL) - except OSError, exc: + except OSError as exc: if exc.errno != errno.ECHILD: raise finally: @@ -166,7 +166,7 @@ ServerProcess.__init__(self, path, name) self.uri = uri authority = mechanize._rfc3986.urlsplit(uri)[1] - host, port = urllib.splitport(authority) + host, port = urllib.parse.splitport(authority) if port is None: port = "80" self.port = int(port) @@ -247,7 +247,7 @@ def add_attributes_to_test_cases(suite, attributes): for test in suite: if isinstance(test, unittest.TestCase): - for name, value in attributes.iteritems(): + for name, value in attributes.items(): setattr(test, name, value) else: try: --- ./test-tools/linecache_copy.py (original) +++ ./test-tools/linecache_copy.py (refactored) @@ -45,7 +45,7 @@ (This is not checked upon each call!)""" if filename is None: - filenames = cache.keys() + filenames = list(cache.keys()) else: if filename in cache: filenames = [filename] @@ -78,7 +78,7 @@ fullname = filename try: stat = os.stat(fullname) - except os.error, msg: + except os.error as msg: basename = os.path.split(filename)[1] # Try for a __loader__, if available @@ -124,7 +124,7 @@ fp = open(fullname, 'rU') lines = fp.readlines() fp.close() - except IOError, msg: + except IOError as msg: ## print '*** Cannot open', fullname, ':', msg return [] size, mtime = stat.st_size, stat.st_mtime --- ./test-tools/doctest.py (original) +++ ./test-tools/doctest.py (refactored) @@ -99,7 +99,7 @@ import sys, traceback, inspect, linecache_copy, os, re, types import unittest, difflib, pdb, tempfile import warnings -from StringIO import StringIO +from io import StringIO # Don't whine about the deprecated is_private function in this # module's tests. @@ -232,7 +232,7 @@ """ if inspect.ismodule(module): return module - elif isinstance(module, (str, unicode)): + elif isinstance(module, str): return __import__(module, globals(), locals(), ["*"]) elif module is None: return sys.modules[sys._getframe(depth).f_globals['__name__']] @@ -379,9 +379,9 @@ # [XX] Normalize with respect to os.path.pardir? def _module_relative_path(module, path): if not inspect.ismodule(module): - raise TypeError, 'Expected a module: %r' % module + raise TypeError('Expected a module: %r' % module) if path.startswith('/'): - raise ValueError, 'Module-relative files may not have absolute paths' + raise ValueError('Module-relative files may not have absolute paths') # Find the base directory for the path. if hasattr(module, '__file__'): @@ -495,7 +495,7 @@ Create a new DocTest containing the given examples. The DocTest's globals are initialized with a copy of `globs`. """ - assert not isinstance(examples, basestring), \ + assert not isinstance(examples, str), \ "DocTest no longer accepts str; use DocTestParser instead" self.examples = examples self.docstring = docstring @@ -889,7 +889,7 @@ if module is None: return True elif inspect.isfunction(object): - return module.__dict__ is object.func_globals + return module.__dict__ is object.__globals__ elif inspect.isclass(object): return module.__name__ == object.__module__ elif inspect.getmodule(object) is not None: @@ -907,7 +907,7 @@ add them to `tests`. """ if self._verbose: - print 'Finding tests in %s' % name + print('Finding tests in %s' % name) # If we've already processed this object, then ignore it. if id(obj) in seen: @@ -921,7 +921,7 @@ # Look for tests in a module's contained objects. if inspect.ismodule(obj) and self._recurse: - for valname, val in obj.__dict__.items(): + for valname, val in list(obj.__dict__.items()): # Check if this contained object should be ignored. if self._filter(val, name, valname): continue @@ -934,14 +934,14 @@ # Look for tests in a module's __test__ dictionary. if inspect.ismodule(obj) and self._recurse: - for valname, val in getattr(obj, '__test__', {}).items(): - if not isinstance(valname, basestring): + for valname, val in list(getattr(obj, '__test__', {}).items()): + if not isinstance(valname, str): raise ValueError("DocTestFinder.find: __test__ keys " "must be strings: %r" % (type(valname),)) if not (inspect.isfunction(val) or inspect.isclass(val) or inspect.ismethod(val) or inspect.ismodule(val) or - isinstance(val, basestring)): + isinstance(val, str)): raise ValueError("DocTestFinder.find: __test__ values " "must be strings, functions, methods, " "classes, or modules: %r" % @@ -952,7 +952,7 @@ # Look for tests in a class's contained objects. if inspect.isclass(obj) and self._recurse: - for valname, val in obj.__dict__.items(): + for valname, val in list(obj.__dict__.items()): # Check if this contained object should be ignored. if self._filter(val, name, valname): continue @@ -960,7 +960,7 @@ if isinstance(val, staticmethod): val = getattr(obj, valname) if isinstance(val, classmethod): - val = getattr(obj, valname).im_func + val = getattr(obj, valname).__func__ # Recurse to methods, properties, and nested classes. if ((inspect.isfunction(val) or inspect.isclass(val) or @@ -977,7 +977,7 @@ """ # Extract the object's docstring. If it doesn't have one, # then return None (no test for this object). - if isinstance(obj, basestring): + if isinstance(obj, str): docstring = obj else: try: @@ -985,7 +985,7 @@ docstring = '' else: docstring = obj.__doc__ - if not isinstance(docstring, basestring): + if not isinstance(docstring, str): docstring = str(docstring) except (TypeError, AttributeError): docstring = '' @@ -1032,8 +1032,8 @@ break # Find the line number for functions & methods. - if inspect.ismethod(obj): obj = obj.im_func - if inspect.isfunction(obj): obj = obj.func_code + if inspect.ismethod(obj): obj = obj.__func__ + if inspect.isfunction(obj): obj = obj.__code__ if inspect.istraceback(obj): obj = obj.tb_frame if inspect.isframe(obj): obj = obj.f_code if inspect.iscode(obj): @@ -1226,7 +1226,7 @@ # to modify them). original_optionflags = self.optionflags - SUCCESS, FAILURE, BOOM = range(3) # `outcome` state + SUCCESS, FAILURE, BOOM = list(range(3)) # `outcome` state check = self._checker.check_output @@ -1241,7 +1241,7 @@ # Merge in the example's options. self.optionflags = original_optionflags if example.options: - for (optionflag, val) in example.options.items(): + for (optionflag, val) in list(example.options.items()): if val: self.optionflags |= optionflag else: @@ -1266,8 +1266,8 @@ # keyboard interrupts.) try: # Don't blink! This is where the user's code gets run. - exec compile(example.source, filename, "single", - compileflags, 1) in test.globs + exec(compile(example.source, filename, "single", + compileflags, 1), test.globs) self.debugger.set_continue() # ==== Example Finished ==== exception = None except KeyboardInterrupt: @@ -1428,7 +1428,7 @@ passed = [] failed = [] totalt = totalf = 0 - for x in self._name2ft.items(): + for x in list(self._name2ft.items()): name, (f, t) = x assert f <= t totalt += t @@ -1441,28 +1441,28 @@ failed.append(x) if verbose: if notests: - print len(notests), "items had no tests:" + print(len(notests), "items had no tests:") notests.sort() for thing in notests: - print " ", thing + print(" ", thing) if passed: - print len(passed), "items passed all tests:" + print(len(passed), "items passed all tests:") passed.sort() for thing, count in passed: - print " %3d tests in %s" % (count, thing) + print(" %3d tests in %s" % (count, thing)) if failed: - print self.DIVIDER - print len(failed), "items had failures:" + print(self.DIVIDER) + print(len(failed), "items had failures:") failed.sort() for thing, (f, t) in failed: - print " %3d of %3d in %s" % (f, t, thing) + print(" %3d of %3d in %s" % (f, t, thing)) if verbose: - print totalt, "tests in", len(self._name2ft), "items." - print totalt - totalf, "passed and", totalf, "failed." + print(totalt, "tests in", len(self._name2ft), "items.") + print(totalt - totalf, "passed and", totalf, "failed.") if totalf: - print "***Test Failed***", totalf, "failures." + print("***Test Failed***", totalf, "failures.") elif verbose: - print "Test passed." + print("Test passed.") return totalf, totalt #///////////////////////////////////////////////////////////////// @@ -1470,10 +1470,10 @@ #///////////////////////////////////////////////////////////////// def merge(self, other): d = self._name2ft - for name, (f, t) in other._name2ft.items(): + for name, (f, t) in list(other._name2ft.items()): if name in d: - print "*** DocTestRunner.merge: '" + name + "' in both" \ - " testers; summing outcomes." + print("*** DocTestRunner.merge: '" + name + "' in both" \ + " testers; summing outcomes.") f2, t2 = d[name] f = f + f2 t = t + t2 @@ -2050,10 +2050,10 @@ def runstring(self, s, name): test = DocTestParser().get_doctest(s, self.globs, name, None, None) if self.verbose: - print "Running string", name + print("Running string", name) (f,t) = self.testrunner.run(test) if self.verbose: - print f, "of", t, "examples failed in string", name + print(f, "of", t, "examples failed in string", name) return (f,t) def rundoc(self, object, name=None, module=None): @@ -2567,9 +2567,9 @@ ifRefactoringTool: No changes to ./setup.py RefactoringTool: Refactored ./release.py RefactoringTool: Refactored ./mechanize/_urllib2_fork.py pm: try: - execfile(srcfilename, globs, globs) + exec(compile(open(srcfilename, "rb").read(), srcfilename, 'exec'), globs, globs) except: - print sys.exc_info()[1] + print(sys.exc_info()[1]) pdb.post_mortem(sys.exc_info()[2]) else: # Note that %r is vital here. '%s' instead can, e.g., cause --- ./release.py (original) +++ ./release.py (refactored) @@ -187,7 +187,7 @@ bogus_version = release.parse_version("0.0.0") try: check_version_equals(env, bogus_version, python) - except WrongVersionError, exc: + except WrongVersionError as exc: if exc.version is not None: raise else: @@ -373,7 +373,7 @@ self._set_next_release_version() def print_next_tag(self, log): - print self._release_version + print(self._release_version) def _verify_version(self, path): if str(self._release_version) not in \ @@ -664,7 +664,7 @@ self._env.cmd(["readlink", "-e", full_path], stdout=open(os.devnull, "w")) except cmd_env.CommandFailedError: - print "not staging (does not exist):", full_path + print("not staging (does not exist):", full_path) return if dest_basename is None: dest_basename = os.path.basename(path) @@ -672,10 +672,10 @@ try: self._env.cmd(["cmp", full_path, dest]) except cmd_env.CommandFailedError: - print "staging: %s -> %s" % (full_path, dest) + print("staging: %s -> %s" % (full_path, dest)) self._env.cmd(["cp", full_path, dest]) else: - print "not staging (unchanged): %s -> %s" % (full_path, dest) + print("not staging (unchanged): %s -> %s" % (full_path, dest)) def ensure_unmodified(self, log): if self._build_tools_path: @@ -909,7 +909,7 @@ re.match("^ \* Update (?:changelog|version)$", line, re.I)) self._in_release_dir.cmd(cmd_env.write_file_cmd( - "announce_email.txt", u"""\ + "announce_email.txt", """\ ANN: mechanize {version} released http://wwwsearch.sourceforge.net/mechanize/ --- ./mechanize/_urllib2_fork.py (original) +++ ./mechanize/_urllib2_fork.py (refactored) @@ -30,7 +30,7 @@ import copy import base64 -import httplib +import http.client import email.message import logging import os @@ -40,14 +40,14 @@ import socket import sys import time -import urllib -import urlparse +import urllib.request, urllib.parse, urllib.error +import urllib.parse import bisect try: - from cStringIO import StringIO + from io import StringIO except ImportError: - from StringIO import StringIO + from io import StringIO try: import hashlib @@ -93,18 +93,15 @@ from urllib import (unwrap, unquote, splittype, quote, addinfourl, splitport, splitattr, ftpwrapper, splituser, splitpasswd, splitvalue) - -# support for FileHandler, proxies via environment variables -from urllib import localhost, url2pathname, getproxies - -from urllib2 import HTTPError, URLError - -import _request -import _rfc3986 -import _sockettimeout - -from _clientcookie import CookieJar -from _response import closeable_response +from urllib.request import url2pathname +from urllib.error import HTTPError, URLError + +from . import _request +from . import _rfc3986 +from . import _sockettimeout + +from ._clientcookie import CookieJar +from ._response import closeable_response # used in User-Agent header sent @@ -131,7 +128,7 @@ """ url = request.get_full_url() - host = urlparse.urlparse(url)[1] + host = urllib.parse.urlparse(url)[1] if host == "": host = request.get_header("Host", "") @@ -152,7 +149,7 @@ self._tunnel_host = None self.data = data self.headers = {} - for key, value in headers.items(): + for key, value in list(headers.items()): self.add_header(key, value) self.unredirected_hdrs = {} if origin_req_host is None: @@ -170,7 +167,7 @@ if hasattr(Request, 'get_' + name): getattr(self, 'get_' + name)() return getattr(self, attr) - raise AttributeError, attr + raise AttributeError(attr) def get_method(self): if self.has_data(): @@ -196,7 +193,7 @@ if self.type is None: self.type, self.__r_type = splittype(self.__original) if self.type is None: - raise ValueError, "unknown url type: %s" % self.__original + raise ValueError("unknown url type: %s" % self.__original) return self.type def get_host(self): @@ -255,7 +252,7 @@ def header_items(self): hdrs = self.unredirected_hdrs.copy() hdrs.update(self.headers) - return hdrs.items() + return list(hdrs.items()) class OpenerDirector: def __init__(self): @@ -384,7 +381,7 @@ """ import types def isclass(obj): - return isinstance(obj, (types.ClassType, type)) + return isinstance(obj, type) opener = OpenerDirector() default_classes = [ProxyHandler, UnknownHandler, HTTPHandler, @@ -660,7 +657,7 @@ assert hasattr(proxies, 'has_key'), "proxies must be a mapping" self.proxies = proxies - for type, url in proxies.items(): + for type, url in list(proxies.items()): setattr(self, '%s_open' % type, lambda r, proxy=url, type=type, meth=self.proxy_open: \ meth(r, proxy, type)) @@ -704,7 +701,7 @@ def add_password(self, realm, uri, user, passwd): # uri could be a single URI or a sequence - if isinstance(uri, basestring): + if isinstance(uri, str): uri = [uri] if not realm in self.passwd: self.passwd[realm] = {} @@ -717,7 +714,7 @@ domains = self.passwd.get(realm, {}) for default_port in True, False: reduced_authuri = self.reduce_uri(authuri, default_port) - for uris, authinfo in domains.iteritems(): + for uris, authinfo in domains.items(): for uri in uris: if self.is_suburi(uri, reduced_authuri): return authinfo @@ -726,7 +723,7 @@ def reduce_uri(self, uri, default_port=True): """Accept authority or URI and extract only the authority and path.""" # note HTTP URLs do not have a userinfo component - parts = urlparse.urlsplit(uri) + parts = urllib.parse.urlsplit(uri) if parts[1]: # URI scheme = parts[0] @@ -1010,7 +1007,7 @@ handler_order = 490 # before Basic auth def http_error_401(self, req, fp, code, msg, headers): - host = urlparse.urlparse(req.get_full_url())[1] + host = urllib.parse.urlparse(req.get_full_url())[1] retry = self.http_error_auth_reqed('www-authenticate', host, req, headers) self.reset_retry_count() @@ -1097,7 +1094,7 @@ # request. headers["Connection"] = "close" headers = dict( - (name.title(), val) for name, val in headers.items()) + (name.title(), val) for name, val in list(headers.items())) if req._tunnel_host: if not hasattr(h, "set_tunnel"): @@ -1114,7 +1111,7 @@ try: h.request(req.get_method(), req.get_selector(), req.data, headers) r = h.getresponse() - except socket.error, err: # XXX what error? + except socket.error as err: # XXX what error? raise URLError(err) # Pick apart the HTTPResponse object to get the addinfourl @@ -1139,7 +1136,7 @@ class HTTPHandler(AbstractHTTPHandler): def http_open(self, req): - return self.do_open(httplib.HTTPConnection, req) + return self.do_open(http.client.HTTPConnection, req) http_request = AbRefactoringTool: Refactored ./mechanize/_response.py stractHTTPHandler.do_request_ @@ -1150,7 +1147,7 @@ self._key_file = key_file self._cert_file = cert_file def __call__(self, hostport): - return httplib.HTTPSConnection( + return http.client.HTTPSConnection( hostport, key_file=self._key_file, cert_file=self._cert_file) @@ -1166,7 +1163,7 @@ req.get_full_url()) conn_factory = HTTPSConnectionFactory(key_file, cert_file) else: - conn_factory = httplib.HTTPSConnection + conn_factory = http.client.HTTPSConnection return self.do_open(conn_factory, req) https_request = AbstractHTTPHandler.do_request_ @@ -1299,7 +1296,7 @@ (not port and socket.gethostbyname(host) in self.get_names()): return addinfourl(open(localfile, 'rb'), headers, 'file:'+file) - except OSError, msg: + except OSError as msg: # urllib2 users shouldn't expect OSErrors coming from urlopen() raise URLError(msg) raise URLError('file not on local host') @@ -1329,11 +1326,11 @@ try: host = socket.gethostbyname(host) - except socket.error, msg: + except socket.error as msg: raise URLError(msg) path, attrs = splitattr(req.get_selector()) dirs = path.split('/') - dirs = map(unquote, dirs) + dirs = list(map(unquote, dirs)) dirs, file = dirs[:-1], dirs[-1] if dirs and not dirs[0]: dirs = dirs[1:] @@ -1355,8 +1352,8 @@ sf = StringIO(headers) headers = email.message.Message(sf) return addinfourl(fp, headers, req.get_full_url()) - except ftplib.all_errors, msg: - raise URLError, ('ftp error: %s' % msg), sys.exc_info()[2] + except ftplib.all_errors as msg: + raise URLError('ftp error: %s' % msg).with_traceback(sys.exc_info()[2]) def connect_ftp(self, user, passwd, host, port, dirs, timeout): try: @@ -1397,7 +1394,7 @@ # first check for old ones t = time.time() if self.soonest <= t: - for k, v in self.timeout.items(): + for k, v in list(self.timeout.items()): if v < t: self.cache[k].close() del self.cache[k] @@ -1406,7 +1403,7 @@ # then check the size if len(self.cache) == self.max_conns: - for k, v in self.timeout.items(): + for k, v in list(self.timeout.items()): if v == self.soonest: del self.cache[k] del self.timeout[k] --- ./mechanize/_response.py (original) +++ ./mechanize/_response.py (refactored) @@ -16,8 +16,8 @@ """ -import copy, email.message, urllib2 -from cStringIO import StringIO +import copy, email.message, urllib.request, urllib.error, urllib.parse +from io import StringIO def len_of_seekable(file_): @@ -239,7 +239,7 @@ return data def __iter__(self): return self - def next(self): + def __next__(self): line = self.readline() if line == "": raise StopIteration return line @@ -294,7 +294,7 @@ def read(self, size=-1): return "" def readline(self, size=-1): return "" def __iter__(self): return self - def next(self): return "" + def __next__(self): return "" def close(self): pass class eofresponse(eoffile): @@ -351,7 +351,7 @@ else: self.fileno = lambda: None self.__iter__ = self.fp.__iter__ - self.next = self.fp.next + self.next = self.fp.__next__ def __repr__(self): return '<%s at %s whose fp = %r>' % ( @@ -432,7 +432,7 @@ def get_seek_wrapper_class(response): # in order to wrap response objects that are also exceptions, we must # dynamically subclass the exception :-((( - if (isinstance(response, urllib2.HTTPError) and + if (isinstRefactoringTool: Refactored ./mechanize/_http.py ance(response, urllib.error.HTTPError) and not hasattr(response, "seek")): if response.__class__.__module__ == "__builtin__": exc_class_name = response.__class__.__name__ --- ./mechanize/_http.py (original) +++ ./mechanize/_http.py (refactored) @@ -12,23 +12,23 @@ """ -import HTMLParser -from cStringIO import StringIO -import htmlentitydefs +import html.parser +from io import StringIO +import html.entities import logging -import robotparser +import urllib.robotparser import socket import time -import _sgmllib_copy as sgmllib -from _urllib2_fork import HTTPError, BaseHandler - -from _headersutil import is_html -from _html import unescape, unescape_charref -from _request import Request -from _response import response_seek_wrapper -import _rfc3986 -import _sockettimeout +from . import _sgmllib_copy as sgmllib +from ._urllib2_fork import HTTPError, BaseHandler + +from ._headersutil import is_html +from ._html import unescape, unescape_charref +from ._request import Request +from ._response import response_seek_wrapper +from . import _rfc3986 +from . import _sockettimeout debug = logging.getLogger("mechanize").debug debug_robots = logging.getLogger("mechanize.robots").debug @@ -51,7 +51,7 @@ head_elems = ("html", "head", "title", "base", "script", "style", "meta", "link", "object") - _entitydefs = htmlentitydefs.name2codepoint + _entitydefs = html.entities.name2codepoint _encoding = DEFAULT_ENCODING def __init__(self): @@ -86,7 +86,7 @@ def unescape_attrs(self, attrs): #debug("%s", attrs) escaped_attrs = {} - for key, val in attrs.items(): + for key, val in list(attrs.items()): escaped_attrs[key] = self.unescape_attr(val) return escaped_attrs @@ -98,9 +98,9 @@ class XHTMLCompatibleHeadParser(AbstractHeadParser, - HTMLParser.HTMLParser): + html.parser.HTMLParser): def __init__(self): - HTMLParser.HTMLParser.__init__(self) + html.parser.HTMLParser.__init__(self) AbstractHeadParser.__init__(self) def handle_starttag(self, tag, attrs): @@ -201,7 +201,7 @@ self.head_parser_class()) finally: response.seek(0) - except (HTMLParser.HTMLParseError, + except (html.parser.HTMLParseError, sgmllib.SGMLParseError): pass else: @@ -216,15 +216,15 @@ https_response = http_response -class MechanizeRobotFileParser(robotparser.RobotFileParser): +class MechanizeRobotFileParser(urllib.robotparser.RobotFileParser): def __init__(self, url='', opener=None): - robotparser.RobotFileParser.__init__(self, url) + urllib.robotparser.RobotFileParser.__init__(self, url) self._opener = opener self._timeout = _sockettimeout._GLOBAL_DEFAULT_TIMEOUT def set_opener(self, opener=None): - import _opener + from . import _opener if opener is None: opener = _opener.OpenerDirector() self._opener = opener @@ -240,9 +240,9 @@ timeout=self._timeout) try: f = self._opener.open(req) - except HTTPError, f: + except HTTPError as f: pass - except (IOError, socket.error, OSError), exc: + except (IOError, socket.error, OSError) as exc: debug_robots("ignoring error opening %r: %s" % (self.url, exc)) return @@ -264,7 +264,7 @@ class RobotExclusionError(HTTPError): def __init__(self, request, *args): - apply(HTTPError.__init__, (self,)+args) + HTTPError.__init__(*(self,)+args) self.request = request class HTTPRobotRulesProcessor(BaseHandler): @@ -272,7 +272,7 @@ handler_order = 800 try: - from httplib import HTTPMessage + from http.client import HTTPMessage excRefactoringTool: No changes to ./mechanize/_version.py RefactoringTool: Refactored ./mechanize/_util.py RefactoringTool: Refactored ./mechanize/_useragent.py RefactoringTool: Refactored ./mechanize/_urllib2.py RefactoringTool: Refactored ./mechanize/_testcase.py RefactoringTool: No changes to ./mechanize/_sockettimeout.py RefactoringTool: Refactored ./mechanize/_sgmllib_copy.py ept: from email.message import Message http_response_class = Message @@ -421,7 +421,7 @@ def http_response(self, request, response): code, msg, hdrs = response.code, response.msg, response.info() - if code == 200 and hdrs.has_key("refresh"): + if code == 200 and "refresh" in hdrs: refresh = hdrs.getheaders("refresh")[0] try: pause, newurl = parse_refresh_header(refresh) --- ./mechanize/_util.py (original) +++ ./mechanize/_util.py (refactored) @@ -115,7 +115,7 @@ timezone_re = re.compile(r"^([-+])?(\d\d?):?(\d\d)?$") def offset_from_tz_string(tz): offset = None - if UTC_ZONES.has_key(tz): + if tz in UTC_ZONES: offset = 0 else: m = timezone_re.search(tz) --- ./mechanize/_useragent.py (original) +++ ./mechanize/_useragent.py (refactored) @@ -13,12 +13,12 @@ import warnings -import _auth -import _gzip -import _opener -import _response -import _sockettimeout -import _urllib2 +from . import _auth +from . import _gzip +from . import _opener +from . import _response +from . import _sockettimeout +from . import _urllib2 class UserAgentBase(_opener.OpenerDirector): @@ -97,7 +97,7 @@ self.default_features): klass = self.handler_classes[scheme] ua_handlers[scheme] = klass() - for handler in ua_handlers.itervalues(): + for handler in ua_handlers.values(): self.add_handler(handler) # Yuck. @@ -152,14 +152,14 @@ want[scheme] = None # get rid of scheme handlers we don't want - for scheme, oldhandler in self._ua_handlers.items(): + for scheme, oldhandler in list(self._ua_handlers.items()): if scheme.startswith("_"): continue # not a scheme handler if scheme not in want: self._replace_handler(scheme, None) else: del want[scheme] # already got it # add the scheme handlers that are missing - for scheme in want.keys(): + for scheme in list(want.keys()): self._set_handler(scheme, True) def set_cookiejar(self, cookiejar): --- ./mechanize/_urllib2.py (original) +++ ./mechanize/_urllib2.py (refactored) @@ -1,19 +1,15 @@ -# urllib2 work-alike interface -# ...from urllib2... -from urllib2 import \ - URLError, \ - HTTPError +from urllib.error import URLError, HTTPError # ...and from mechanize -from _auth import \ +from ._auth import \ HTTPProxyPasswordMgr, \ HTTPSClientCertMgr -from _debug import \ +from ._debug import \ HTTPResponseDebugProcessor, \ HTTPRedirectDebugProcessor # crap ATM ## from _gzip import \ ## HTTPGzipProcessor -from _urllib2_fork import \ +from ._urllib2_fork import \ AbstractBasicAuthHandler, \ AbstractDigestAuthHandler, \ BaseHandler, \ @@ -33,18 +29,18 @@ ProxyDigestAuthHandler, \ ProxyHandler, \ UnknownHandler -from _http import \ +from ._http import \ HTTPEquivProcessor, \ HTTPRefererProcessor, \ HTTPRefreshProcessor, \ HTTPRobotRulesProcessor, \ RobotExclusionError -import httplib +import http.client if hasattr(httplib, 'HTTPS'): - from _urllib2_fork import HTTPSHandler + from ._urllib2_fork import HTTPSHandler del httplib -from _opener import OpenerDirector, \ +from ._opener import OpenerDirector, \ SeekableResponseOpener, \ build_opener, install_opener, urlopen -from _request import \ +from ._request import \ Request --- ./mechanize/_testcase.py (original) +++ ./mechanize/_testcase.py (refactored) @@ -159,4 +159,4 @@ "Differences from golden files found.\n" "Try running with --meld to update golden files.\n" "%s" % stdout) - self.assertEquals(proc.wait(), 0) + self.assertEqual(proc.wait(), 0) --- ./mechanize/_sgmllib_copy.py (original) +++ ./mechanize/_sgmllib_copy.py (refactored) @@ -15,7 +15,7 @@ # stacklevel=2) # del warnpy3k -import maRefactoringTool: Refactored ./mechanize/_rfc3986.py RefactoringTool: Refactored ./mechanize/_request.py RefactoringTool: Refactored ./mechanize/_pullparser.py rkupbase +import _markupbase import re __all__ = ["SGMLParser", "SGMLParseError"] @@ -63,7 +63,7 @@ # chunks). Entity references are passed by calling # self.handle_entityref() with the entity reference as argument. -class SGMLParser(markupbase.ParserBase): +class SGMLParser(_markupbase.ParserBase): # Definition of entities -- derived classes may override entity_or_charref = re.compile('&(?:' '([a-zA-Z][-.a-zA-Z0-9]*)|#([0-9]+)' @@ -82,7 +82,7 @@ self.lasttag = '???' self.nomoretags = 0 self.literal = 0 - markupbase.ParserBase.reset(self) + _markupbase.ParserBase.reset(self) def setnomoretags(self): """Enter literal mode (CDATA) till EOF. @@ -393,8 +393,8 @@ # Example -- report an unbalanced </...> tag. def report_unbalanced(self, tag): if self.verbose: - print '*** Unbalanced </' + tag + '>' - print '*** Stack:', self.stack + print('*** Unbalanced </' + tag + '>') + print('*** Stack:', self.stack) def convert_charref(self, name): """Convert character reference, may be overridden.""" @@ -479,40 +479,40 @@ data = self.testdata if data: self.testdata = "" - print 'data:', repr(data) + print('data:', repr(data)) def handle_comment(self, data): self.flush() r = repr(data) if len(r) > 68: r = r[:32] + '...' + r[-32:] - print 'comment:', r + print('comment:', r) def unknown_starttag(self, tag, attrs): self.flush() if not attrs: - print 'start tag: <' + tag + '>' - else: - print 'start tag: <' + tag, + print('start tag: <' + tag + '>') + else: + print('start tag: <' + tag, end=' ') for name, value in attrs: - print name + '=' + '"' + value + '"', - print '>' + print(name + '=' + '"' + value + '"', end=' ') + print('>') def unknown_endtag(self, tag): self.flush() - print 'end tag: </' + tag + '>' + print('end tag: </' + tag + '>') def unknown_entityref(self, ref): self.flush() - print '*** unknown entity ref: &' + ref + ';' + print('*** unknown entity ref: &' + ref + ';') def unknown_charref(self, ref): self.flush() - print '*** unknown char ref: &#' + ref + ';' + print('*** unknown char ref: &#' + ref + ';') def unknown_decl(self, data): self.flush() - print '*** unknown decl: [' + data + ']' + print('*** unknown decl: [' + data + ']') def close(self): SGMLParser.close(self) @@ -541,8 +541,8 @@ else: try: f = open(file, 'r') - except IOError, msg: - print file, ":", msg + except IOError as msg: + print(file, ":", msg) sys.exit(1) data = f.read() --- ./mechanize/_rfc3986.py (original) +++ ./mechanize/_rfc3986.py (refactored) @@ -12,7 +12,7 @@ # XXX Wow, this is ugly. Overly-direct translation of the RFC ATM. -import re, urllib +import re, urllib.request, urllib.parse, urllib.error ## def chr_range(a, b): ## return "".join(map(chr, range(ord(a), ord(b)+1))) @@ -40,7 +40,7 @@ url = url.strip() # for second param to urllib.quote(), we want URI_CHARS, minus the # 'always_safe' characters that urllib.quote() never percent-encodes - return urllib.quote(url.encode(encoding), "!*'();:@&=+$,/?%#[]~") + return urllib.parse.quote(url.encode(encoding), "!*'();:@&=+$,/?%#[]~") def is_clean_uri(uri): """ --- ./mechanize/_request.py (original) +++ ./mechanize/_request.py (refactored) @@ -10,9 +10,9 @@ import logging -import _rfc3986 -import _sockettimeout -import _urllib2_fork +from . import _rfc3986 +from . import _sockettimeout +from . import _urllib2_fork warn = logging.getLogger("mechanize").warning --- ./mechanize/_pullparser.py (original) +++ ./mechanize/RefactoringTool: Refactored ./mechanize/_opener.py _pullparser.py (refactored) @@ -33,12 +33,12 @@ """ -import re, htmlentitydefs -import _sgmllib_copy as sgmllib -import HTMLParser +import re, html.entities +from . import _sgmllib_copy as sgmllib +import html.parser from xml.sax import saxutils -from _html import unescape, unescape_charref +from ._html import unescape, unescape_charref class NoMoreTokensError(Exception): pass @@ -197,7 +197,7 @@ self.textify = textify self.encoding = encoding if entitydefs is None: - entitydefs = htmlentitydefs.name2codepoint + entitydefs = html.entities.name2codepoint self._entitydefs = entitydefs def __iter__(self): return self @@ -209,7 +209,7 @@ return iter_until_exception(self.get_token, NoMoreTokensError, *tokentypes) - def next(self): + def __next__(self): try: return self.get_token() except NoMoreTokensError: @@ -363,9 +363,9 @@ escaped_attrs.append((key, self.unescape_attr(val))) return escaped_attrs -class PullParser(_AbstractParser, HTMLParser.HTMLParser): +class PullParser(_AbstractParser, html.parser.HTMLParser): def __init__(self, *args, **kwds): - HTMLParser.HTMLParser.__init__(self) + html.parser.HTMLParser.__init__(self) _AbstractParser.__init__(self, *args, **kwds) def unescape(self, name): # Use the entitydefs passed into constructor, not --- ./mechanize/_opener.py (original) +++ ./mechanize/_opener.py (refactored) @@ -8,7 +8,7 @@ """ -import os, urllib2, bisect, httplib, types, tempfile +import os, urllib.request, urllib.error, urllib.parse, bisect, http.client, types, tempfile try: import threading as _threading except ImportError: @@ -19,19 +19,19 @@ import sets set = sets.Set -from _request import Request -import _response -import _rfc3986 -import _sockettimeout -import _urllib2_fork -from _util import isstringlike +from ._request import Request +from . import _response +from . import _rfc3986 +from . import _sockettimeout +from . import _urllib2_fork +from ._util import isstringlike open_file = open -class ContentTooShortError(urllib2.URLError): +class ContentTooShortError(urllib.error.URLError): def __init__(self, reason, result): - urllib2.URLError.__init__(self, reason) + urllib.error.URLError.__init__(self, reason) self.result = result @@ -132,14 +132,14 @@ # sort indexed methods # XXX could be cleaned up for lookup in [process_request, process_response]: - for scheme, handlers in lookup.iteritems(): + for scheme, handlers in lookup.items(): lookup[scheme] = handlers - for scheme, lookup in handle_error.iteritems(): - for code, handlers in lookup.iteritems(): + for scheme, lookup in handle_error.items(): + for code, handlers in lookup.items(): handlers = list(handlers) handlers.sort() lookup[code] = handlers - for scheme, handlers in handle_open.iteritems(): + for scheme, handlers in handle_open.items(): handlers = list(handlers) handlers.sort() handle_open[scheme] = handlers @@ -218,13 +218,13 @@ meth_name = proto + '_error' http_err = 0 args = (dict, proto, meth_name) + args - result = apply(self._call_chain, args) + result = self._call_chain(*args) if result: return result if http_err: args = (dict, 'default', 'http_error_default') + orig_args - return apply(self._call_chain, args) + return self._call_chain(*args) BLOCK_SIZE = 1024*8 def retrieve(self, fullurl, filename=None, reporthook=None, data=None, @@ -317,7 +317,7 @@ success = True try: response = urlopen(fullurl, data, timeout) - except urllib2.HTTPError, error: + except urllib.error.HTTPError as error: RefactoringTool: Refactored ./mechanize/_msiecookiejar.py RefactoringTool: Refactored ./mechanize/_mozillacookiejar.py RefactoringTool: Refactored ./mechanize/_mechanize.py success = False if error.fp is None: # not a response raise @@ -350,7 +350,7 @@ def isclass(obj): - return isinstance(obj, (types.ClassType, type)) + return isinstance(obj, type) class OpenerFactory: --- ./mechanize/_msiecookiejar.py (original) +++ ./mechanize/_msiecookiejar.py (refactored) @@ -13,24 +13,24 @@ import os, re, time, struct, logging if os.name == "nt": - import _winreg - -from _clientcookie import FileCookieJar, CookieJar, Cookie, \ + import winreg + +from ._clientcookie import FileCookieJar, CookieJar, Cookie, \ MISSING_FILENAME_TEXT, LoadError debug = logging.getLogger("mechanize").debug def regload(path, leaf): - key = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, path, 0, - _winreg.KEY_ALL_ACCESS) + key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, path, 0, + winreg.KEY_ALL_ACCESS) try: - value = _winreg.QueryValueEx(key, leaf)[0] + value = winreg.QueryValueEx(key, leaf)[0] except WindowsError: value = None return value -WIN32_EPOCH = 0x019db1ded53e8000L # 1970 Jan 01 00:00:00 in Win32 FILETIME +WIN32_EPOCH = 0x019db1ded53e8000 # 1970 Jan 01 00:00:00 in Win32 FILETIME def epoch_time_offset_from_win32_filetime(filetime): """Convert from win32 filetime to seconds-since-epoch value. @@ -46,7 +46,7 @@ raise ValueError("filetime (%d) is before epoch (%d)" % (filetime, WIN32_EPOCH)) - return divmod((filetime - WIN32_EPOCH), 10000000L)[0] + return divmod((filetime - WIN32_EPOCH), 10000000)[0] def binary_to_char(c): return "%02X" % ord(c) def binary_to_str(d): return "".join(map(binary_to_char, list(d))) @@ -92,7 +92,7 @@ if key == "": break rl = cookies_fh.readline - def getlong(rl=rl): return long(rl().rstrip()) + def getlong(rl=rl): return int(rl().rstrip()) def getstr(rl=rl): return rl().rstrip() key = key.rstrip() @@ -346,7 +346,7 @@ """Return a list of cookies to be returned to server.""" domains = self._cookies.copy() domains.update(self._delayload_domains) - domains = domains.keys() + domains = list(domains.keys()) cookies = [] for domain in domains: @@ -364,7 +364,7 @@ def read_all_cookies(self): """Eagerly read in all cookies.""" if self.delayload: - for domain in self._delayload_domains.keys(): + for domain in list(self._delayload_domains.keys()): self._delayload_domain(domain) def load(self, filename, ignore_discard=False, ignore_expires=False, --- ./mechanize/_mozillacookiejar.py (original) +++ ./mechanize/_mozillacookiejar.py (refactored) @@ -11,7 +11,7 @@ import re, time, logging -from _clientcookie import reraise_unmasked_exceptions, FileCookieJar, Cookie, \ +from ._clientcookie import reraise_unmasked_exceptions, FileCookieJar, Cookie, \ MISSING_FILENAME_TEXT, LoadError debug = logging.getLogger("ClientCookie").debug --- ./mechanize/_mechanize.py (original) +++ ./mechanize/_mechanize.py (refactored) @@ -9,15 +9,15 @@ """ -import copy, re, os, urllib, urllib2 - -from _html import DefaultFactory -import _response -import _request -import _rfc3986 -import _sockettimeout -import _urllib2_fork -from _useragent import UserAgentBase +import copy, re, os, urllib.request, urllib.parse, urllib.error, urllib.request, urllib.error, urllib.parse + +from ._html import DefaultFactory +from . import _response +from . import _request +from . import _rfc3986 +from . import _sockettimeout +from . import _urllib2_fork +from ._useragent import UserAgentBase class BrowserStateError(Exception): pass class LinkNotFoundError(Exception): pass @@ -25,7 +25,7 @@ def sanepathname2url(path): - urlpath = urllib.pathname2url(path) + urlpath = urllib.request.pathname2url(path) if os.name == "nt" and urlpath.startswith("///"): urlpath = urlpathRefactoringTool: No changes to ./mechanize/_markupbase.py RefactoringTool: Refactored ./mechanize/_lwpcookiejar.py RefactoringTool: Refactored ./mechanize/_html.py [2:] # XXX don't ask me about the mac... @@ -228,7 +228,7 @@ success = True try: response = UserAgentBase.open(self, request, data) - except urllib2.HTTPError, error: + except urllib.error.HTTPError as error: success = False if error.fp is None: # not a response raise @@ -615,7 +615,7 @@ """ try: - return self._filter_links(self._factory.links(), **kwds).next() + return next(self._filter_links(self._factory.links(), **kwds)) except StopIteration: raise LinkNotFoundError() --- ./mechanize/_lwpcookiejar.py (original) +++ ./mechanize/_lwpcookiejar.py (refactored) @@ -20,10 +20,10 @@ import time, re, logging -from _clientcookie import reraise_unmasked_exceptions, FileCookieJar, Cookie, \ +from ._clientcookie import reraise_unmasked_exceptions, FileCookieJar, Cookie, \ MISSING_FILENAME_TEXT, LoadError -from _headersutil import join_header_words, split_header_words -from _util import iso2time, time2isoz +from ._headersutil import join_header_words, split_header_words +from ._util import iso2time, time2isoz debug = logging.getLogger("mechanize").debug --- ./mechanize/_html.py (original) +++ ./mechanize/_html.py (refactored) @@ -10,16 +10,16 @@ import codecs import copy -import htmlentitydefs +import html.entities import re -import _sgmllib_copy as sgmllib - -import _beautifulsoup -import _form -from _headersutil import split_header_words, is_html as _is_html -import _request -import _rfc3986 +from . import _sgmllib_copy as sgmllib + +from . import _beautifulsoup +from . import _form +from ._headersutil import split_header_words, is_html as _is_html +from . import _request +from . import _rfc3986 DEFAULT_ENCODING = "latin-1" @@ -128,7 +128,7 @@ link_class=Link, urltags=None, ): - import _pullparser + from . import _pullparser if link_parser_class is None: link_parser_class = _pullparser.TolerantPullParser self.link_parser_class = link_parser_class @@ -157,7 +157,7 @@ p = self.link_parser_class(response, encoding=encoding) try: - for token in p.tags(*(self.urltags.keys()+["base"])): + for token in p.tags(*(list(self.urltags.keys())+["base"])): if token.type == "endtag": continue if token.data == "base": @@ -188,7 +188,7 @@ #text = p.get_compressed_text() yield Link(base_url, url, text, tag, token.attrs) - except sgmllib.SGMLParseError, exc: + except sgmllib.SGMLParseError as exc: raise _form.ParseError(exc) class FormsFactory: @@ -248,7 +248,7 @@ self._encoding = encoding def _get_title_text(self, parser): - import _pullparser + from . import _pullparser text = [] tok = None while 1: @@ -273,7 +273,7 @@ return COMPRESS_RE.sub(" ", "".join(text).strip()) def title(self): - import _pullparser + from . import _pullparser p = _pullparser.TolerantPullParser( self._response, encoding=self._encoding) try: @@ -283,7 +283,7 @@ return None else: return self._get_title_text(p) - except sgmllib.SGMLParseError, exc: + except sgmllib.SGMLParseError as exc: raise _form.ParseError(exc) @@ -298,7 +298,7 @@ repl = entities.get(ent[1:-1]) if repl is not None: - repl = unichr(repl) + repl = chr(repl) if type(repl) != type(""): try: repl = repl.encode(encoding) @@ -314,7 +314,7 @@ name, base = data, 10 if name.startswith("x"): name, base= name[1:], 16 - uc = unichr(int(name, base)) + uc = chr(int(name, base)) if encoding is None: return uc else: @@ -326,12 +326,12 @@ class RefactoringTool: Refactored ./mechanize/_headersutil.py RefactoringTool: Refactored ./mechanize/_gzip.py RefactoringTool: Refactored ./mechanize/_form.py MechanizeBs(_beautifulsoup.BeautifulSoup): - _entitydefs = htmlentitydefs.name2codepoint + _entitydefs = html.entities.name2codepoint # don't want the magic Microsoft-char workaround PARSER_MASSAGE = [(re.compile('(<[^<>]*)/>'), - lambda(x):x.group(1) + ' />'), + lambda x:x.group(1) + ' />'), (re.compile('<!\s+([^<>]*)>'), - lambda(x):'<!' + x.group(1) + '>') + lambda x:'<!' + x.group(1) + '>') ] def __init__(self, encoding, text=None, avoidParserProblems=True, @@ -389,7 +389,7 @@ encoding = self._encoding for ch in bs.recursiveChildGenerator(): if (isinstance(ch, _beautifulsoup.Tag) and - ch.name in self.urltags.keys()+["base"]): + ch.name in list(self.urltags.keys())+["base"]): link = ch attrs = bs.unescape_attrs(link.attrs) attrs_dict = dict(attrs) --- ./mechanize/_headersutil.py (original) +++ ./mechanize/_headersutil.py (refactored) @@ -14,8 +14,8 @@ from types import UnicodeType STRING_TYPES = StringType, UnicodeType -from _util import http2time -import _rfc3986 +from ._util import http2time +from . import _rfc3986 def is_html_file_extension(url, allow_xhtml): --- ./mechanize/_gzip.py (original) +++ ./mechanize/_gzip.py (refactored) @@ -1,7 +1,7 @@ -from cStringIO import StringIO +from io import StringIO -import _response -import _urllib2_fork +from . import _response +from . import _urllib2_fork # GzipConsumer was taken from Fredrik Lundh's effbot.org-0.1-20041009 library --- ./mechanize/_form.py (original) +++ ./mechanize/_form.py (refactored) @@ -59,24 +59,24 @@ 'SubmitButtonControl', 'SubmitControl', 'TextControl', 'TextareaControl', 'XHTMLCompatibleFormParser'] -import HTMLParser -from cStringIO import StringIO +import html.parser +from io import StringIO import inspect import logging import random import re import sys -import urllib -import urlparse +import urllib.request, urllib.parse, urllib.error +import urllib.parse import warnings -import _beautifulsoup -import _request +from . import _beautifulsoup +from . import _request # from Python itself, for backwards compatibility of raised exceptions import sgmllib # bundled copy of sgmllib -import _sgmllib_copy +from . import _sgmllib_copy VERSION = "0.2.11" @@ -146,7 +146,7 @@ name, base = data, 10 if name.startswith("x"): name, base= name[1:], 16 - uc = unichr(int(name, base)) + uc = chr(int(name, base)) if encoding is None: return uc else: @@ -157,21 +157,21 @@ return repl def get_entitydefs(): - import htmlentitydefs + import html.entities from codecs import latin_1_decode entitydefs = {} try: - htmlentitydefs.name2codepoint + html.entities.name2codepoint except AttributeError: entitydefs = {} - for name, char in htmlentitydefs.entitydefs.items(): + for name, char in list(html.entities.entitydefs.items()): uc = latin_1_decode(char)[0] if uc.startswith("&#") and uc.endswith(";"): uc = unescape_charref(uc[2:-1], None) entitydefs["&%s;" % name] = uc else: - for name, codepoint in htmlentitydefs.name2codepoint.items(): - entitydefs["&%s;" % name] = unichr(codepoint) + for name, codepoint in list(html.entities.name2codepoint.items()): + entitydefs["&%s;" % name] = chr(codepoint) return entitydefs @@ -193,7 +193,7 @@ def choose_boundary(): """Return a string usable as a multipart boundary.""" # follow IE and firefox - nonce = "".join([str(random.randint(0, sys.maxint-1)) for i in 0,1,2]) + nonce = "".join([str(random.randint(0, sys.maxsize-1)) for i in (0,1,2)]) return "-"*27 + nonce # This cut-n-pasted MimeWriter from standard library is here so can add @@ -354,7 +354,7 @@ # raised by versions of ClientForm <= 0.2.5 # TODO: move to _html class ParseError(sgmllib.SGMLParseError, - HTMLParser.HTMLParseError): + html.parser.HTMLParseError): def __init__(self, *args, **kwds): Exception.__init__(self, *args, **kwds) @@ -487,8 +487,8 @@ self._option = {} self._option.update(d) - if (self._optgroup and self._optgroup.has_key("disabled") and - not self._option.has_key("disabled")): + if (self._optgroup and "disabled" in self._optgroup and + "disabled" not in self._option): self._option["disabled"] = None def _end_option(self): @@ -498,9 +498,9 @@ contents = self._option.get("contents", "").strip() self._option["contents"] = contents - if not self._option.has_key("value"): + if "value" not in self._option: self._option["value"] = contents - if not self._option.has_key("label"): + if "label" not in self._option: self._option["label"] = contents # stuff dict of SELECT HTML attrs into a special private key # (gets deleted again later) @@ -588,7 +588,7 @@ else: return - if data and not map.has_key(key): + if data and key not in map: # according to # http://www.w3.org/TR/html4/appendix/notes.html#h-B.3.1 line break # immediately after start tags or immediately before end tags must @@ -660,7 +660,7 @@ def unescape_attrs(self, attrs): #debug("%s", attrs) escaped_attrs = {} - for key, val in attrs.items(): + for key, val in list(attrs.items()): try: val.items except AttributeError: @@ -674,17 +674,17 @@ def unknown_charref(self, ref): self.handle_data("&#%s;" % ref) -class XHTMLCompatibleFormParser(_AbstractFormParser, HTMLParser.HTMLParser): +class XHTMLCompatibleFormParser(_AbstractFormParser, html.parser.HTMLParser): """Good for XHTML, bad for tolerance of incorrect HTML.""" # thanks to Michael Howitz for this! def __init__(self, entitydefs=None, encoding=DEFAULT_ENCODING): - HTMLParser.HTMLParser.__init__(self) + html.parser.HTMLParser.__init__(self) _AbstractFormParser.__init__(self, entitydefs, encoding) def feed(self, data): try: - HTMLParser.HTMLParser.feed(self, data) - except HTMLParser.HTMLParseError, exc: + html.parser.HTMLParser.feed(self, data) + except html.parser.HTMLParseError as exc: raise ParseError(exc) def start_option(self, attrs): @@ -725,7 +725,7 @@ return attrs # ditto def close(self): - HTMLParser.HTMLParser.close(self) + html.parser.HTMLParser.close(self) self.end_body() @@ -756,7 +756,7 @@ def feed(self, data): try: _sgmllib_copy.SGMLParser.feed(self, data) - except _sgmllib_copy.SGMLParseError, exc: + except _sgmllib_copy.SGMLParseError as exc: raise ParseError(exc) def close(self): @@ -779,7 +779,7 @@ def feed(self, data): try: self.bs_base_class.feed(self, data) - except _sgmllib_copy.SGMLParseError, exc: + except _sgmllib_copy.SGMLParseError as exc: raise ParseError(exc) def close(self): @@ -818,9 +818,9 @@ encoding=DEFAULT_ENCODING, # private - _urljoin=urlparse.urljoin, - _urlparse=urlparse.urlparse, - _urlunparse=urlparse.urlunparse, + _urljoin=urllib.parse.urljoin, + _urlparse=urllib.parse.urlparse, + _urlunparse=urllib.parse.urlunparse, ): """Identical to ParseResponse, except that: @@ -852,9 +852,9 @@ encoding=DEFAULT_ENCODING, # private - _urljoin=urlparse.urljoin, - _urlparse=urlparse.urlparse, - _urlunparse=urlparse.urlunparse, + _urljoin=urllib.parse.urljoin, + _urlparse=urllib.parse.urlparse, + _urlunparse=urllib.parse.urlunparse, ): """Identical to ParseFile, except that: @@ -968,9 +968,9 @@ entitydefs=None, backwards_compat=True, encoding=DEFAULT_ENCODING, - _urljoin=urlparse.urljoin, - _urlparse=urlparse.urlparse, - _urlunparse=urlparse.urlunparse, + _urljoin=urllib.parse.urljoin, + _urlparse=urllib.parse.urlparse, + _urlunparse=urllib.parse.urlunparse, ): if backwards_compat: deprecation("operating in backwards-compatibility mode", 1) @@ -979,7 +979,7 @@ data = file.read(CHUNK) try: fp.feed(data) - except ParseError, e: + except ParseError as e: e.base_uri = base_uri raise if len(data) != CHUNK: break @@ -1193,16 +1193,16 @@ self.__dict__["type"] = type.lower() self.__dict__["name"] = name self._value = attrs.get("value") - self.disabled = attrs.has_key("disabled") - self.readonly = attrs.has_key("readonly") + self.disabled = "disabled" in attrs + self.readonly = "readonly" in attrs self.id = attrs.get("id") self.attrs = attrs.copy() self._clicked = False - self._urlparse = urlparse.urlparse - self._urlunparse = urlparse.urlunparse + self._urlparse = urllib.parse.urlparse + self._urlunparse = urllib.parse.urlunparse def __getattr__(self, name): if name == "value": @@ -1426,7 +1426,7 @@ # Submission of ISINDEX is explained in the HTML 3.2 spec, though. parts = self._urlparse(form.action) rest, (query, frag) = parts[:-2], parts[-2:] - parts = rest + (urllib.quote_plus(self.value), None) + parts = rest + (urllib.parse.quote_plus(self.value), None) url = self._urlunparse(parts) req_data = url, None, [] @@ -1498,7 +1498,7 @@ "_labels": label and [label] or [], "attrs": attrs, "_control": control, - "disabled": attrs.has_key("disabled"), + "disabled": "disabled" in attrs, "_selected": False, "id": attrs.get("id"), "_index": index, @@ -1552,7 +1552,7 @@ def __repr__(self): # XXX appending the attrs without distinguishing them from name and id # is silly - attrs = [("name", self.name), ("id", self.id)]+self.attrs.items() + attrs = [("name", self.name), ("id", self.id)]+list(self.attrs.items()) return "<%s %s>" % ( self.__class__.__name__, " ".join(["%s=%r" % (k, v) for k, v in attrs]) @@ -1560,7 +1560,7 @@ def disambiguate(items, nr, **kwds): msgs = [] - for key, value in kwds.items(): + for key, value in list(kwds.items()): msgs.append("%s=%r" % (key, value)) msg = " ".join(msgs) if not items: @@ -2030,11 +2030,11 @@ item.selected and (not item.disabled or compat)] names = {} for nn in value: - if nn in names.keys(): + if nn in list(names.keys()): names[nn] += 1 else: names[nn] = 1 - for name, count in names.items(): + for name, count in list(names.items()): on, off = self._get_items(name, count) for i in range(count): if on: @@ -2166,7 +2166,7 @@ called_as_base_class=True, index=index) self.__dict__["multiple"] = False o = Item(self, attrs, index) - o.__dict__["_selected"] = attrs.has_key("checked") + o.__dict__["_selected"] = "checked" in attrs def fixup(self): ListControl.fixup(self) @@ -2199,7 +2199,7 @@ cRefactoringTool: Refactored ./mechanize/_firefox3cookiejar.py RefactoringTool: Refactored ./mechanize/_debug.py alled_as_base_class=True, index=index) self.__dict__["multiple"] = True o = Item(self, attrs, index) - o.__dict__["_selected"] = attrs.has_key("checked") + o.__dict__["_selected"] = "checked" in attrs def get_labels(self): return [] @@ -2267,7 +2267,7 @@ self.attrs = attrs["__select"].copy() self.__dict__["_label"] = _get_label(self.attrs) self.__dict__["id"] = self.attrs.get("id") - self.__dict__["multiple"] = self.attrs.has_key("multiple") + self.__dict__["multiple"] = "multiple" in self.attrs # the majority of the contents, label, and value dance already happened contents = attrs.get("contents") attrs = attrs.copy() @@ -2275,12 +2275,12 @@ ListControl.__init__(self, type, name, self.attrs, select_default, called_as_base_class=True, index=index) - self.disabled = self.attrs.has_key("disabled") - self.readonly = self.attrs.has_key("readonly") - if attrs.has_key("value"): + self.disabled = "disabled" in self.attrs + self.readonly = "readonly" in self.attrs + if "value" in attrs: # otherwise it is a marker 'select started' token o = Item(self, attrs, index) - o.__dict__["_selected"] = attrs.has_key("selected") + o.__dict__["_selected"] = "selected" in attrs # add 'label' label and contents label, if different. If both are # provided, the 'label' label is used for display in HTML # 4.0-compliant browsers (and any lower spec? not sure) while the @@ -2673,8 +2673,8 @@ self.backwards_compat = backwards_compat # note __setattr__ - self._urlunparse = urlparse.urlunparse - self._urlparse = urlparse.urlparse + self._urlunparse = urllib.parse.urlunparse + self._urlparse = urllib.parse.urlparse def __getattr__(self, name): if name == "backwards_compat": @@ -2780,7 +2780,7 @@ control = self.find_control(name) try: control.value = value - except AttributeError, e: + except AttributeError as e: raise ValueError(str(e)) def get_value(self, @@ -3233,14 +3233,14 @@ if self.enctype != "application/x-www-form-urlencoded": raise ValueError( "unknown GET form encoding type '%s'" % self.enctype) - parts = rest + (urllib.urlencode(self._pairs()), None) + parts = rest + (urllib.parse.urlencode(self._pairs()), None) uri = self._urlunparse(parts) return uri, None, [] elif method == "POST": parts = rest + (query, None) uri = self._urlunparse(parts) if self.enctype == "application/x-www-form-urlencoded": - return (uri, urllib.urlencode(self._pairs()), + return (uri, urllib.parse.urlencode(self._pairs()), [("Content-Type", self.enctype)]) elif self.enctype == "multipart/form-data": data = StringIO() --- ./mechanize/_firefox3cookiejar.py (original) +++ ./mechanize/_firefox3cookiejar.py (refactored) @@ -11,8 +11,8 @@ import logging import time -from _clientcookie import CookieJar, Cookie, MappingIterator -from _util import isstringlike, experimental +from ._clientcookie import CookieJar, Cookie, MappingIterator +from ._util import isstringlike, experimental debug = logging.getLogger("mechanize.cookies").debug @@ -162,10 +162,10 @@ if cookie.discard: expires = "" - domain = unicode(cookie.domain) - path = unicode(cookie.path) - name = unicode(cookie.name) - value = unicode(cookie.value) + domain = str(cookie.domain) + path = str(cookie.path) + name = str(cookie.name) + value = str(cookie.value) secure = bool(int(cookie.secure)) if value is None: --- ./mechanize/_debug.py (original) +++ ./mechanize/_debug.py (refactRefactoringTool: Refactored ./mechanize/_clientcookie.py ored) @@ -1,7 +1,7 @@ import logging -from _response import response_seek_wrapper -from _urllib2_fork import BaseHandler +from ._response import response_seek_wrapper +from ._urllib2_fork import BaseHandler class HTTPResponseDebugProcessor(BaseHandler): --- ./mechanize/_clientcookie.py (original) +++ ./mechanize/_clientcookie.py (refactored) @@ -32,7 +32,7 @@ """ -import sys, re, copy, time, urllib, types, logging +import sys, re, copy, time, urllib.request, urllib.parse, urllib.error, types, logging try: import threading _threading = threading; del threading @@ -44,9 +44,9 @@ "instance initialised with one)") DEFAULT_HTTP_PORT = "80" -from _headersutil import split_header_words, parse_ns_headers -from _util import isstringlike -import _rfc3986 +from ._headersutil import split_header_words, parse_ns_headers +from ._util import isstringlike +from . import _rfc3986 debug = logging.getLogger("mechanize.cookies").debug @@ -63,8 +63,8 @@ if issubclass(etype, unmasked): raise # swallowed an exception - import traceback, StringIO - f = StringIO.StringIO() + import traceback, io + f = io.StringIO() traceback.print_exc(None, f) msg = f.getvalue() warnings.warn("mechanize bug!\n%s" % msg, stacklevel=2) @@ -227,9 +227,9 @@ # And here, kind of: draft-fielding-uri-rfc2396bis-03 # (And in draft IRI specification: draft-duerst-iri-05) # (And here, for new URI schemes: RFC 2718) - if isinstance(path, types.UnicodeType): + if isinstance(path, str): path = path.encode("utf-8") - path = urllib.quote(path, HTTP_PATH_SAFE) + path = urllib.parse.quote(path, HTTP_PATH_SAFE) path = ESCAPED_CHAR_RE.sub(uppercase_escaped_char, path) return path @@ -389,13 +389,13 @@ self._rest = copy.copy(rest) def has_nonstandard_attr(self, name): - return self._rest.has_key(name) + return name in self._rest def get_nonstandard_attr(self, name, default=None): return self._rest.get(name, default) def set_nonstandard_attr(self, name, value): self._rest[name] = value def nonstandard_attr_keys(self): - return self._rest.keys() + return list(self._rest.keys()) def is_expired(self, now=None): if now is None: now = time.time() @@ -967,9 +967,9 @@ def vals_sorted_by_key(adict): - keys = adict.keys() + keys = list(adict.keys()) keys.sort() - return map(adict.get, keys) + return list(map(adict.get, keys)) class MappingIterator: """Iterates over nested mapping, depth-first, in sorted order by key.""" @@ -978,7 +978,7 @@ def __iter__(self): return self - def next(self): + def __next__(self): # this is hairy because of lack of generators while 1: try: @@ -1070,11 +1070,11 @@ return [] debug("Checking %s for cookies to return", domain) cookies_by_path = self._cookies[domain] - for path in cookies_by_path.keys(): + for path in list(cookies_by_path.keys()): if not self._policy.path_return_ok(path, request): continue cookies_by_name = cookies_by_path[path] - for cookie in cookies_by_name.values(): + for cookie in list(cookies_by_name.values()): if not self._policy.return_ok(cookie, request): debug(" not returning cookie") continue @@ -1108,7 +1108,7 @@ # XXX document that implied interface, or provide another way of # implementing cookiejars than subclassing cookies = [] - for domain in self._cookies.keys(): + for domain in list(self._cookies.keys()): cookies.extend(self._cookies_for_domain(domain, request)) return cookies @@ -1254,7 +1254,7 @@ # boolean cookie-attribute is present, but has no value # (like "discard", rather than "port=80") v = True - if sRefactoringTool: Refactored ./mechanize/_beautifulsoup.py tandard.has_key(k): + if k in standard: # only first value is significant continue if k == "domain": @@ -1457,8 +1457,8 @@ def no_matching_rfc2965(ns_cookie, lookup=lookup): key = ns_cookie.domain, ns_cookie.path, ns_cookie.name - return not lookup.has_key(key) - ns_cookies = filter(no_matching_rfc2965, ns_cookies) + return key not in lookup + ns_cookies = list(filter(no_matching_rfc2965, ns_cookies)) if ns_cookies: cookies.extend(ns_cookies) @@ -1494,9 +1494,9 @@ cookie: mechanize.Cookie instance """ c = self._cookies - if not c.has_key(cookie.domain): c[cookie.domain] = {} + if cookie.domain not in c: c[cookie.domain] = {} c2 = c[cookie.domain] - if not c2.has_key(cookie.path): c2[cookie.path] = {} + if cookie.path not in c2: c2[cookie.path] = {} c3 = c2[cookie.path] c3[cookie.name] = cookie @@ -1603,7 +1603,7 @@ "CookieJar.__getitem__ only supports sequential iteration") self._prev_getitem_index = i try: - return self._getitem_iterator.next() + return next(self._getitem_iterator) except StopIteration: raise IndexError() --- ./mechanize/_beautifulsoup.py (original) +++ ./mechanize/_beautifulsoup.py (refactored) @@ -38,7 +38,7 @@ HTML document. Typically your subclass would just override SELF_CLOSING_TAGS and/or NESTABLE_TAGS. """ #" -from __future__ import generators + __author__ = "Leonard Richardson (leonardr@segfault.org)" __version__ = "2.1.1" @@ -46,10 +46,10 @@ __copyright__ = "Copyright (c) 2004-2005 Leonard Richardson" __license__ = "PSF" -from _sgmllib_copy import SGMLParser, SGMLParseError +from ._sgmllib_copy import SGMLParser, SGMLParseError import types import re -import _sgmllib_copy as sgmllib +from . import _sgmllib_copy as sgmllib class NullType(object): @@ -172,7 +172,7 @@ g = generator() while True: try: - i = g.next() + i = next(g) except StopIteration: break found = None @@ -180,7 +180,7 @@ if not text: if not name or self._matches(i, name): match = True - for attr, matchAgainst in attrs.items(): + for attr, matchAgainst in list(attrs.items()): check = i.get(attr) if not self._matches(check, matchAgainst): match = False @@ -201,7 +201,7 @@ def nextGenerator(self): i = self while i: - i = i.next + i = i.__next__ yield i def nextSiblingGenerator(self): @@ -245,7 +245,7 @@ #ways of matching match the tag name as a string chunk = chunk.name #Now we know that chunk is a string - if not isinstance(chunk, basestring): + if not isinstance(chunk, str): chunk = str(chunk) if hasattr(howToMatch, 'match'): # It's a regexp object. @@ -253,7 +253,7 @@ if isList(howToMatch): return chunk in howToMatch if hasattr(howToMatch, 'items'): - return howToMatch.has_key(chunk) + return chunk in howToMatch #It's just a string return str(howToMatch) == chunk @@ -264,12 +264,12 @@ if attr == 'string': return self else: - raise AttributeError, "'%s' object has no attribute '%s'" % (self.__class__.__name__, attr) + raise AttributeError("'%s' object has no attribute '%s'" % (self.__class__.__name__, attr)) class NavigableString(str, NavigableText): pass -class NavigableUnicodeString(unicode, NavigableText): +class NavigableUnicodeString(str, NavigableText): pass class Tag(PageElement): @@ -308,7 +308,7 @@ def __contains__(self, x): return x in self.contents - def __nonzero__(self): + def __bool__(self): "A tag is non-None even if it has no contents." return True @@ -334,14 +334,14 @@ #We don't break because bad HTML can define the same #attribute multiple times. self._getAttrMap() - if self.attrMap.has_key(key): + if key in self.attrMap: del self.attrMap[key] def __call__(self, *args, **kwargs): """Calling a tag like a function is the same as calling its fetch() method. Eg. tag('a') returns a list of all the A tags found within this tag.""" - return apply(self.fetch, args, kwargs) + return self.fetch(*args, **kwargs) def __getattr__(self, tag): if len(tag) > 3 and tag.rfind('Tag') == len(tag)-3: @@ -415,9 +415,9 @@ s.append(space) s.append(closeTag) s = ''.join(s) - isUnicode = type(s) == types.UnicodeType + isUnicode = type(s) == str if needUnicode and not isUnicode: - s = unicode(s) + s = str(s) elif isUnicode and needUnicode==False: s = str(s) return s @@ -431,12 +431,12 @@ s=[] for c in self: text = None - if isinstance(c, NavigableUnicodeString) or type(c) == types.UnicodeType: - text = unicode(c) + if isinstance(c, NavigableUnicodeString) or type(c) == str: + text = str(c) elif isinstance(c, Tag): s.append(c.__str__(needUnicode, showStructureIndent)) elif needUnicode: - text = unicode(c) + text = str(c) else: text = str(c) if text: @@ -540,7 +540,7 @@ """Convenience method that works with all 2.x versions of Python to determine whether or not something is listlike.""" return hasattr(l, '__iter__') \ - or (type(l) in (types.ListType, types.TupleType)) + or (type(l) in (list, tuple)) def buildTagMap(default, *args): """Turns a list of maps, lists, or scalars into a single map. @@ -550,7 +550,7 @@ for portion in args: if hasattr(portion, 'items'): #It's a map. Merge it. - for k,v in portion.items(): + for k,v in list(portion.items()): built[k] = v elif isList(portion): #It's a list. Map each item to the default. @@ -620,11 +620,11 @@ '\x9f' : 'Ÿ',} PARSER_MASSAGE = [(re.compile('(<[^<>]*)/>'), - lambda(x):x.group(1) + ' />'), + lambda x:x.group(1) + ' />'), (re.compile('<!\s+([^<>]*)>'), - lambda(x):'<!' + x.group(1) + '>'), + lambda x:'<!' + x.group(1) + '>'), (re.compile("([\x80-\x9f])"), - lambda(x): BeautifulStoneSoup.MS_CHARS.get(x.group(1))) + lambda x: BeautifulStoneSoup.MS_CHARS.get(x.group(1))) ] ROOT_TAG_NAME = '[document]' @@ -733,7 +733,7 @@ else: currentData = ' ' c = NavigableString - if type(currentData) == types.UnicodeType: + if type(currentData) == str: c = NavigableUnicodeString o = c(currentData) o.setup(self.currentTag, self.previous) @@ -785,7 +785,7 @@ nestingResetTriggers = self.NESTABLE_TAGS.get(name) isNestable = nestingResetTriggers != None - isResetNesting = self.RESET_NESTING_TAGS.has_key(name) + isResetNesting = name in self.RESET_NESTING_TAGS popTo = None inclusive = True for i in range(len(self.tagStack)-1, 0, -1): @@ -798,7 +798,7 @@ if (nestingResetTriggers != None RefactoringTool: Refactored ./mechanize/_auth.py RefactoringTool: Refactored ./mechanize/__init__.py and p.name in nestingResetTriggers) \ or (nestingResetTriggers == None and isResetNesting - and self.RESET_NESTING_TAGS.has_key(p.name)): + and p.name in self.RESET_NESTING_TAGS): #If we encounter one of the nesting reset triggers #peculiar to this tag, or we encounter another tag @@ -817,7 +817,7 @@ if self.quoteStack: #This is not a real tag. #print "<%s> is not real!" % name - attrs = ''.join(map(lambda(x, y): ' %s="%s"' % (x, y), attrs)) + attrs = ''.join([' %s="%s"' % (x_y[0], x_y[1]) for x_y in attrs]) self.handle_data('<%s%s>' % (name, attrs)) return self.endData() @@ -1046,7 +1046,7 @@ parent._getAttrMap() if (isinstance(tag, Tag) and len(tag.contents) == 1 and isinstance(tag.contents[0], NavigableText) and - not parent.attrMap.has_key(tag.name)): + tag.name not in parent.attrMap): parent[tag.name] = tag.contents[0] BeautifulStoneSoup.popTag(self) @@ -1074,4 +1074,4 @@ if __name__ == '__main__': import sys soup = BeautifulStoneSoup(sys.stdin.read()) - print soup.prettify() + print(soup.prettify()) --- ./mechanize/_auth.py (original) +++ ./mechanize/_auth.py (refactored) @@ -9,7 +9,7 @@ """ -from _urllib2_fork import HTTPPasswordMgr +from ._urllib2_fork import HTTPPasswordMgr # TODO: stop deriving from HTTPPasswordMgr @@ -17,7 +17,7 @@ # has default realm and host/port def add_password(self, realm, uri, user, passwd): # uri could be a single URI or a sequence - if uri is None or isinstance(uri, basestring): + if uri is None or isinstance(uri, str): uris = [uri] else: uris = uri @@ -36,7 +36,7 @@ authinfo_by_domain = self.passwd.get(realm, {}) for default_port in True, False: reduced_authuri = self.reduce_uri(authuri, default_port) - for uri, authinfo in authinfo_by_domain.iteritems(): + for uri, authinfo in authinfo_by_domain.items(): if uri is None and not default_uri: continue if self.is_suburi(uri, reduced_authuri): --- ./mechanize/__init__.py (original) +++ ./mechanize/__init__.py (refactored) @@ -116,42 +116,42 @@ import logging import sys -from _version import __version__ +from ._version import __version__ # high-level stateful browser-style interface -from _mechanize import \ +from ._mechanize import \ Browser, History, \ BrowserStateError, LinkNotFoundError, FormNotFoundError # configurable URL-opener interface -from _useragent import UserAgentBase, UserAgent -from _html import \ +from ._useragent import UserAgentBase, UserAgent +from ._html import \ Link, \ Factory, DefaultFactory, RobustFactory, \ FormsFactory, LinksFactory, TitleFactory, \ RobustFormsFactory, RobustLinksFactory, RobustTitleFactory # urllib2 work-alike interface. This is a superset of the urllib2 interface. -from _urllib2 import * -import _urllib2 +from ._urllib2 import * +from . import _urllib2 if hasattr(_urllib2, "HTTPSHandler"): __all__.append("HTTPSHandler") del _urllib2 # misc -from _http import HeadParser -from _http import XHTMLCompatibleHeadParser -from _opener import ContentTooShortError, OpenerFactory, urlretrieve -from _response import \ +from ._http import HeadParser +from ._http import XHTMLCompatibleHeadParser +from ._opener import ContentTooShortError, OpenerFactory, urlretrieve +from ._response import \ response_seek_wrapper, seek_wrapped_response, make_response -from _rfc3986 import urljoin -from _util import http2time as str2time +from ._rfc3986 import urljoin +from ._util import http2time as str2time # cookies -from _clientcookie import Cookie, CookiePolicy, DefaultCookiePolicy, \ +from ._clRefactoringTool: Refactored ./ez_setup.py ientcookie import Cookie, CookiePolicy, DefaultCookiePolicy, \ CookieJar, FileCookieJar, LoadError, request_host_lc as request_host, \ effective_request_host -from _lwpcookiejar import LWPCookieJar, lwp_cookie_str +from ._lwpcookiejar import LWPCookieJar, lwp_cookie_str # 2.4 raises SyntaxError due to generator / try/finally use if sys.version_info[:2] > (2,4): try: @@ -159,12 +159,12 @@ except ImportError: pass else: - from _firefox3cookiejar import Firefox3CookieJar -from _mozillacookiejar import MozillaCookieJar -from _msiecookiejar import MSIECookieJar + from ._firefox3cookiejar import Firefox3CookieJar +from ._mozillacookiejar import MozillaCookieJar +from ._msiecookiejar import MSIECookieJar # forms -from _form import ( +from ._form import ( AmbiguityError, ControlNotFoundError, FormParser, --- ./ez_setup.py (original) +++ ./ez_setup.py (refactored) @@ -70,10 +70,10 @@ if egg_name in md5_data: digest = md5(data).hexdigest() if digest != md5_data[egg_name]: - print >>sys.stderr, ( + print(( "md5 validation of %s failed! (Possible download problem?)" % egg_name - ) + ), file=sys.stderr) sys.exit(2) return data @@ -103,14 +103,14 @@ return do_download() try: pkg_resources.require("setuptools>="+version); return - except pkg_resources.VersionConflict, e: + except pkg_resources.VersionConflict as e: if was_imported: - print >>sys.stderr, ( + print(( "The required version of setuptools (>=%s) is not available, and\n" "can't be installed while this script is running. Please install\n" " a more recent version first, using 'easy_install -U setuptools'." "\n\n(Currently using %r)" - ) % (version, e.args[0]) + ) % (version, e.args[0]), file=sys.stderr) sys.exit(2) else: del pkg_resources, sys.modules['pkg_resources'] # reload ok @@ -129,7 +129,7 @@ with a '/'). `to_dir` is the directory where the egg will be downloaded. `delay` is the number of seconds to pause before an actual download attempt. """ - import urllib2, shutil + import urllib.request, urllib.error, urllib.parse, shutil egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3]) url = download_base + egg_name saveto = os.path.join(to_dir, egg_name) @@ -155,7 +155,7 @@ version, download_base, delay, url ); from time import sleep; sleep(delay) log.warn("Downloading %s", url) - src = urllib2.urlopen(url) + src = urllib.request.urlopen(url) # Read/write all in one block, so we don't create a corrupt file # if the download is interrupted. data = _validate_md5(egg_name, src.read()) @@ -216,10 +216,10 @@ os.unlink(egg) else: if setuptools.__version__ == '0.0.1': - print >>sys.stderr, ( + print(( "You have an obsolete version of setuptools installed. Please\n" "remove it from your system entirely before rerunning this script." - ) + ), file=sys.stderr) sys.exit(2) req = "setuptools>="+version @@ -238,8 +238,8 @@ from setuptools.command.easy_install import main main(argv) else: - print "Setuptools version",version,"or greater has been installed." - print '(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)' + print("Setuptools version",version,"or greater has been installed.") + print('(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)') def update_md5(filenames): """Update our built-in md5 registry""" @@ -252,7 +252,7 @@ md5_data[base] = md5(f.read()).hexdigest() f.close() - data = [" %r: %r,\n" % it for it in mdRefactoringTool: Refactored ./examples/pypi.py RefactoringTool: Refactored ./examples/hack21.py RefactoringTool: Refactored ./examples/forms/simple.py RefactoringTool: Refactored ./examples/forms/example.py 5_data.items()] + data = [" %r: %r,\n" % it for it in list(md5_data.items())] data.sort() repl = "".join(data) @@ -262,7 +262,7 @@ match = re.search("\nmd5_data = {\n([^}]+)}", src) if not match: - print >>sys.stderr, "Internal error!" + print("Internal error!", file=sys.stderr) sys.exit(2) src = src[:match.start(1)] + repl + src[match.end(1):] --- ./examples/pypi.py (original) +++ ./examples/pypi.py (refactored) @@ -7,7 +7,7 @@ import sys import os -import urlparse +import urllib.parse import mechanize @@ -23,7 +23,7 @@ browser.submit() browser.follow_link(text_regex="mechanize-?(.*)") link = browser.find_link(text_regex=r"\.tar\.gz") - filename = os.path.basename(urlparse.urlsplit(link.url)[2]) + filename = os.path.basename(urllib.parse.urlsplit(link.url)[2]) if os.path.exists(filename): sys.exit("%s already exists, not grabbing" % filename) browser.retrieve(link.url, filename) --- ./examples/hack21.py (original) +++ ./examples/hack21.py (refactored) @@ -6,7 +6,7 @@ # but I've left those in for the sake of a direct port. import sys, os, re -from urllib2 import HTTPError +from urllib.error import HTTPError import mechanize assert mechanize.__version__ >= (0, 0, 6, "a") @@ -21,7 +21,7 @@ # Get the starting search page try: mech.open("http://search.cpan.org") -except HTTPError, e: +except HTTPError as e: sys.exit("%d: %s" % (e.code, e.msg)) # Select the form, fill the fields, and submit @@ -30,19 +30,19 @@ mech["mode"] = ["author"] try: mech.submit() -except HTTPError, e: +except HTTPError as e: sys.exit("post failed: %d: %s" % (e.code, e.msg)) # Find the link for "Andy" try: mech.follow_link(text_regex=re.compile("Andy")) -except HTTPError, e: +except HTTPError as e: sys.exit("post failed: %d: %s" % (e.code, e.msg)) # Get all the tarballs urls = [link.absolute_url for link in mech.links(url_regex=re.compile(r"\.tar\.gz$"))] -print "Found", len(urls), "tarballs to download" +print("Found", len(urls), "tarballs to download") if "--all" not in sys.argv[1:]: urls = urls[:1] @@ -50,11 +50,11 @@ for url in urls: filename = os.path.basename(url) f = open(filename, "wb") - print "%s -->" % filename, + print("%s -->" % filename, end=' ') r = mech.open(url) while 1: data = r.read(1024) if not data: break f.write(data) f.close() - print os.stat(filename).st_size, "bytes" + print(os.stat(filename).st_size, "bytes") --- ./examples/forms/simple.py (original) +++ ./examples/forms/simple.py (refactored) @@ -12,10 +12,10 @@ response = urlopen(urljoin(uri, "mechanize/example.html")) forms = ParseResponse(response, backwards_compat=False) form = forms[0] -print form +print(form) form["comments"] = "Thanks, Gisle" # form.click() returns a mechanize.Request object # (see HTMLForm.click.__doc__ if you want to use only the forms support, and # not the rest of mechanize) -print urlopen(form.click()).read() +print(urlopen(form.click()).read()) --- ./examples/forms/example.py (original) +++ ./examples/forms/example.py (refactored) @@ -18,7 +18,7 @@ ## backwards_compat=False) ## f.close() form = forms[0] -print form # very useful! +print(form) # very useful! # A 'control' is a graphical HTML form widget: a text entry box, a # dropdown 'select' list, a checkbox, etc. @@ -45,9 +45,9 @@ # All Controls may be disabled (equivalent of greyed-out in browser)... control = form.find_control("comments") -print control.disabled +print(control.disabled) # ...or readonly -print control.readonly +print(control.readonly) # readonly and disabled attributes can be assigned to control.disabled = False # convenience method, used here to make all controls writable (unless @@ -81,11 +81,11 @@ # You can get the Control instances from inside the form... control = form.find_control("cheeses", type="select") -print control.name, control.value, control.type +print(control.RefactoringTool: Files that were modified: RefactoringTool: ./test/test_urllib2_localnet.py RefactoringTool: ./test/test_urllib2.py RefactoringTool: ./test/test_cookies.py RefactoringTool: ./test/test_browser.py RefactoringTool: ./test/test_useragent.py RefactoringTool: ./test/test_unittest.py RefactoringTool: ./test/test_response.py RefactoringTool: ./test/test_pullparser.py RefactoringTool: ./test/test_pickle.py RefactoringTool: ./test/test_performance.py RefactoringTool: ./test/test_opener.py RefactoringTool: ./test/test_import.py RefactoringTool: ./test/test_html.py RefactoringTool: ./test/test_headers.py RefactoringTool: ./test/test_functional.py RefactoringTool: ./test/test_form_mutation.py RefactoringTool: ./test/test_form.py RefactoringTool: ./test/test_date.py RefactoringTool: ./test/test_cookie.py RefactoringTool: ./test/test_api.py RefactoringTool: ./test.py RefactoringTool: ./test-tools/unittest/util.py RefactoringTool: ./test-tools/unittest/suite.py RefactoringTool: ./test-tools/unittest/runner.py RefactoringTool: ./test-tools/unittest/result.py RefactoringTool: ./test-tools/unittest/main.py RefactoringTool: ./test-tools/unittest/loader.py RefactoringTool: ./test-tools/unittest/case.py RefactoringTool: ./test-tools/unittest/__main__.py RefactoringTool: ./test-tools/unittest/__init__.py RefactoringTool: ./test-tools/twisted-localserver.py RefactoringTool: ./test-tools/twisted-ftpserver.py RefactoringTool: ./test-tools/testprogram.py RefactoringTool: ./test-tools/linecache_copy.py RefactoringTool: ./test-tools/functools_copy.py RefactoringTool: ./test-tools/doctest.py RefactoringTool: ./setup.py RefactoringTool: ./release.py RefactoringTool: ./mechanize/_urllib2_fork.py RefactoringTool: ./mechanize/_response.py RefactoringTool: ./mechanize/_http.py RefactoringTool: ./mechanize/_version.py RefactoringTool: ./mechanize/_util.py RefactoringTool: ./mechanize/_useragent.py RefactoringTool: ./mechanize/_urllib2.py RefactoringTool: ./mechanize/_testcase.py RefactoringTool: ./mechanize/_sockettimeout.py RefactoringTool: ./mechanize/_sgmllib_copy.py RefactoringTool: ./mechanize/_rfc3986.py RefactoringTool: ./mechanize/_request.py RefactoringTool: ./mechanize/_pullparser.py RefactoringTool: ./mechanize/_opener.py RefactoringTool: ./mechanize/_msiecookiejar.py RefactoringTool: ./mechanize/_mozillacookiejar.py RefactoringTool: ./mechanize/_mechanize.py RefactoringTool: ./mechanize/_markupbase.py RefactoringTool: ./mechanize/_lwpcookiejar.py RefactoringTool: ./mechanize/_html.py RefactoringTool: ./mechanize/_headersutil.py RefactoringTool: ./mechanize/_gzip.py RefactoringTool: ./mechanize/_form.py RefactoringTool: ./mechanize/_firefox3cookiejar.py RefactoringTool: ./mechanize/_debug.py RefactoringTool: ./mechanize/_clientcookie.py RefactoringTool: ./mechanize/_beautifulsoup.py RefactoringTool: ./mechanize/_auth.py RefactoringTool: ./mechanize/__init__.py RefactoringTool: ./ez_setup.py RefactoringTool: ./examples/pypi.py RefactoringTool: ./examples/hack21.py RefactoringTool: ./examples/forms/simple.py RefactoringTool: ./examples/forms/example.py RefactoringTool: Warnings/messages while refactoring: RefactoringTool: ### In file ./mechanize/_pullparser.py ### RefactoringTool: Line 387: absolute and local imports together RefactoringTool: ### In file ./mechanize/_headersutil.py ### RefactoringTool: Line 237: absolute and local imports together name, control.value, control.type) control.value = ["mascarpone", "curd"] # ...and the Item instances from inside the Control item = control.get("curd") -print item.name, item.selected, item.id, item.attrs +print(item.name, item.selected, item.id, item.attrs) item.selected = False # Controls may be referred to by label: @@ -121,7 +121,7 @@ # Control.items is a list of all Item instances in the control for item in form.find_control("cheeses").items: - print item.name + print(item.name) # To remove items from a list control, remove it from .items: cheeses = form.find_control("cheeses") @@ -146,12 +146,12 @@ # Which items are present, selected, and successful? # is the "parmesan" item of the "cheeses" control successful (selected # and not disabled)? -print "parmesan" in form["cheeses"] +print("parmesan" in form["cheeses"]) # is the "parmesan" item of the "cheeses" control selected? -print "parmesan" in [ - item.name for item in form.find_control("cheeses").items if item.selected] +print("parmesan" in [ + item.name for item in form.find_control("cheeses").items if item.selected]) # does cheeses control have a "caerphilly" item? -print "caerphilly" in [item.name for item in form.find_control("cheeses").items] +print("caerphilly" in [item.name for item in form.find_control("cheeses").items]) # Sometimes one wants to set or clear individual items in a list, rather # than setting the whole .value: @@ -173,7 +173,7 @@ # Items may be disabled (selecting or de-selecting a disabled item is # not allowed): control = form.find_control("cheeses") -print control.get("emmenthal").disabled +print(control.get("emmenthal").disabled) control.get("emmenthal").disabled = True # enable all items in control control.set_all_items_disabled(False) @@ -181,13 +181,13 @@ request2 = form.click() # mechanize.Request object try: response2 = mechanize.urlopen(request2) -except mechanize.HTTPError, response2: +except mechanize.HTTPError as response2: pass -print response2.geturl() +print(response2.geturl()) # headers -for name, value in response2.info().items(): +for name, value in list(response2.info().items()): if name != "date": - print "%s: %s" % (name.title(), value) -print response2.read() # body + print("%s: %s" % (name.title(), value)) +print(response2.read()) # body response2.close() + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export FFLAGS + /usr/bin/python3 setup.py build running build running build_py creating build creating build/lib creating build/lib/mechanize copying mechanize/_urllib2_fork.py -> build/lib/mechanize copying mechanize/_response.py -> build/lib/mechanize copying mechanize/_http.py -> build/lib/mechanize copying mechanize/_version.py -> build/lib/mechanize copying mechanize/_util.py -> build/lib/mechanize copying mechanize/_useragent.py -> build/lib/mechanize copying mechanize/_urllib2.py -> build/lib/mechanize copying mechanize/_testcase.py -> build/lib/mechanize copying mechanize/_sockettimeout.py -> build/lib/mechanize copying mechanize/_sgmllib_copy.py -> build/lib/mechanize copying mechanize/_rfc3986.py -> build/lib/mechanize copying mechanize/_request.py -> build/lib/mechanize copying mechanize/_pullparser.py -> build/lib/mechanize copying mechanize/_opener.py -> build/lib/mechanize copying mechanize/_msiecookiejar.py -> build/lib/mechanize copying mechanize/_mozillacookiejar.py -> build/lib/mechanize copying mechanize/_mechanize.py -> build/lib/mechanize copying mechanize/_markupbase.py -> build/lib/mechanize copying mechanize/_lwpcookiejar.py -> build/lib/mechanize copying mechanize/_html.py -> build/lib/mechanize copying mechanize/_headersutil.py -> build/lib/mechanize copying mechanize/_gzip.py -> build/lib/mechanize copying mechanize/_form.py -> build/lib/mechanize copying mechanize/_firefox3cookiejar.py -> build/lib/mechanize copying mechanize/_debug.py -> build/lib/mechanize copying mechanize/_clientcookie.py -> build/lib/mechanize copying mechanize/_beautifulsoup.py -> build/lib/mechanize copying mechanize/_auth.py -> build/lib/mechanize copying mechanize/__init__.py -> build/lib/mechanize + popd ~/RPM/BUILD/mechanize-0.2.5 + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.75060 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python-module-mechanize-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python-module-mechanize-buildroot + PATH=/usr/libexec/rpm-build:/usr/src/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games + cd mechanize-0.2.5 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export FFLAGS + /usr/bin/python2.7 setup.py install --skip-build --root=/usr/src/tmp/python-module-mechanize-buildroot --force running install running install_lib creating /usr/src/tmp/python-module-mechanize-buildroot creating /usr/src/tmp/python-module-mechanize-buildroot/usr creating /usr/src/tmp/python-module-mechanize-buildroot/usr/lib creating /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7 creating /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages creating /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/__init__.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_auth.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_beautifulsoup.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_clientcookie.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_debug.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_firefox3cookiejar.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_form.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_gzip.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_headersutil.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_html.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_http.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_lwpcookiejar.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_markupbase.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_mechanize.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_mozillacookiejar.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_msiecookiejar.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_opener.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_pullparser.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_request.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_response.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_rfc3986.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_sgmllib_copy.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_sockettimeout.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_testcase.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_urllib2.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_urllib2_fork.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_useragent.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_util.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize copying build/lib/mechanize/_version.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py to __init__.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_auth.py to _auth.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_beautifulsoup.py to _beautifulsoup.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_clientcookie.py to _clientcookie.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_debug.py to _debug.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_firefox3cookiejar.py to _firefox3cookiejar.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_form.py to _form.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_gzip.py to _gzip.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_headersutil.py to _headersutil.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_html.py to _html.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_http.py to _http.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_lwpcookiejar.py to _lwpcookiejar.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_markupbase.py to _markupbase.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_mechanize.py to _mechanize.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_mozillacookiejar.py to _mozillacookiejar.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_msiecookiejar.py to _msiecookiejar.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_opener.py to _opener.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_pullparser.py to _pullparser.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_request.py to _request.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_response.py to _response.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_rfc3986.py to _rfc3986.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_sgmllib_copy.py to _sgmllib_copy.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_sockettimeout.py to _sockettimeout.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_testcase.py to _testcase.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2.py to _urllib2.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py to _urllib2_fork.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_useragent.py to _useragent.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_util.py to _util.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_version.py to _version.pyc running install_egg_info running egg_info writing mechanize.egg-info/PKG-INFO writing top-level names to mechanize.egg-info/top_level.txt writing dependency_links to mechanize.egg-info/dependency_links.txt reading manifest file 'mechanize.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'mechanize.egg-info/SOURCES.txt' Copying mechanize.egg-info to /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize-0.2.5-py2.7.egg-info running install_scripts + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/mechanize-0.2.5 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2' + export FFLAGS + /usr/bin/python3 setup.py install --skip-build --root=/usr/src/tmp/python-module-mechanize-buildroot --force running install running install_lib creating /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3 creating /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages creating /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/__init__.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_auth.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_beautifulsoup.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_clientcookie.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_debug.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_firefox3cookiejar.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_form.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_gzip.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_headersutil.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_html.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_lwpcookiejar.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_markupbase.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_mechanize.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_mozillacookiejar.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_msiecookiejar.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_opener.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_pullparser.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_request.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_rfc3986.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_sgmllib_copy.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_sockettimeout.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_testcase.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_urllib2.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_useragent.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_util.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_version.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_http.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_response.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize copying build/lib/mechanize/_urllib2_fork.py -> /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py to __init__.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_auth.py to _auth.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_beautifulsoup.py to _beautifulsoup.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_clientcookie.py to _clientcookie.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_debug.py to _debug.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_firefox3cookiejar.py to _firefox3cookiejar.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_form.py to _form.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_gzip.py to _gzip.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_headersutil.py to _headersutil.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_html.py to _html.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_lwpcookiejar.py to _lwpcookiejar.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_markupbase.py to _markupbase.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_mechanize.py to _mechanize.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_mozillacookiejar.py to _mozillacookiejar.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_msiecookiejar.py to _msiecookiejar.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_opener.py to _opener.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_pullparser.py to _pullparser.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_request.py to _request.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_rfc3986.py to _rfc3986.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_sgmllib_copy.py to _sgmllib_copy.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_sockettimeout.py to _sockettimeout.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_testcase.py to _testcase.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2.py to _urllib2.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_useragent.py to _useragent.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_util.py to _util.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_version.py to _version.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_http.py to _http.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_response.py to _response.cpython-37.pyc byte-compiling /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py to _urllib2_fork.cpython-37.pyc running install_egg_info running egg_info writing mechanize.egg-info/PKG-INFO writing dependency_links to mechanize.egg-info/dependency_links.txt writing top-level names to mechanize.egg-info/top_level.txt reading manifest file 'mechanize.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'mechanize.egg-info/SOURCES.txt' Copying mechanize.egg-info to /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize-0.2.5-py3.7.egg-info running install_scripts + popd ~/RPM/BUILD/mechanize-0.2.5 + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python-module-mechanize-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python-module-mechanize-buildroot (binconfig,pkgconfig,libtool,desktop,gnuconfig) Checking contents of files in /usr/src/tmp/python-module-mechanize-buildroot/ (default) Compressing files in /usr/src/tmp/python-module-mechanize-buildroot (auto) Adjusting library links in /usr/src/tmp/python-module-mechanize-buildroot ./usr/lib: Verifying ELF objects in /usr/src/tmp/python-module-mechanize-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal) Bytecompiling python modules in /usr/src/tmp/python-module-mechanize-buildroot using /usr/bin/python2.7 unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_auth.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_beautifulsoup.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_clientcookie.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_debug.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_firefox3cookiejar.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_form.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_gzip.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_headersutil.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_html.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_http.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_lwpcookiejar.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_markupbase.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_mechanize.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_mozillacookiejar.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_msiecookiejar.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_opener.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_pullparser.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_request.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_response.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_rfc3986.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_sgmllib_copy.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_sockettimeout.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_testcase.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_useragent.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_util.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_version.pyc compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_auth.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_beautifulsoup.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_clientcookie.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_debug.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_firefox3cookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_form.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_gzip.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_headersutil.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_html.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_http.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_lwpcookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_markupbase.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_mechanize.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_mozillacookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_msiecookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_opener.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_pullparser.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_request.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_response.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_rfc3986.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_sgmllib_copy.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_sockettimeout.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_testcase.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_useragent.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_util.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_version.py Bytecompiling python modules with optimization in /usr/src/tmp/python-module-mechanize-buildroot using /usr/bin/python2.7 -O compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_auth.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_beautifulsoup.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_clientcookie.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_debug.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_firefox3cookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_form.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_gzip.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_headersutil.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_html.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_http.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_lwpcookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_markupbase.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_mechanize.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_mozillacookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_msiecookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_opener.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_pullparser.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_request.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_response.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_rfc3986.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_sgmllib_copy.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_sockettimeout.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_testcase.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_useragent.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_util.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_version.py Bytecompiling python3 modules in /usr/src/tmp/python-module-mechanize-buildroot using /usr/bin/python3 unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/__init__.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_auth.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_beautifulsoup.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_clientcookie.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_debug.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_firefox3cookiejar.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_form.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_gzip.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_headersutil.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_html.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_http.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_lwpcookiejar.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_markupbase.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_mechanize.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_mozillacookiejar.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_msiecookiejar.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_opener.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_pullparser.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_request.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_response.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_rfc3986.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_sgmllib_copy.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_sockettimeout.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_testcase.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2_fork.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_useragent.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_util.cpython-37.pyc unlink /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__pycache__/_version.cpython-37.pyc compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_auth.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_beautifulsoup.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_clientcookie.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_debug.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_firefox3cookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_form.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_gzip.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_headersutil.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_html.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_http.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_lwpcookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_markupbase.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_mechanize.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_mozillacookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_msiecookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_opener.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_pullparser.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_request.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_response.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_rfc3986.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_sgmllib_copy.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_sockettimeout.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_testcase.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_useragent.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_util.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_version.py Bytecompiling python3 modules with optimization in /usr/src/tmp/python-module-mechanize-buildroot using /usr/bin/python3 -O compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_auth.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_beautifulsoup.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_clientcookie.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_debug.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_firefox3cookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_form.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_gzip.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_headersutil.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_html.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_http.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_lwpcookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_markupbase.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_mechanize.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_mozillacookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_msiecookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_opener.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_pullparser.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_request.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_response.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_rfc3986.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_sgmllib_copy.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_sockettimeout.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_testcase.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_useragent.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_util.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_version.py Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python-module-mechanize-buildroot using /usr/bin/python3 -OO compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_auth.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_beautifulsoup.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_clientcookie.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_debug.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_firefox3cookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_form.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_gzip.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_headersutil.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_html.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_http.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_lwpcookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_markupbase.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_mechanize.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_mozillacookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_msiecookiejar.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_opener.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_pullparser.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_request.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_response.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_rfc3986.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_sgmllib_copy.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_sockettimeout.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_testcase.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_useragent.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_util.py compile /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_version.py Hardlinking identical .pyc and .opt-?.pyc files './usr/lib/python3/site-packages/mechanize/__pycache__/_version.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_version.cpython-37.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_useragent.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_useragent.cpython-37.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2.cpython-37.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2.cpython-37.opt-2.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2.cpython-37.opt-1.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_testcase.cpython-37.opt-2.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_testcase.cpython-37.opt-1.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_sockettimeout.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_sockettimeout.cpython-37.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_sockettimeout.cpython-37.opt-2.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_sockettimeout.cpython-37.opt-1.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_sgmllib_copy.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_sgmllib_copy.cpython-37.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_rfc3986.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_rfc3986.cpython-37.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_request.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_request.cpython-37.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_opener.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_opener.cpython-37.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_mozillacookiejar.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_mozillacookiejar.cpython-37.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_mechanize.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_mechanize.cpython-37.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_lwpcookiejar.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_lwpcookiejar.cpython-37.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_gzip.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_gzip.cpython-37.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_gzip.cpython-37.opt-2.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_gzip.cpython-37.opt-1.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_firefox3cookiejar.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_firefox3cookiejar.cpython-37.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_debug.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_debug.cpython-37.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_debug.cpython-37.opt-2.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_debug.cpython-37.opt-1.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_beautifulsoup.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_beautifulsoup.cpython-37.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/_auth.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/_auth.cpython-37.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/__init__.cpython-37.opt-1.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/__init__.cpython-37.pyc' './usr/lib/python3/site-packages/mechanize/__pycache__/__init__.cpython-37.opt-2.pyc' => './usr/lib/python3/site-packages/mechanize/__pycache__/__init__.cpython-37.opt-1.pyc' Hardlinking identical .pyc and .pyo files './usr/lib/python2.7/site-packages/mechanize/_version.pyo' => './usr/lib/python2.7/site-packages/mechanize/_version.pyc' './usr/lib/python2.7/site-packages/mechanize/_useragent.pyo' => './usr/lib/python2.7/site-packages/mechanize/_useragent.pyc' './usr/lib/python2.7/site-packages/mechanize/_urllib2.pyo' => './usr/lib/python2.7/site-packages/mechanize/_urllib2.pyc' './usr/lib/python2.7/site-packages/mechanize/_sockettimeout.pyo' => './usr/lib/python2.7/site-packages/mechanize/_sockettimeout.pyc' './usr/lib/python2.7/site-packages/mechanize/_sgmllib_copy.pyo' => './usr/lib/python2.7/site-packages/mechanize/_sgmllib_copy.pyc' './usr/lib/python2.7/site-packages/mechanize/_rfc3986.pyo' => './usr/lib/python2.7/site-packages/mechanize/_rfc3986.pyc' './usr/lib/python2.7/site-packages/mechanize/_request.pyo' => './usr/lib/python2.7/site-packages/mechanize/_request.pyc' './usr/lib/python2.7/site-packages/mechanize/_opener.pyo' => './usr/lib/python2.7/site-packages/mechanize/_opener.pyc' './usr/lib/python2.7/site-packages/mechanize/_mozillacookiejar.pyo' => './usr/lib/python2.7/site-packages/mechanize/_mozillacookiejar.pyc' './usr/lib/python2.7/site-packages/mechanize/_mechanize.pyo' => './usr/lib/python2.7/site-packages/mechanize/_mechanize.pyc' './usr/lib/python2.7/site-packages/mechanize/_lwpcookiejar.pyo' => './usr/lib/python2.7/site-packages/mechanize/_lwpcookiejar.pyc' './usr/lib/python2.7/site-packages/mechanize/_gzip.pyo' => './usr/lib/python2.7/site-packages/mechanize/_gzip.pyc' './usr/lib/python2.7/site-packages/mechanize/_firefox3cookiejar.pyo' => './usr/lib/python2.7/site-packages/mechanize/_firefox3cookiejar.pyc' './usr/lib/python2.7/site-packages/mechanize/_debug.pyo' => './usr/lib/python2.7/site-packages/mechanize/_debug.pyc' './usr/lib/python2.7/site-packages/mechanize/_beautifulsoup.pyo' => './usr/lib/python2.7/site-packages/mechanize/_beautifulsoup.pyc' './usr/lib/python2.7/site-packages/mechanize/_auth.pyo' => './usr/lib/python2.7/site-packages/mechanize/_auth.pyc' './usr/lib/python2.7/site-packages/mechanize/__init__.pyo' => './usr/lib/python2.7/site-packages/mechanize/__init__.pyc' Processing files: python-module-mechanize-0.2.5-alt1.1.1.2 Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.66081 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd mechanize-0.2.5 + DOCDIR=/usr/src/tmp/python-module-mechanize-buildroot/usr/share/doc/python-module-mechanize-0.2.5 + export DOCDIR + rm -rf /usr/src/tmp/python-module-mechanize-buildroot/usr/share/doc/python-module-mechanize-0.2.5 + /bin/mkdir -p /usr/src/tmp/python-module-mechanize-buildroot/usr/share/doc/python-module-mechanize-0.2.5 + cp -prL docs/ examples/ /usr/src/tmp/python-module-mechanize-buildroot/usr/share/doc/python-module-mechanize-0.2.5 + chmod -R go-w /usr/src/tmp/python-module-mechanize-buildroot/usr/share/doc/python-module-mechanize-0.2.5 + chmod -R a+rX /usr/src/tmp/python-module-mechanize-buildroot/usr/share/doc/python-module-mechanize-0.2.5 + exit 0 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.b9On45 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.Wm20lp find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks,systemd-services) python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: skipping sys python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: hiding _version, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: hiding _mechanize, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: hiding _useragent, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: hiding _html, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: hiding _urllib2, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: hiding _urllib2, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: hiding _http, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: hiding _http, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: hiding _opener, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: hiding _response, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: hiding _rfc3986, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: hiding _util, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: hiding _clientcookie, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: hiding _lwpcookiejar, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: line=158 IGNORE (for REQ=slight and deep=12) module=sqlite3 /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: line=162 IGNORE (for REQ=slight and deep=12) module=_firefox3cookiejar python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: hiding _mozillacookiejar, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: hiding _msiecookiejar, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/__init__.py: hiding _form, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_auth.py: hiding _urllib2_fork, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_beautifulsoup.py: hiding _sgmllib_copy, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_beautifulsoup.py: hiding _sgmllib_copy, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_beautifulsoup.py: line=1075 IGNORE (for REQ=slight and deep=8) module=sys python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_clientcookie.py: skipping sys /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_clientcookie.py: line=37 IGNORE (for REQ=slight and deep=8) module=threading /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_clientcookie.py: line=40 IGNORE (for REQ=slight and deep=8) module=dummy_threading python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_clientcookie.py: hiding _headersutil, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_clientcookie.py: hiding _util, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_clientcookie.py: hiding _rfc3986, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_clientcookie.py: line=58 IGNORE (for REQ=slight and deep=8) module=mechanize /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_clientcookie.py: line=58 IGNORE (for REQ=slight and deep=8) module=warnings /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_clientcookie.py: line=66 IGNORE (for REQ=slight and deep=8) module=traceback /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_clientcookie.py: line=66 IGNORE (for REQ=slight and deep=8) module=StringIO python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_debug.py: hiding _response, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_debug.py: hiding _urllib2_fork, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_firefox3cookiejar.py: hiding _clientcookie, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_firefox3cookiejar.py: hiding _util, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_firefox3cookiejar.py: line=60 IGNORE (for REQ=slight and deep=11) module=sqlite3 python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_form.py: skipping sys python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_form.py: hiding _beautifulsoup, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_form.py: hiding _request, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_form.py: hiding _sgmllib_copy, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_form.py: line=160 IGNORE (for REQ=slight and deep=8) module=htmlentitydefs /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_form.py: line=161 IGNORE (for REQ=slight and deep=8) module=codecs python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_gzip.py: hiding _response, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_gzip.py: hiding _urllib2_fork, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_gzip.py: line=46 IGNORE (for REQ=slight and deep=15) module=zlib python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_headersutil.py: hiding _util, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_headersutil.py: hiding _rfc3986, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_headersutil.py: line=237 IGNORE (for REQ=slight and deep=8) module=doctest /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_headersutil.py: line=237 IGNORE (for REQ=slight and deep=8) module=_headersutil python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_html.py: hiding _sgmllib_copy, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_html.py: hiding _beautifulsoup, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_html.py: hiding _form, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_html.py: hiding _headersutil, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_html.py: hiding _request, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_html.py: hiding _rfc3986, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_html.py: line=131 IGNORE (for REQ=slight and deep=11) module=_pullparser /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_html.py: line=251 IGNORE (for REQ=slight and deep=11) module=_pullparser /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_html.py: line=276 IGNORE (for REQ=slight and deep=11) module=_pullparser python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_http.py: hiding _sgmllib_copy, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_http.py: hiding _urllib2_fork, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_http.py: hiding _headersutil, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_http.py: hiding _html, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_http.py: hiding _request, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_http.py: hiding _response, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_http.py: hiding _rfc3986, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_http.py: hiding _sockettimeout, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_http.py: line=227 IGNORE (for REQ=slight and deep=11) module=_opener /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_http.py: line=275 IGNORE (for REQ=slight and deep=11) module=httplib /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_http.py: line=277 IGNORE (for REQ=slight and deep=11) module=mimetools python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_lwpcookiejar.py: hiding _clientcookie, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_lwpcookiejar.py: hiding _headersutil, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_lwpcookiejar.py: hiding _util, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_mechanize.py: hiding _html, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_mechanize.py: hiding _response, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_mechanize.py: hiding _request, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_mechanize.py: hiding _rfc3986, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_mechanize.py: hiding _sockettimeout, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_mechanize.py: hiding _urllib2_fork, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_mechanize.py: hiding _useragent, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_mozillacookiejar.py: hiding _clientcookie, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_msiecookiejar.py: line=16 IGNORE (for REQ=slight and deep=8) module=_winreg python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_msiecookiejar.py: hiding _clientcookie, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_opener.py: line=13 IGNORE (for REQ=slight and deep=8) module=threading /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_opener.py: line=15 IGNORE (for REQ=slight and deep=8) module=dummy_threading /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_opener.py: line=19 IGNORE (for REQ=slight and deep=8) module=sets python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_opener.py: hiding _request, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_opener.py: hiding _response, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_opener.py: hiding _rfc3986, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_opener.py: hiding _sockettimeout, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_opener.py: hiding _urllib2_fork, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_opener.py: hiding _util, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_pullparser.py: hiding _sgmllib_copy, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_pullparser.py: hiding _html, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_pullparser.py: line=387 IGNORE (for REQ=slight and deep=8) module=doctest /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_pullparser.py: line=387 IGNORE (for REQ=slight and deep=8) module=_pullparser python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_request.py: hiding _rfc3986, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_request.py: hiding _sockettimeout, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_request.py: hiding _urllib2_fork, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_rfc3986.py: line=244 IGNORE (for REQ=slight and deep=8) module=doctest /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_sgmllib_copy.py: line=523 IGNORE (for REQ=slight and deep=8) module=sys python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2.py: hiding _auth, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2.py: hiding _debug, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2.py: hiding _urllib2_fork, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2.py: hiding _http, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2.py: line=44 IGNORE (for REQ=slight and deep=8) module=_urllib2_fork python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2.py: hiding _opener, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2.py: hiding _request, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py: skipping sys /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py: line=48 IGNORE (for REQ=slight and deep=8) module=cStringIO /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py: line=50 IGNORE (for REQ=slight and deep=8) module=StringIO /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py: line=53 IGNORE (for REQ=slight and deep=8) module=hashlib /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py: line=56 IGNORE (for REQ=slight and deep=8) module=md5 /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py: line=57 IGNORE (for REQ=slight and deep=8) module=sha /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py: line=85 IGNORE (for REQ=slight and deep=12) module=re python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py: hiding _request, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py: hiding _rfc3986, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py: hiding _sockettimeout, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py: hiding _clientcookie, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py: hiding _response, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py: line=385 IGNORE (for REQ=slight and deep=8) module=types /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py: line=1280 IGNORE (for REQ=slight and deep=15) module=email /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py: line=1283 IGNORE (for REQ=slight and deep=15) module=email /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py: line=1284 IGNORE (for REQ=slight and deep=11) module=mimetypes /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py: line=1309 IGNORE (for REQ=slight and deep=11) module=ftplib /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py: line=1310 IGNORE (for REQ=slight and deep=11) module=mimetypes python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_useragent.py: hiding _auth, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_useragent.py: hiding _gzip, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_useragent.py: hiding _opener, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_useragent.py: hiding _response, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_useragent.py: hiding _sockettimeout, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python2.7/site-packages/mechanize/_useragent.py: hiding _urllib2, which SEEMS TO BE SELF-SATISFIED Provides: python2.7-module-mechanize = 0.2.5-alt1.1.1.2, python2.7(mechanize), python2.7(mechanize._auth), python2.7(mechanize._beautifulsoup), python2.7(mechanize._clientcookie), python2.7(mechanize._debug), python2.7(mechanize._firefox3cookiejar), python2.7(mechanize._form), python2.7(mechanize._gzip), python2.7(mechanize._headersutil), python2.7(mechanize._html), python2.7(mechanize._http), python2.7(mechanize._lwpcookiejar), python2.7(mechanize._markupbase), python2.7(mechanize._mechanize), python2.7(mechanize._mozillacookiejar), python2.7(mechanize._msiecookiejar), python2.7(mechanize._opener), python2.7(mechanize._pullparser), python2.7(mechanize._request), python2.7(mechanize._response), python2.7(mechanize._rfc3986), python2.7(mechanize._sgmllib_copy), python2.7(mechanize._sockettimeout), python2.7(mechanize._testcase), python2.7(mechanize._urllib2), python2.7(mechanize._urllib2_fork), python2.7(mechanize._useragent), python2.7(mechanize._util), python2.7(mechanize._version) Requires: python = 2.7, /usr/lib/python2.7/site-packages, python-modules, python2.7(bisect), python2.7(inspect), python2.7(logging), python2.7(mimetools), python2.7(unittest), python2.7(xml) Processing files: python3-module-mechanize-0.2.5-alt1.1.1.2 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.l54KDO 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.Cphghh find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks,systemd-services) python3.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=119 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=122 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=127 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=128 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=135 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=136 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=142 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=143 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=144 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=145 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=147 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=148 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=151 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=154 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=158 IGNORE (for REQ=slight and deep=12) module=sqlite3 /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=162 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=163 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=164 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/__init__.py: line=167 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_auth.py: line=12 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_beautifulsoup.py: line=49 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_beautifulsoup.py: line=52 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_beautifulsoup.py: line=1075 IGNORE (for REQ=slight and deep=8) module=sys python3.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_clientcookie.py: skipping sys python3.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_clientcookie.py: skipping time /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_clientcookie.py: line=37 IGNORE (for REQ=slight and deep=8) module=threading /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_clientcookie.py: line=40 IGNORE (for REQ=slight and deep=8) module=dummy_threading /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_clientcookie.py: line=47 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_clientcookie.py: line=48 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_clientcookie.py: line=49 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_clientcookie.py: line=58 IGNORE (for REQ=slight and deep=8) module=mechanize /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_clientcookie.py: line=58 IGNORE (for REQ=slight and deep=8) module=warnings /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_clientcookie.py: line=66 IGNORE (for REQ=slight and deep=8) module=traceback /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_clientcookie.py: line=66 IGNORE (for REQ=slight and deep=8) module=io /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_debug.py: line=3 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_debug.py: line=4 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_firefox3cookiejar.py: skipping time /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_firefox3cookiejar.py: line=14 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_firefox3cookiejar.py: line=15 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_firefox3cookiejar.py: line=60 IGNORE (for REQ=slight and deep=11) module=sqlite3 python3.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_form.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_form.py: line=73 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_form.py: line=74 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_form.py: line=79 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_form.py: line=160 IGNORE (for REQ=slight and deep=8) module=html.entities /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_form.py: line=161 IGNORE (for REQ=slight and deep=8) module=codecs /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_gzip.py: line=3 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_gzip.py: line=4 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_gzip.py: line=46 IGNORE (for REQ=slight and deep=15) module=zlib /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_headersutil.py: line=17 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_headersutil.py: line=18 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_headersutil.py: line=237 IGNORE (for REQ=slight and deep=8) module=doctest /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_headersutil.py: line=237 IGNORE (for REQ=slight and deep=8) module=_headersutil /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_html.py: line=16 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_html.py: line=18 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_html.py: line=19 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_html.py: line=20 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_html.py: line=21 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_html.py: line=22 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_html.py: line=131 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_html.py: line=251 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_html.py: line=276 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_http.py: skipping time /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_http.py: line=23 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_http.py: line=24 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_http.py: line=26 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_http.py: line=27 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_http.py: line=28 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_http.py: line=29 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_http.py: line=30 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_http.py: line=31 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_http.py: line=227 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_http.py: line=275 IGNORE (for REQ=slight and deep=11) module=http.client /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_http.py: line=277 IGNORE (for REQ=slight and deep=11) module=email.message python3.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_lwpcookiejar.py: skipping time /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_lwpcookiejar.py: line=23 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_lwpcookiejar.py: line=25 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_lwpcookiejar.py: line=26 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_mechanize.py: line=14 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_mechanize.py: line=15 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_mechanize.py: line=16 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_mechanize.py: line=17 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_mechanize.py: line=18 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_mechanize.py: line=19 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_mechanize.py: line=20 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_mozillacookiejar.py: skipping time /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_mozillacookiejar.py: line=14 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_msiecookiejar.py: skipping time /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_msiecookiejar.py: line=16 IGNORE (for REQ=slight and deep=8) module=winreg /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_msiecookiejar.py: line=18 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_opener.py: line=13 IGNORE (for REQ=slight and deep=8) module=threading /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_opener.py: line=15 IGNORE (for REQ=slight and deep=8) module=dummy_threading /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_opener.py: line=19 IGNORE (for REQ=slight and deep=8) module=sets /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_opener.py: line=22 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_opener.py: line=23 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_opener.py: line=24 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_opener.py: line=25 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_opener.py: line=26 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_opener.py: line=27 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_pullparser.py: line=37 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_pullparser.py: line=41 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_pullparser.py: line=387 IGNORE (for REQ=slight and deep=8) module=doctest /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_pullparser.py: line=387 IGNORE (for REQ=slight and deep=8) module=_pullparser /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_request.py: line=13 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_request.py: line=14 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_request.py: line=15 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_rfc3986.py: line=244 IGNORE (for REQ=slight and deep=8) module=doctest /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_sgmllib_copy.py: line=523 IGNORE (for REQ=slight and deep=8) module=sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2.py: line=3 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2.py: line=6 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2.py: line=12 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2.py: line=32 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2.py: line=40 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2.py: line=42 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2.py: line=45 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: skipping sys python3.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: skipping time /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: line=48 IGNORE (for REQ=slight and deep=8) module=io /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: line=50 IGNORE (for REQ=slight and deep=8) module=io /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: line=53 IGNORE (for REQ=slight and deep=8) module=hashlib /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: line=56 IGNORE (for REQ=slight and deep=8) module=md5 /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: line=57 IGNORE (for REQ=slight and deep=8) module=sha /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: line=85 IGNORE (for REQ=slight and deep=12) module=re /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: line=99 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: line=100 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: line=101 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: line=103 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: line=104 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: line=382 IGNORE (for REQ=slight and deep=8) module=types /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: line=1277 IGNORE (for REQ=slight and deep=15) module=email.utils /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: line=1280 IGNORE (for REQ=slight and deep=15) module=email.Utils /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: line=1281 IGNORE (for REQ=slight and deep=11) module=mimetypes /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: line=1306 IGNORE (for REQ=slight and deep=11) module=ftplib /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_urllib2_fork.py: line=1307 IGNORE (for REQ=slight and deep=11) module=mimetypes /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_useragent.py: line=16 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_useragent.py: line=17 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_useragent.py: line=18 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_useragent.py: line=19 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_useragent.py: line=20 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_useragent.py: line=21 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python-module-mechanize-buildroot/usr/lib/python3/site-packages/mechanize/_util.py: skipping time Provides: python3(mechanize), python3(mechanize._auth), python3(mechanize._beautifulsoup), python3(mechanize._clientcookie), python3(mechanize._debug), python3(mechanize._firefox3cookiejar), python3(mechanize._form), python3(mechanize._gzip), python3(mechanize._headersutil), python3(mechanize._html), python3(mechanize._http), python3(mechanize._lwpcookiejar), python3(mechanize._markupbase), python3(mechanize._mechanize), python3(mechanize._mozillacookiejar), python3(mechanize._msiecookiejar), python3(mechanize._opener), python3(mechanize._pullparser), python3(mechanize._request), python3(mechanize._response), python3(mechanize._rfc3986), python3(mechanize._sgmllib_copy), python3(mechanize._sockettimeout), python3(mechanize._testcase), python3(mechanize._urllib2), python3(mechanize._urllib2_fork), python3(mechanize._useragent), python3(mechanize._util), python3(mechanize._version) Requires: /usr/lib/python3/site-packages, python3(base64) < 0, python3(bisect) < 0, python3(calendar) < 0, python3(codecs) < 0, python3(copy) < 0, python3(email.message) < 0, python3(html.entities) < 0, python3(html.parser) < 0, python3(http.client) < 0, python3(inspect) < 0, python3(io) < 0, python3(logging) < 0, python3(os) < 0, python3(posixpath) < 0, python3(random) < 0, python3(re) < 0, python3(sgmllib) < 0, python3(shutil) < 0, python3(socket) < 0, python3(struct) < 0, python3(subprocess) < 0, python3(tempfile) < 0, python3(types) < 0, python3(unittest) < 0, python3(urllib) < 0, python3(urllib.error) < 0, python3(urllib.parse) < 0, python3(urllib.request) < 0, python3(urllib.robotparser) < 0, python3(warnings) < 0, python3(xml.sax) < 0 Wrote: /usr/src/RPM/RPMS/noarch/python-module-mechanize-0.2.5-alt1.1.1.2.noarch.rpm (w2.lzdio) Wrote: /usr/src/RPM/RPMS/noarch/python3-module-mechanize-0.2.5-alt1.1.1.2.noarch.rpm (w2.lzdio) 29.82user 1.34system 0:34.11elapsed 91%CPU (0avgtext+0avgdata 80736maxresident)k 0inputs+0outputs (0major+392418minor)pagefaults 0swaps 37.08user 4.91system 0:43.98elapsed 95%CPU (0avgtext+0avgdata 121480maxresident)k 0inputs+0outputs (51369major+811042minor)pagefaults 0swaps --- python-module-mechanize-0.2.5-alt1.1.1.2.noarch.rpm.repo 2018-05-22 11:03:59.000000000 +0000 +++ python-module-mechanize-0.2.5-alt1.1.1.2.noarch.rpm.hasher 2022-04-10 07:56:12.683599396 +0000 @@ -185,7 +185,7 @@ File: /usr/lib/python2.7/site-packages/mechanize/_beautifulsoup.py 100644 root:root 7a9d32700fd632405e8e5d2ebb6f0ebb -File: /usr/lib/python2.7/site-packages/mechanize/_beautifulsoup.pyc 100644 root:root 04e9de3d0c83ccdd8b2599c891e80173 -File: /usr/lib/python2.7/site-packages/mechanize/_beautifulsoup.pyo 100644 root:root 04e9de3d0c83ccdd8b2599c891e80173 +File: /usr/lib/python2.7/site-packages/mechanize/_beautifulsoup.pyc 100644 root:root 76bd093bf56cdfce5576d2b6c8de28ef +File: /usr/lib/python2.7/site-packages/mechanize/_beautifulsoup.pyo 100644 root:root 76bd093bf56cdfce5576d2b6c8de28ef File: /usr/lib/python2.7/site-packages/mechanize/_clientcookie.py 100644 root:root a45a703ecc7da2d2f8913174db6a42c7 -File: /usr/lib/python2.7/site-packages/mechanize/_clientcookie.pyc 100644 root:root 2281c85f2841a35beae771863d26b98c -File: /usr/lib/python2.7/site-packages/mechanize/_clientcookie.pyo 100644 root:root 47d5c04fd30cc3fbf7e33aca9600331d +File: /usr/lib/python2.7/site-packages/mechanize/_clientcookie.pyc 100644 root:root 43981f6887205d329949561d022f7f34 +File: /usr/lib/python2.7/site-packages/mechanize/_clientcookie.pyo 100644 root:root 406a14f1b1fea2ce0b545fc38d27b793 File: /usr/lib/python2.7/site-packages/mechanize/_debug.py 100644 root:root a585bf10ff98c271011421845fe4e2fb @@ -194,10 +194,10 @@ File: /usr/lib/python2.7/site-packages/mechanize/_firefox3cookiejar.py 100644 root:root 61c405586aca1cfd7311af910266e4d9 -File: /usr/lib/python2.7/site-packages/mechanize/_firefox3cookiejar.pyc 100644 root:root 7d2aa15682d1de8e8e18c0d40e38f28c -File: /usr/lib/python2.7/site-packages/mechanize/_firefox3cookiejar.pyo 100644 root:root 7d2aa15682d1de8e8e18c0d40e38f28c +File: /usr/lib/python2.7/site-packages/mechanize/_firefox3cookiejar.pyc 100644 root:root cf26e9b5b73751314b8d6b92be605874 +File: /usr/lib/python2.7/site-packages/mechanize/_firefox3cookiejar.pyo 100644 root:root cf26e9b5b73751314b8d6b92be605874 File: /usr/lib/python2.7/site-packages/mechanize/_form.py 100644 root:root d92aaae65522982e52efa684fdd0032c -File: /usr/lib/python2.7/site-packages/mechanize/_form.pyc 100644 root:root 4100625239cf52ad0a0caca60eab5d44 -File: /usr/lib/python2.7/site-packages/mechanize/_form.pyo 100644 root:root 8de2626b4b12517e68f1502b93971521 +File: /usr/lib/python2.7/site-packages/mechanize/_form.pyc 100644 root:root e557afda9850072c5743695f89dc63dc +File: /usr/lib/python2.7/site-packages/mechanize/_form.pyo 100644 root:root e3661c945f3a498b243b1add31d070b8 File: /usr/lib/python2.7/site-packages/mechanize/_gzip.py 100644 root:root ebc967bbc694973e510816625879b3bc -File: /usr/lib/python2.7/site-packages/mechanize/_gzip.pyc 100644 root:root ad403d7686653650eb41dd2c83075675 -File: /usr/lib/python2.7/site-packages/mechanize/_gzip.pyo 100644 root:root ad403d7686653650eb41dd2c83075675 +File: /usr/lib/python2.7/site-packages/mechanize/_gzip.pyc 100644 root:root 94b399b7913c0b5cd4446c8bf28c79a2 +File: /usr/lib/python2.7/site-packages/mechanize/_gzip.pyo 100644 root:root 94b399b7913c0b5cd4446c8bf28c79a2 File: /usr/lib/python2.7/site-packages/mechanize/_headersutil.py 100644 root:root d3c343d1f2f598b92b33188f22aab011 @@ -206,4 +206,4 @@ File: /usr/lib/python2.7/site-packages/mechanize/_html.py 100644 root:root 17fdee3fba5ebceb2fd75595dd3d168e -File: /usr/lib/python2.7/site-packages/mechanize/_html.pyc 100644 root:root 1245ec150e718105f7f353a38b408ace -File: /usr/lib/python2.7/site-packages/mechanize/_html.pyo 100644 root:root 7b535a148a1070c92781bf9cea418dc8 +File: /usr/lib/python2.7/site-packages/mechanize/_html.pyc 100644 root:root f1fc674fdbf75e67d788d96201e86845 +File: /usr/lib/python2.7/site-packages/mechanize/_html.pyo 100644 root:root e803ae52796676a0bbb2048e104933d8 File: /usr/lib/python2.7/site-packages/mechanize/_http.py 100644 root:root 0a15433888fb356dd17b5107d27e1689 @@ -224,4 +224,4 @@ File: /usr/lib/python2.7/site-packages/mechanize/_msiecookiejar.py 100644 root:root 7893cdf5e5990b9f46eebc79e9934e30 -File: /usr/lib/python2.7/site-packages/mechanize/_msiecookiejar.pyc 100644 root:root 288fbd6818bd34c33518d443126fd177 -File: /usr/lib/python2.7/site-packages/mechanize/_msiecookiejar.pyo 100644 root:root 7f8d0d1df76878ecb5c940935fdaacdf +File: /usr/lib/python2.7/site-packages/mechanize/_msiecookiejar.pyc 100644 root:root 5f88d4ec549a5e34b926a682b7f6756d +File: /usr/lib/python2.7/site-packages/mechanize/_msiecookiejar.pyo 100644 root:root faa82f3f51207607f80c7712ed30ef6f File: /usr/lib/python2.7/site-packages/mechanize/_opener.py 100644 root:root 558b448769d6a53f764623430146f21a @@ -230,4 +230,4 @@ File: /usr/lib/python2.7/site-packages/mechanize/_pullparser.py 100644 root:root 604f8257212d533c58eb6a42b3a1b673 -File: /usr/lib/python2.7/site-packages/mechanize/_pullparser.pyc 100644 root:root 5292aefd28055f540f6604dc21113a4e -File: /usr/lib/python2.7/site-packages/mechanize/_pullparser.pyo 100644 root:root d44ab26cd6876c63118edd3e0a2d58c6 +File: /usr/lib/python2.7/site-packages/mechanize/_pullparser.pyc 100644 root:root 2f74913452ee28a8f16d92feb0e9b36e +File: /usr/lib/python2.7/site-packages/mechanize/_pullparser.pyo 100644 root:root 81b1fa863af696b3d8feb98e3fa4952a File: /usr/lib/python2.7/site-packages/mechanize/_request.py 100644 root:root 49f2835a32afd1a8e47ad2a631dc71f7 @@ -236,4 +236,4 @@ File: /usr/lib/python2.7/site-packages/mechanize/_response.py 100644 root:root ee56cfbd36a36dad3f33c6f23a381c5f -File: /usr/lib/python2.7/site-packages/mechanize/_response.pyc 100644 root:root a469a7a8bc5035f1df059b47c6ee58ba -File: /usr/lib/python2.7/site-packages/mechanize/_response.pyo 100644 root:root ebe9b3ec893f5d3f2d2a8c728f5b827b +File: /usr/lib/python2.7/site-packages/mechanize/_response.pyc 100644 root:root 2f3ae91cea04c42ce27a696611071b4f +File: /usr/lib/python2.7/site-packages/mechanize/_response.pyo 100644 root:root 171ef224be34fa1fa049c94710d1f845 File: /usr/lib/python2.7/site-packages/mechanize/_rfc3986.py 100644 root:root 11666cb01979297374f04226569f90ca @@ -242,4 +242,4 @@ File: /usr/lib/python2.7/site-packages/mechanize/_sgmllib_copy.py 100644 root:root 6c21880fa64dc9a20154d17470b778c1 -File: /usr/lib/python2.7/site-packages/mechanize/_sgmllib_copy.pyc 100644 root:root 94f9205196e74555d8d70ed08d3c016a -File: /usr/lib/python2.7/site-packages/mechanize/_sgmllib_copy.pyo 100644 root:root 94f9205196e74555d8d70ed08d3c016a +File: /usr/lib/python2.7/site-packages/mechanize/_sgmllib_copy.pyc 100644 root:root 32d4638a09a146c652fb5261eb16d074 +File: /usr/lib/python2.7/site-packages/mechanize/_sgmllib_copy.pyo 100644 root:root 32d4638a09a146c652fb5261eb16d074 File: /usr/lib/python2.7/site-packages/mechanize/_sockettimeout.py 100644 root:root 5d577a5eff4a4c43425325d5ee73801e @@ -248,4 +248,4 @@ File: /usr/lib/python2.7/site-packages/mechanize/_testcase.py 100644 root:root 2b1bf7744034ba44fe39614aea9bf1bd -File: /usr/lib/python2.7/site-packages/mechanize/_testcase.pyc 100644 root:root bb8ac59f30ccfc261b6495b42c7fcbef -File: /usr/lib/python2.7/site-packages/mechanize/_testcase.pyo 100644 root:root 9a2bb0d970652ef34f6ce39c1ce9f96d +File: /usr/lib/python2.7/site-packages/mechanize/_testcase.pyc 100644 root:root 807f2df6e716218dbd2b98e7713cc9bd +File: /usr/lib/python2.7/site-packages/mechanize/_testcase.pyo 100644 root:root 5ad3816c4b2840592298641233c8943b File: /usr/lib/python2.7/site-packages/mechanize/_urllib2.py 100644 root:root 0459afa5287ab7efbc654a548162d994 @@ -254,4 +254,4 @@ File: /usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py 100644 root:root ddfb9b7111f9d0f7749b3432beb57cde -File: /usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.pyc 100644 root:root 3b89ba1afb7e5600f697c07e29d43774 -File: /usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.pyo 100644 root:root b1f27878bb16af599ac7683d3099319b +File: /usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.pyc 100644 root:root 8c41d248110f7cc714aa9679fa110e2b +File: /usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.pyo 100644 root:root fb3ca0c424fa0d836e156f171360f793 File: /usr/lib/python2.7/site-packages/mechanize/_useragent.py 100644 root:root ecc6c66c21b39dc3622bc66f0b521a6e @@ -301,2 +301,2 @@ File: /usr/share/doc/python-module-mechanize-0.2.5/examples/pypi.py 100644 root:root b98d0ac741b227beb1fb0032b1592069 -RPMIdentity: 831e0c4e6b68d157bbafa76d45f7597c8a3c2eb8b44d1d510a49f6ed0f535f47095668f3068a3cead162f6021b86c998ae4101897c8ce9f2c2d5e7b836e1abb6 +RPMIdentity: 0c1d7d017a1f01475a224729f7d01cff2998141fe349f105410b2a92a6cffce19c43038cd94c54e025b8ceca90126c925294aec2c499b4117c7cee036fb8790d --- python3-module-mechanize-0.2.5-alt1.1.1.2.noarch.rpm.repo 2018-05-22 11:03:59.000000000 +0000 +++ python3-module-mechanize-0.2.5-alt1.1.1.2.noarch.rpm.hasher 2022-04-10 07:56:12.744599477 +0000 @@ -1,97 +1,97 @@ /usr/lib/python3/site-packages/mechanize 40755 root:root -/usr/lib/python3/site-packages/mechanize-0.2.5-py3.6.egg-info 40755 root:root -/usr/lib/python3/site-packages/mechanize-0.2.5-py3.6.egg-info/PKG-INFO 100644 root:root -/usr/lib/python3/site-packages/mechanize-0.2.5-py3.6.egg-info/SOURCES.txt 100644 root:root -/usr/lib/python3/site-packages/mechanize-0.2.5-py3.6.egg-info/dependency_links.txt 100644 root:root -/usr/lib/python3/site-packages/mechanize-0.2.5-py3.6.egg-info/top_level.txt 100644 root:root -/usr/lib/python3/site-packages/mechanize-0.2.5-py3.6.egg-info/zip-safe 100644 root:root +/usr/lib/python3/site-packages/mechanize-0.2.5-py3.7.egg-info 40755 root:root +/usr/lib/python3/site-packages/mechanize-0.2.5-py3.7.egg-info/PKG-INFO 100644 root:root +/usr/lib/python3/site-packages/mechanize-0.2.5-py3.7.egg-info/SOURCES.txt 100644 root:root +/usr/lib/python3/site-packages/mechanize-0.2.5-py3.7.egg-info/dependency_links.txt 100644 root:root +/usr/lib/python3/site-packages/mechanize-0.2.5-py3.7.egg-info/top_level.txt 100644 root:root +/usr/lib/python3/site-packages/mechanize-0.2.5-py3.7.egg-info/zip-safe 100644 root:root /usr/lib/python3/site-packages/mechanize/__init__.py 100644 root:root /usr/lib/python3/site-packages/mechanize/__pycache__ 40755 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/__init__.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/__init__.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/__init__.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_auth.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_auth.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_auth.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_beautifulsoup.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_beautifulsoup.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_beautifulsoup.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_clientcookie.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_clientcookie.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_clientcookie.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_debug.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_debug.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_debug.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_firefox3cookiejar.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_firefox3cookiejar.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_firefox3cookiejar.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_form.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_form.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_form.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_gzip.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_gzip.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_gzip.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_headersutil.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_headersutil.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_headersutil.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_html.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_html.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_html.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_http.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_http.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_http.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_lwpcookiejar.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_lwpcookiejar.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_lwpcookiejar.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_markupbase.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_markupbase.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_markupbase.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_mechanize.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_mechanize.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_mechanize.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_mozillacookiejar.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_mozillacookiejar.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_mozillacookiejar.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_msiecookiejar.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_msiecookiejar.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_msiecookiejar.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_opener.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_opener.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_opener.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_pullparser.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_pullparser.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_pullparser.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_request.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_request.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_request.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_response.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_response.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_response.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_rfc3986.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_rfc3986.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_rfc3986.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_sgmllib_copy.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_sgmllib_copy.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_sgmllib_copy.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_sockettimeout.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_sockettimeout.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_sockettimeout.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_testcase.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_testcase.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_testcase.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2_fork.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2_fork.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2_fork.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_useragent.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_useragent.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_useragent.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_util.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_util.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_util.cpython-36.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_version.cpython-36.opt-1.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_version.cpython-36.opt-2.pyc 100644 root:root -/usr/lib/python3/site-packages/mechanize/__pycache__/_version.cpython-36.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/__init__.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/__init__.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/__init__.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_auth.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_auth.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_auth.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_beautifulsoup.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_beautifulsoup.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_beautifulsoup.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_clientcookie.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_clientcookie.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_clientcookie.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_debug.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_debug.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_debug.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_firefox3cookiejar.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_firefox3cookiejar.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_firefox3cookiejar.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_form.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_form.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_form.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_gzip.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_gzip.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_gzip.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_headersutil.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_headersutil.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_headersutil.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_html.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_html.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_html.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_http.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_http.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_http.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_lwpcookiejar.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_lwpcookiejar.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_lwpcookiejar.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_markupbase.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_markupbase.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_markupbase.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_mechanize.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_mechanize.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_mechanize.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_mozillacookiejar.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_mozillacookiejar.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_mozillacookiejar.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_msiecookiejar.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_msiecookiejar.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_msiecookiejar.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_opener.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_opener.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_opener.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_pullparser.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_pullparser.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_pullparser.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_request.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_request.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_request.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_response.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_response.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_response.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_rfc3986.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_rfc3986.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_rfc3986.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_sgmllib_copy.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_sgmllib_copy.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_sgmllib_copy.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_sockettimeout.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_sockettimeout.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_sockettimeout.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_testcase.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_testcase.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_testcase.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2_fork.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2_fork.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2_fork.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_useragent.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_useragent.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_useragent.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_util.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_util.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_util.cpython-37.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_version.cpython-37.opt-1.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_version.cpython-37.opt-2.pyc 100644 root:root +/usr/lib/python3/site-packages/mechanize/__pycache__/_version.cpython-37.pyc 100644 root:root /usr/lib/python3/site-packages/mechanize/_auth.py 100644 root:root @@ -188,97 +188,97 @@ File: /usr/lib/python3/site-packages/mechanize 40755 root:root -File: /usr/lib/python3/site-packages/mechanize-0.2.5-py3.6.egg-info 40755 root:root -File: /usr/lib/python3/site-packages/mechanize-0.2.5-py3.6.egg-info/PKG-INFO 100644 root:root 4508870ae6478fec4a6575a260eecf44 -File: /usr/lib/python3/site-packages/mechanize-0.2.5-py3.6.egg-info/SOURCES.txt 100644 root:root c2414afe3c9e0ba4f3808489fc3d9f21 -File: /usr/lib/python3/site-packages/mechanize-0.2.5-py3.6.egg-info/dependency_links.txt 100644 root:root 68b329da9893e34099c7d8ad5cb9c940 -File: /usr/lib/python3/site-packages/mechanize-0.2.5-py3.6.egg-info/top_level.txt 100644 root:root a943bf2ca2071edb1a6b24b7aa57a750 -File: /usr/lib/python3/site-packages/mechanize-0.2.5-py3.6.egg-info/zip-safe 100644 root:root 68b329da9893e34099c7d8ad5cb9c940 +File: /usr/lib/python3/site-packages/mechanize-0.2.5-py3.7.egg-info 40755 root:root +File: /usr/lib/python3/site-packages/mechanize-0.2.5-py3.7.egg-info/PKG-INFO 100644 root:root 4508870ae6478fec4a6575a260eecf44 +File: /usr/lib/python3/site-packages/mechanize-0.2.5-py3.7.egg-info/SOURCES.txt 100644 root:root c2414afe3c9e0ba4f3808489fc3d9f21 +File: /usr/lib/python3/site-packages/mechanize-0.2.5-py3.7.egg-info/dependency_links.txt 100644 root:root 68b329da9893e34099c7d8ad5cb9c940 +File: /usr/lib/python3/site-packages/mechanize-0.2.5-py3.7.egg-info/top_level.txt 100644 root:root a943bf2ca2071edb1a6b24b7aa57a750 +File: /usr/lib/python3/site-packages/mechanize-0.2.5-py3.7.egg-info/zip-safe 100644 root:root 68b329da9893e34099c7d8ad5cb9c940 File: /usr/lib/python3/site-packages/mechanize/__init__.py 100644 root:root 2af8a75ec2ee8a0df478f87bec64046f File: /usr/lib/python3/site-packages/mechanize/__pycache__ 40755 root:root -File: /usr/lib/python3/site-packages/mechanize/__pycache__/__init__.cpython-36.opt-1.pyc 100644 root:root 287e138dd67716677f9898c600985320 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/__init__.cpython-36.opt-2.pyc 100644 root:root 287e138dd67716677f9898c600985320 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/__init__.cpython-36.pyc 100644 root:root 287e138dd67716677f9898c600985320 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_auth.cpython-36.opt-1.pyc 100644 root:root d1968274d814a0c19287a279275fc53d -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_auth.cpython-36.opt-2.pyc 100644 root:root 1da32a9de814b387743ccdbbe5143817 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_auth.cpython-36.pyc 100644 root:root d1968274d814a0c19287a279275fc53d -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_beautifulsoup.cpython-36.opt-1.pyc 100644 root:root fb7055a7e31cdb09f4e36e7d77842822 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_beautifulsoup.cpython-36.opt-2.pyc 100644 root:root 56015ffd5e8d9b1d07de82d854247bd2 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_beautifulsoup.cpython-36.pyc 100644 root:root fb7055a7e31cdb09f4e36e7d77842822 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_clientcookie.cpython-36.opt-1.pyc 100644 root:root e7606d95126c7d2c6d5a44bee7f059fb -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_clientcookie.cpython-36.opt-2.pyc 100644 root:root aa8359c7174d273812e9a470a9af7523 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_clientcookie.cpython-36.pyc 100644 root:root 294eb12f16a3de3be45801b1418e91f4 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_debug.cpython-36.opt-1.pyc 100644 root:root a7b370bfd083ccb4b4a85143d97a7d13 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_debug.cpython-36.opt-2.pyc 100644 root:root a7b370bfd083ccb4b4a85143d97a7d13 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_debug.cpython-36.pyc 100644 root:root a7b370bfd083ccb4b4a85143d97a7d13 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_firefox3cookiejar.cpython-36.opt-1.pyc 100644 root:root b0decbe8ba698482bb73accfb195640e -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_firefox3cookiejar.cpython-36.opt-2.pyc 100644 root:root 98a3c7d402b5cb79279385569212c010 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_firefox3cookiejar.cpython-36.pyc 100644 root:root b0decbe8ba698482bb73accfb195640e -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_form.cpython-36.opt-1.pyc 100644 root:root c83504e14dd9d3e3024f0ba242c11a15 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_form.cpython-36.opt-2.pyc 100644 root:root 1492d3418ea1fdaae404e53c9bcec068 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_form.cpython-36.pyc 100644 root:root 4fd58a9d5a94f2588323fde93481b20a -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_gzip.cpython-36.opt-1.pyc 100644 root:root 060a51610ff6699ae6093197410add8c -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_gzip.cpython-36.opt-2.pyc 100644 root:root 060a51610ff6699ae6093197410add8c -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_gzip.cpython-36.pyc 100644 root:root 060a51610ff6699ae6093197410add8c -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_headersutil.cpython-36.opt-1.pyc 100644 root:root 75ff1899f738d7f52add50f230fcb47e -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_headersutil.cpython-36.opt-2.pyc 100644 root:root 6da726422c296a70abcff38afe3a2865 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_headersutil.cpython-36.pyc 100644 root:root 090c984c076a01719be792f34864ccea -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_html.cpython-36.opt-1.pyc 100644 root:root c755dca632224f91e441841d5c8959e0 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_html.cpython-36.opt-2.pyc 100644 root:root 36163157ea934603b1a9e3325bdefb94 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_html.cpython-36.pyc 100644 root:root 3640cb34f74d9df8fe1dda71936df522 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_http.cpython-36.opt-1.pyc 100644 root:root 1aef8b83a44fc0482ba3df948a92bdb6 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_http.cpython-36.opt-2.pyc 100644 root:root f06e1f43427d464f888015f0df0719a4 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_http.cpython-36.pyc 100644 root:root be3757912c0cef066172cd15b3b46422 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_lwpcookiejar.cpython-36.opt-1.pyc 100644 root:root f5aec0204eeb3d37911a7628e0326e25 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_lwpcookiejar.cpython-36.opt-2.pyc 100644 root:root 90264ce420b621ae0132d83945b0e64d -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_lwpcookiejar.cpython-36.pyc 100644 root:root f5aec0204eeb3d37911a7628e0326e25 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_markupbase.cpython-36.opt-1.pyc 100644 root:root 0955adaab4e962e87390332551ad95fb -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_markupbase.cpython-36.opt-2.pyc 100644 root:root a42f877eb53c843f01ffe8285ece55c0 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_markupbase.cpython-36.pyc 100644 root:root e219bf38655d57cf96639819c73820bc -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_mechanize.cpython-36.opt-1.pyc 100644 root:root 10310a8d878cb7ba26dfe326fc238608 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_mechanize.cpython-36.opt-2.pyc 100644 root:root 08d962ef4f26940607f86de960394af8 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_mechanize.cpython-36.pyc 100644 root:root 10310a8d878cb7ba26dfe326fc238608 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_mozillacookiejar.cpython-36.opt-1.pyc 100644 root:root 97b14865b37d8ddeca4f534a3b277dcb -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_mozillacookiejar.cpython-36.opt-2.pyc 100644 root:root 4f7a12f9519293b71100bbf42f6b67c1 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_mozillacookiejar.cpython-36.pyc 100644 root:root 97b14865b37d8ddeca4f534a3b277dcb -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_msiecookiejar.cpython-36.opt-1.pyc 100644 root:root dd1c56ca6e8a53402aec424e186ea6cb -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_msiecookiejar.cpython-36.opt-2.pyc 100644 root:root e62e4e0d44c46e24d95d535e2a3617ca -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_msiecookiejar.cpython-36.pyc 100644 root:root fa4dbc4e2b8a88d1dcc5f737eb8dc2cc -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_opener.cpython-36.opt-1.pyc 100644 root:root 048760d93f2c2cc0e7293fca0db5284e -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_opener.cpython-36.opt-2.pyc 100644 root:root 5b80ce89be0ed44428952f96821965f0 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_opener.cpython-36.pyc 100644 root:root 048760d93f2c2cc0e7293fca0db5284e -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_pullparser.cpython-36.opt-1.pyc 100644 root:root b16230568bc0d5c18adbfe577dd1d55a -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_pullparser.cpython-36.opt-2.pyc 100644 root:root c7bfdbf27a0e559bb21dc6eb57c72686 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_pullparser.cpython-36.pyc 100644 root:root 62164490cc9dce3c8561c359f2d218c0 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_request.cpython-36.opt-1.pyc 100644 root:root 0be1fae844a744822f2df563f3685449 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_request.cpython-36.opt-2.pyc 100644 root:root b3e3d8a632c2f6eddffa2d214d1216e9 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_request.cpython-36.pyc 100644 root:root 0be1fae844a744822f2df563f3685449 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_response.cpython-36.opt-1.pyc 100644 root:root 9aa59dc49710d9769eb9d1cfa1372c3d -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_response.cpython-36.opt-2.pyc 100644 root:root 2a26e06491255f3b0ca95c2e8214fcc9 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_response.cpython-36.pyc 100644 root:root 4a020618e74d20aa337f4e101d52b866 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_rfc3986.cpython-36.opt-1.pyc 100644 root:root 6709b388ba5126effcc0310a7dbe8fc4 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_rfc3986.cpython-36.opt-2.pyc 100644 root:root 3cf126ebeda0ad7b45c3a01350e8140f -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_rfc3986.cpython-36.pyc 100644 root:root 6709b388ba5126effcc0310a7dbe8fc4 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_sgmllib_copy.cpython-36.opt-1.pyc 100644 root:root f93651a84034b23f1cdfad1f77e55a26 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_sgmllib_copy.cpython-36.opt-2.pyc 100644 root:root e364823aed0fd277d616794c1365233e -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_sgmllib_copy.cpython-36.pyc 100644 root:root f93651a84034b23f1cdfad1f77e55a26 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_sockettimeout.cpython-36.opt-1.pyc 100644 root:root 6f6549195e16ec4573ace9ef3d9c8ed6 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_sockettimeout.cpython-36.opt-2.pyc 100644 root:root 6f6549195e16ec4573ace9ef3d9c8ed6 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_sockettimeout.cpython-36.pyc 100644 root:root 6f6549195e16ec4573ace9ef3d9c8ed6 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_testcase.cpython-36.opt-1.pyc 100644 root:root 6f47dddb6c6244af3312d887b28772be -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_testcase.cpython-36.opt-2.pyc 100644 root:root 6f47dddb6c6244af3312d887b28772be -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_testcase.cpython-36.pyc 100644 root:root 876b4a383fd30c67196c07885d9d32da -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2.cpython-36.opt-1.pyc 100644 root:root 2c31a57b188dc853614fc110163656c8 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2.cpython-36.opt-2.pyc 100644 root:root 2c31a57b188dc853614fc110163656c8 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2.cpython-36.pyc 100644 root:root 2c31a57b188dc853614fc110163656c8 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2_fork.cpython-36.opt-1.pyc 100644 root:root fcd2a2bbd8c690c083455923d0ae0bb9 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2_fork.cpython-36.opt-2.pyc 100644 root:root c4513ad81c66648217ed81628112b6c8 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2_fork.cpython-36.pyc 100644 root:root e6ffccaf75866b99e3a0fe706d5008a3 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_useragent.cpython-36.opt-1.pyc 100644 root:root 5a66261189e195e3960d73fd66302c41 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_useragent.cpython-36.opt-2.pyc 100644 root:root 7f596403fe3b309abaa142a93a09349a -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_useragent.cpython-36.pyc 100644 root:root 5a66261189e195e3960d73fd66302c41 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_util.cpython-36.opt-1.pyc 100644 root:root 80df0f551d1039342b172780466ff487 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_util.cpython-36.opt-2.pyc 100644 root:root dd2f562c1d4c3af342861b84d962dbf3 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_util.cpython-36.pyc 100644 root:root 2fa4d813118e4e9922856e9cf8a21e74 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_version.cpython-36.opt-1.pyc 100644 root:root f832fb9912a636f39aebb22d7bd9eb58 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_version.cpython-36.opt-2.pyc 100644 root:root d9c089c8d2f5788125d228b3a9171a19 -File: /usr/lib/python3/site-packages/mechanize/__pycache__/_version.cpython-36.pyc 100644 root:root f832fb9912a636f39aebb22d7bd9eb58 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/__init__.cpython-37.opt-1.pyc 100644 root:root 627a920ef1fea27835685e5b0fbce2ac +File: /usr/lib/python3/site-packages/mechanize/__pycache__/__init__.cpython-37.opt-2.pyc 100644 root:root 627a920ef1fea27835685e5b0fbce2ac +File: /usr/lib/python3/site-packages/mechanize/__pycache__/__init__.cpython-37.pyc 100644 root:root 627a920ef1fea27835685e5b0fbce2ac +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_auth.cpython-37.opt-1.pyc 100644 root:root 8ab3600e71c01d6b3eb253af82248923 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_auth.cpython-37.opt-2.pyc 100644 root:root a394a7988877510f69c649f216401a25 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_auth.cpython-37.pyc 100644 root:root 8ab3600e71c01d6b3eb253af82248923 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_beautifulsoup.cpython-37.opt-1.pyc 100644 root:root 137ccd4c8231fdfbc354261f62e405ea +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_beautifulsoup.cpython-37.opt-2.pyc 100644 root:root c4ffc019b248ed177dc6099e60732ecb +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_beautifulsoup.cpython-37.pyc 100644 root:root 137ccd4c8231fdfbc354261f62e405ea +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_clientcookie.cpython-37.opt-1.pyc 100644 root:root 5990aafe604fd068fed577f67053451e +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_clientcookie.cpython-37.opt-2.pyc 100644 root:root 4f84be5db03b3ec126c0ad9fc78a4e18 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_clientcookie.cpython-37.pyc 100644 root:root b8301c21db0987f50e855692c360ea08 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_debug.cpython-37.opt-1.pyc 100644 root:root 2d3929981c62409ab6f2d3092177a7a8 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_debug.cpython-37.opt-2.pyc 100644 root:root 2d3929981c62409ab6f2d3092177a7a8 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_debug.cpython-37.pyc 100644 root:root 2d3929981c62409ab6f2d3092177a7a8 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_firefox3cookiejar.cpython-37.opt-1.pyc 100644 root:root 86e78a6d8204cf35728a18ac3a6693f2 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_firefox3cookiejar.cpython-37.opt-2.pyc 100644 root:root b48911e9590ded38083e7285272b83f2 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_firefox3cookiejar.cpython-37.pyc 100644 root:root 86e78a6d8204cf35728a18ac3a6693f2 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_form.cpython-37.opt-1.pyc 100644 root:root ca89901c6b1917c731711dc9d38dc97b +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_form.cpython-37.opt-2.pyc 100644 root:root 7505031f1add0d4332e3160c5f5e7e30 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_form.cpython-37.pyc 100644 root:root 3f23ccff731218267402b83e70a6ed92 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_gzip.cpython-37.opt-1.pyc 100644 root:root 89ede5614b43b7ba14a48e6734d2efb0 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_gzip.cpython-37.opt-2.pyc 100644 root:root 89ede5614b43b7ba14a48e6734d2efb0 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_gzip.cpython-37.pyc 100644 root:root 89ede5614b43b7ba14a48e6734d2efb0 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_headersutil.cpython-37.opt-1.pyc 100644 root:root bccd26257b04e79fd8ee4e3be2699344 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_headersutil.cpython-37.opt-2.pyc 100644 root:root ac247651681d2d5862a2c63878e5a42c +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_headersutil.cpython-37.pyc 100644 root:root 04a6f3e06c5bee647c8f7de17abf24a5 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_html.cpython-37.opt-1.pyc 100644 root:root ec806c13d7cbf9ecde2dbbc13799114f +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_html.cpython-37.opt-2.pyc 100644 root:root 9b2b37151d83c3bab728c4fdaf690469 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_html.cpython-37.pyc 100644 root:root b234314f44afb848bcfae86e89e73282 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_http.cpython-37.opt-1.pyc 100644 root:root c3d85c1bd35762f82dc5ae32bef92ac6 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_http.cpython-37.opt-2.pyc 100644 root:root 7469ba305a3b1b25b9b236489c7c378e +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_http.cpython-37.pyc 100644 root:root 48f05c85994eae7ebe530f741d3d161d +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_lwpcookiejar.cpython-37.opt-1.pyc 100644 root:root 0ee8a078fb02ceac22f00ad12f5dad20 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_lwpcookiejar.cpython-37.opt-2.pyc 100644 root:root d256d770fc9b23f202a90622fb5a0107 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_lwpcookiejar.cpython-37.pyc 100644 root:root 0ee8a078fb02ceac22f00ad12f5dad20 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_markupbase.cpython-37.opt-1.pyc 100644 root:root f825ae51f9038f1ee5e6f6f2e15a4c81 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_markupbase.cpython-37.opt-2.pyc 100644 root:root 26c14fb18c57ef821d8eacb1628e79c5 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_markupbase.cpython-37.pyc 100644 root:root 4370b9641fc4e2522d4711786ddcb214 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_mechanize.cpython-37.opt-1.pyc 100644 root:root deb7f57e89c0d15a46272591361c6be7 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_mechanize.cpython-37.opt-2.pyc 100644 root:root a0567f0c11d8a4f081da9017a5e008c6 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_mechanize.cpython-37.pyc 100644 root:root deb7f57e89c0d15a46272591361c6be7 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_mozillacookiejar.cpython-37.opt-1.pyc 100644 root:root 0ba7d1744aa759867b9c8a133d1e694c +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_mozillacookiejar.cpython-37.opt-2.pyc 100644 root:root 676eae3d6d65e958e21f6fa59b41c61f +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_mozillacookiejar.cpython-37.pyc 100644 root:root 0ba7d1744aa759867b9c8a133d1e694c +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_msiecookiejar.cpython-37.opt-1.pyc 100644 root:root e57f7bce99d892ae31d3ccf2ffecbba1 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_msiecookiejar.cpython-37.opt-2.pyc 100644 root:root 26d3254f024b230eb0cbd65074bbf3a0 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_msiecookiejar.cpython-37.pyc 100644 root:root 69bf1c233b424e13bb31aea240aa5fe8 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_opener.cpython-37.opt-1.pyc 100644 root:root e02b8cd76ece04098ade50d601a7b874 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_opener.cpython-37.opt-2.pyc 100644 root:root 9da67dde7d16a7c1dcff01be73d6e804 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_opener.cpython-37.pyc 100644 root:root e02b8cd76ece04098ade50d601a7b874 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_pullparser.cpython-37.opt-1.pyc 100644 root:root f3bec9d13a179b05fb8aec2804a4de21 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_pullparser.cpython-37.opt-2.pyc 100644 root:root aa80f299124391be4fe4b99131bb28c7 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_pullparser.cpython-37.pyc 100644 root:root c73927444583f49a708585f1d48712a8 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_request.cpython-37.opt-1.pyc 100644 root:root 2f2b932e4e4d206219f348a835095415 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_request.cpython-37.opt-2.pyc 100644 root:root 9225109412feb7e2b8ea143d56aed779 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_request.cpython-37.pyc 100644 root:root 2f2b932e4e4d206219f348a835095415 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_response.cpython-37.opt-1.pyc 100644 root:root 40921ac0584ca5306e3f39fd5f6ff6d8 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_response.cpython-37.opt-2.pyc 100644 root:root ca2051ad60cce71ffe34f382a9b348b8 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_response.cpython-37.pyc 100644 root:root cb6881ec795e84da6ede922536b839e8 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_rfc3986.cpython-37.opt-1.pyc 100644 root:root 8da37fcdd67514a6585552d491a26560 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_rfc3986.cpython-37.opt-2.pyc 100644 root:root 4983bd1e5fa518e3b6bf6542201b2ea0 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_rfc3986.cpython-37.pyc 100644 root:root 8da37fcdd67514a6585552d491a26560 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_sgmllib_copy.cpython-37.opt-1.pyc 100644 root:root b943b0c232f8f5a3b85554041b3af9b4 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_sgmllib_copy.cpython-37.opt-2.pyc 100644 root:root 3ec366d6c84a0747f7e388cb80553d87 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_sgmllib_copy.cpython-37.pyc 100644 root:root b943b0c232f8f5a3b85554041b3af9b4 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_sockettimeout.cpython-37.opt-1.pyc 100644 root:root 9853afc99210f26115e0c6923f7634e1 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_sockettimeout.cpython-37.opt-2.pyc 100644 root:root 9853afc99210f26115e0c6923f7634e1 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_sockettimeout.cpython-37.pyc 100644 root:root 9853afc99210f26115e0c6923f7634e1 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_testcase.cpython-37.opt-1.pyc 100644 root:root e6376f487ed55d893cc0426b58c45eac +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_testcase.cpython-37.opt-2.pyc 100644 root:root e6376f487ed55d893cc0426b58c45eac +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_testcase.cpython-37.pyc 100644 root:root 3cf8c0327d6d2c6aee6efa35f1e1cb4c +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2.cpython-37.opt-1.pyc 100644 root:root eede8d16c1432a52f26f379f4da4fa1e +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2.cpython-37.opt-2.pyc 100644 root:root eede8d16c1432a52f26f379f4da4fa1e +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2.cpython-37.pyc 100644 root:root eede8d16c1432a52f26f379f4da4fa1e +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2_fork.cpython-37.opt-1.pyc 100644 root:root 6a06c445b5dfd35f54fc62c709e886fc +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2_fork.cpython-37.opt-2.pyc 100644 root:root 05fe49c8774768143cdf44b823fc45d5 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_urllib2_fork.cpython-37.pyc 100644 root:root 1a6a594cd01be88bc63c3043d258052d +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_useragent.cpython-37.opt-1.pyc 100644 root:root fe30c2d1bb5fbf6af7c4dcea9e49f292 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_useragent.cpython-37.opt-2.pyc 100644 root:root b41603aec09a7b5df60e1995b0004448 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_useragent.cpython-37.pyc 100644 root:root fe30c2d1bb5fbf6af7c4dcea9e49f292 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_util.cpython-37.opt-1.pyc 100644 root:root bfb6a66c202c3ea1105347a40b0ebdcf +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_util.cpython-37.opt-2.pyc 100644 root:root f4ea49f9a1febc64823438778a9b1cf5 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_util.cpython-37.pyc 100644 root:root 4a62345932c9e4bc367bcfd8b0e64945 +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_version.cpython-37.opt-1.pyc 100644 root:root 99ac2008f7878e0a4ab5d13f66ff623b +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_version.cpython-37.opt-2.pyc 100644 root:root e3bed539ca55f466ed1f42560a75573a +File: /usr/lib/python3/site-packages/mechanize/__pycache__/_version.cpython-37.pyc 100644 root:root 99ac2008f7878e0a4ab5d13f66ff623b File: /usr/lib/python3/site-packages/mechanize/_auth.py 100644 root:root 5185d9a995704f507b367f32e0660083 @@ -311,2 +311,2 @@ File: /usr/lib/python3/site-packages/mechanize/_version.py 100644 root:root fadaa4e110ab270ae0f3b4731d1b2f04 -RPMIdentity: 2aa1e8cf8d25215b1acd44eb86526602f764355e39696a71f4ef48fa68fb0c22dd422c815ec458062765369b1d3724723e77c3073f97a3d270a3620feaefb6e0 +RPMIdentity: a4c467c27cd0bf751749c96edad85637a2c4b7ad0838a70e17494edcd227199b7283ca154476b1b0fd0611617970ee0b9f7f0fc063623b487f7daa81c7667f1f