Merge lp:~jelmer/brz/python3-httpish into lp:brz

Proposed by Jelmer Vernooij on 2018-08-14
Status: Merged
Approved by: Jelmer Vernooij on 2018-08-21
Approved revision: 7070
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/python3-httpish
Merge into: lp:brz
Diff against target: 120 lines (+28/-6)
3 files modified
breezy/tests/test_http_response.py (+3/-1)
breezy/transport/http/_urllib2_wrappers.py (+1/-1)
python3.passing (+24/-4)
To merge this branch: bzr merge lp:~jelmer/brz/python3-httpish
Reviewer Review Type Date Requested Status
Martin Packman 2018-08-14 Approve on 2018-08-20
Review via email: mp+353132@code.launchpad.net

Description of the change

Fix another 28 HTTP tests on Python 3.

To post a comment you must log in.
Martin Packman (gz) wrote :

Thanks!

review: Approve
The Breezy Bot (the-breezy-bot) wrote :

Running landing tests failed
https://ci.breezy-vcs.org/job/land-brz/411/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/tests/test_http_response.py'
2--- breezy/tests/test_http_response.py 2018-06-20 21:37:51 +0000
3+++ breezy/tests/test_http_response.py 2018-08-15 01:38:18 +0000
4@@ -39,8 +39,10 @@
5
6 try:
7 import http.client as http_client
8+ parse_headers = http_client.parse_headers
9 except ImportError: # python < 3
10 import httplib as http_client
11+ parse_headers = http_client.HTTPMessage
12
13 from .. import (
14 errors,
15@@ -719,7 +721,7 @@
16 status_and_headers = BytesIO(raw_headers)
17 # Get rid of the status line
18 status_and_headers.readline()
19- msg = http_client.HTTPMessage(status_and_headers)
20+ msg = parse_headers(status_and_headers)
21 return msg
22
23 def get_response(self, a_response):
24
25=== modified file 'breezy/transport/http/_urllib2_wrappers.py'
26--- breezy/transport/http/_urllib2_wrappers.py 2018-08-01 22:51:01 +0000
27+++ breezy/transport/http/_urllib2_wrappers.py 2018-08-15 01:38:18 +0000
28@@ -770,7 +770,7 @@
29 url = request.get_full_url()
30 print(' Failed again, %s %r' % (method, url))
31 print(' Will raise: [%r]' % my_exception)
32- reraise(my_exception, None, exc_tb)
33+ reraise(type(my_exception), my_exception, exc_tb)
34 return response
35
36 def do_open(self, http_class, request, first_try=True):
37
38=== modified file 'python3.passing'
39--- python3.passing 2018-08-08 02:10:06 +0000
40+++ python3.passing 2018-08-15 01:38:18 +0000
41@@ -9130,16 +9130,16 @@
42 breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_ordered_no_closure(RemoteRepositoryFormat-v2)
43 breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_ordered_no_closure(RepositoryFormat2a)
44 breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_ordered_no_closure(RepositoryFormat2aSubtree)
45-breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_unordered_fetch_complex_split(RemoteRepositoryFormat-default)
46-breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_unordered_fetch_complex_split(RemoteRepositoryFormat-v2)
47-breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_unordered_fetch_complex_split(RepositoryFormat2a)
48-breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_unordered_fetch_complex_split(RepositoryFormat2aSubtree)
49 breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_ordered_no_closure(RepositoryFormatKnitPack5)
50 breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_ordered_no_closure(RepositoryFormatKnitPack5RichRoot)
51 breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_ordered_no_closure(RepositoryFormatKnitPack5RichRootBroken)
52 breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_ordered_no_closure(RepositoryFormatKnitPack6)
53 breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_ordered_no_closure(RepositoryFormatKnitPack6RichRoot)
54 breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_ordered_no_closure(RepositoryFormatPackDevelopment2Subtree)
55+breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_unordered_fetch_complex_split(RemoteRepositoryFormat-default)
56+breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_unordered_fetch_complex_split(RemoteRepositoryFormat-v2)
57+breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_unordered_fetch_complex_split(RepositoryFormat2a)
58+breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_unordered_fetch_complex_split(RepositoryFormat2aSubtree)
59 breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_unordered_fetch_complex_split(RepositoryFormatKnitPack5)
60 breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_unordered_fetch_complex_split(RepositoryFormatKnitPack5RichRoot)
61 breezy.tests.per_repository_reference.test_get_record_stream.TestGetRecordStream.test_unordered_fetch_complex_split(RepositoryFormatKnitPack5RichRootBroken)
62@@ -24679,7 +24679,13 @@
63 breezy.tests.test_http_response.TestHandleResponse.test_full_text_no_content_type
64 breezy.tests.test_http_response.TestHandleResponse.test_invalid_response
65 breezy.tests.test_http_response.TestHandleResponse.test_missing_content_range
66+breezy.tests.test_http_response.TestHandleResponse.test_multipart_no_boundary
67 breezy.tests.test_http_response.TestHandleResponse.test_multipart_no_content_range
68+breezy.tests.test_http_response.TestHandleResponse.test_multi_range
69+breezy.tests.test_http_response.TestHandleResponse.test_multi_squid_range
70+breezy.tests.test_http_response.TestHandleResponse.test_single_range
71+breezy.tests.test_http_response.TestHandleResponse.test_single_range_no_content
72+breezy.tests.test_http_response.TestHandleResponse.test_single_range_truncated
73 breezy.tests.test_http_response.TestHTTPConnection.test_cleanup_pipe
74 breezy.tests.test_http_response.TestRangeFileMultipleRangesQuotedBoundaries.test_can_read_at_first_access
75 breezy.tests.test_http_response.TestRangeFileMultipleRangesQuotedBoundaries.test_checked_read_dont_overflow_buffers
76@@ -24839,8 +24845,14 @@
77 breezy.tests.test_http.TestAuth.test_wrong_pass(urllib,HTTP/1.1,basic)
78 breezy.tests.test_http.TestAuth.test_wrong_pass(urllib,HTTP/1.1,basicdigest)
79 breezy.tests.test_http.TestAuth.test_wrong_pass(urllib,HTTP/1.1,digest)
80+breezy.tests.test_http.TestBadProtocolServer.test_http_get(urllib,HTTP/1.0)
81+breezy.tests.test_http.TestBadProtocolServer.test_http_get(urllib,HTTP/1.1)
82+breezy.tests.test_http.TestBadProtocolServer.test_http_has(urllib,HTTP/1.0)
83+breezy.tests.test_http.TestBadProtocolServer.test_http_has(urllib,HTTP/1.1)
84 breezy.tests.test_http.TestBadStatusServer.test_http_get(urllib,HTTP/1.0)
85+breezy.tests.test_http.TestBadStatusServer.test_http_get(urllib,HTTP/1.1)
86 breezy.tests.test_http.TestBadStatusServer.test_http_has(urllib,HTTP/1.0)
87+breezy.tests.test_http.TestBadStatusServer.test_http_has(urllib,HTTP/1.1)
88 breezy.tests.test_http.TestDoCatchRedirections.test_no_redirection(urllib,HTTP/1.0)
89 breezy.tests.test_http.TestDoCatchRedirections.test_no_redirection(urllib,HTTP/1.1)
90 breezy.tests.test_http.TestDoCatchRedirections.test_one_redirection(urllib,HTTP/1.0)
91@@ -24851,6 +24863,8 @@
92 breezy.tests.test_http.TestForbiddenServer.test_http_get(urllib,HTTP/1.1)
93 breezy.tests.test_http.TestForbiddenServer.test_http_has(urllib,HTTP/1.0)
94 breezy.tests.test_http.TestForbiddenServer.test_http_has(urllib,HTTP/1.1)
95+breezy.tests.test_http.TestHTTPConnections.test_has_on_bogus_host(urllib,HTTP/1.0)
96+breezy.tests.test_http.TestHTTPConnections.test_has_on_bogus_host(urllib,HTTP/1.1)
97 breezy.tests.test_http.TestHTTPConnections.test_http_get(urllib,HTTP/1.0)
98 breezy.tests.test_http.TestHTTPConnections.test_http_get(urllib,HTTP/1.1)
99 breezy.tests.test_http.TestHTTPConnections.test_http_has_not_found(urllib,HTTP/1.0)
100@@ -24888,7 +24902,9 @@
101 breezy.tests.test_http.TestHttpTransportUrls.test_http_root_urls(urllib)
102 breezy.tests.test_http.TestHttpTransportUrls.test_invalid_http_urls(urllib)
103 breezy.tests.test_http.TestInvalidStatusServer.test_http_get(urllib,HTTP/1.0)
104+breezy.tests.test_http.TestInvalidStatusServer.test_http_get(urllib,HTTP/1.1)
105 breezy.tests.test_http.TestInvalidStatusServer.test_http_has(urllib,HTTP/1.0)
106+breezy.tests.test_http.TestInvalidStatusServer.test_http_has(urllib,HTTP/1.1)
107 breezy.tests.test_http.TestLimitedRangeRequestServer.test_few_ranges(urllib,HTTP/1.0)
108 breezy.tests.test_http.TestLimitedRangeRequestServer.test_few_ranges(urllib,HTTP/1.1)
109 breezy.tests.test_http.TestLimitedRangeRequestServer.test_more_ranges(urllib,HTTP/1.0)
110@@ -25066,6 +25082,10 @@
111 breezy.tests.test_http.TestTruncatedMultipleRangeServer.test_readv_with_short_reads(urllib,HTTP/1.0)
112 breezy.tests.test_http.TestTruncatedMultipleRangeServer.test_readv_with_short_reads(urllib,HTTP/1.1)
113 breezy.tests.test_http.TestUrllib2AuthHandler.test_get_user_password_without_port
114+breezy.tests.test_http.TestWallServer.test_http_get(urllib,HTTP/1.0)
115+breezy.tests.test_http.TestWallServer.test_http_get(urllib,HTTP/1.1)
116+breezy.tests.test_http.TestWallServer.test_http_has(urllib,HTTP/1.0)
117+breezy.tests.test_http.TestWallServer.test_http_has(urllib,HTTP/1.1)
118 breezy.tests.test_i18n.LoadPluginTranslations.test_does_not_exist
119 breezy.tests.test_i18n.TestGetTextPerParagraph.test_multiline
120 breezy.tests.test_i18n.TestGetTextPerParagraph.test_oneline

Subscribers

People subscribed via source and target branches