idella4 14/08/12 14:06:27 Added: 3.2-extract_links.patch 3.2-aborted_write.patch 3.2-timeout.patch Log: add patches to fix testsuite (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0xB8072B0D)
Revision Changes Path 1.1 dev-python/dugong/files/3.2-extract_links.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/dugong/files/3.2-extract_links.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/dugong/files/3.2-extract_links.patch?rev=1.1&content-type=text/plain Index: 3.2-extract_links.patch =================================================================== # HG changeset patch # User Nikolaus Rath <nikol...@rath.org> # Date 1407732767 25200 # Node ID 1cfd473db8736251291e106ce6cd488011626276 # Parent cd7ad81f4eea24e530db152edd6d8831dc5bd7bc Make extract_links.py Python 3.3 compatible again. Fixes issue #15. diff --git a/examples/extract_links.py b/examples/extract_links.py --- a/examples/extract_links.py +++ b/examples/extract_links.py @@ -30,7 +30,11 @@ class LinkExtractor(HTMLParser): def __init__(self): - super().__init__(convert_charrefs=True) + if sys.version_info < (3,4): + # Python 3.3 doesn't know about convert_charrefs + super().__init__() + else: + super().__init__(convert_charrefs=True) self.links = [] def handle_starttag(self, tag, attrs): 1.1 dev-python/dugong/files/3.2-aborted_write.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/dugong/files/3.2-aborted_write.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/dugong/files/3.2-aborted_write.patch?rev=1.1&content-type=text/plain Index: 3.2-aborted_write.patch =================================================================== https://bitbucket.org/nikratio/python-dugong/issue/13/test_aborted_write-failures-in-latest diff --git a/test/test_dugong.py b/test/test_dugong.py --- a/test/test_dugong.py +++ b/test/test_dugong.py @@ -540,7 +540,7 @@ conn.readall() def test_aborted_write1(conn, monkeypatch): - BUFSIZE = 64*1024 + BUFSIZE = 640*1024 # Monkeypatch request handler def do_PUT(self): @@ -561,8 +561,9 @@ # Try to write data with pytest.raises(ConnectionClosed): - for _ in range(50): + for _ in range(5000): conn.write(b'f' * BUFSIZE) + time.sleep(0.1) # Nevertheless, try to read response resp = conn.read_response() @@ -570,7 +571,7 @@ assert resp.reason == 'Please stop!' def test_aborted_write2(conn, monkeypatch): - BUFSIZE = 64*1024 + BUFSIZE = 640*1024 # Monkeypatch request handler def do_PUT(self): @@ -589,8 +590,9 @@ # Try to write data with pytest.raises(ConnectionClosed): - for _ in range(50): + for _ in range(5000): conn.write(b'f' * BUFSIZE) + time.sleep(0.1) # Nevertheless, try to read response assert_raises(ConnectionClosed, conn.read_response) 1.1 dev-python/dugong/files/3.2-timeout.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/dugong/files/3.2-timeout.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/dugong/files/3.2-timeout.patch?rev=1.1&content-type=text/plain Index: 3.2-timeout.patch =================================================================== https://bitbucket.org/nikratio/python-dugong/issue/14/test_send_timeout-ssl-failure-in-latest diff --git a/test/test_dugong.py b/test/test_dugong.py --- a/test/test_dugong.py +++ b/test/test_dugong.py @@ -726,11 +728,11 @@ # We don't know how much data can be buffered, so we # claim to send a lot and do so in a loop. - len_ = 1024**3 + len_ = 10 * 1024**3 conn.send_request('PUT', '/recv_something', body=BodyFollowing(len_)) with pytest.raises(dugong.ConnectionTimedOut): while len_ > 0: - conn.write(b'x' * min(len_, 16*1024)) + conn.write(b'x' * min(len_, 640*1024)) DUMMY_DATA = ','.join(str(x) for x in range(10000)).encode()