Merge lp:~cjwatson/launchpad/twisted-16.5.0 into lp:launchpad

Proposed by Colin Watson
Status: Merged
Merged at revision: 18562
Proposed branch: lp:~cjwatson/launchpad/twisted-16.5.0
Merge into: lp:launchpad
Prerequisite: lp:~cjwatson/launchpad/modern-testtools-cleanup
Diff against target: 196 lines (+41/-29)
5 files modified
constraints.txt (+21/-11)
lib/lp/codehosting/tests/test_acceptance.py (+0/-2)
lib/lp/services/librarianserver/testing/server.py (+18/-14)
lib/lp/services/twistedsupport/tests/test_gracefulshutdown.py (+1/-1)
setup.py (+1/-1)
To merge this branch: bzr merge lp:~cjwatson/launchpad/twisted-16.5.0
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+335534@code.launchpad.net

Commit message

Upgrade to Twisted 16.5.0.

Description of the change

As well as the various upgrades associated with Twisted itself, we also need lazr.sshserver 0.1.5 and txfixtures 0.4.1 for compatibility.

Going any further than 16.5.0 will require some performance testing due to https://twistedmatrix.com/trac/ticket/8079; we'll probably need to either monkey-patch gmpy into place ourselves or implement the suggested DH_compute_key changes in Twisted.

Since cryptography is rather stricter than PyCrypto, we should scan for registered SSH public keys it doesn't like before landing this and notify their owners: for example, very short DSA keys will now be refused.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'constraints.txt'
--- constraints.txt 2018-02-21 15:25:48 +0000
+++ constraints.txt 2018-02-26 12:48:14 +0000
@@ -228,6 +228,9 @@
228amqp==1.4.9228amqp==1.4.9
229amqplib==1.0.2229amqplib==1.0.2
230anyjson==0.3.3230anyjson==0.3.3
231appdirs==1.4.3
232asn1crypto==0.23.0
233attrs==17.3.0
231auditor==0.0.3234auditor==0.0.3
232auditorclient==0.0.4235auditorclient==0.0.4
233auditorfixture==0.0.7236auditorfixture==0.0.7
@@ -238,7 +241,10 @@
238bson==0.3.3241bson==0.3.3
239bzr==2.6.0.lp.2242bzr==2.6.0.lp.2
240celery==3.1.18243celery==3.1.18
244cffi==1.11.2
241Chameleon==2.11245Chameleon==2.11
246constantly==15.1.0
247cryptography==2.1.4
242cssselect==0.9.1248cssselect==0.9.1
243cssutils==0.9.10249cssutils==0.9.10
244d2to1==0.2.12250d2to1==0.2.12
@@ -248,18 +254,23 @@
248dnspython==1.10.0254dnspython==1.10.0
249dulwich==0.18.6255dulwich==0.18.6
250elementtree==1.2.6-20050316256elementtree==1.2.6-20050316
257enum34==1.1.6
251epydoc==3.0.1258epydoc==3.0.1
252extras==1.0.0259extras==1.0.0
253feedparser==4.1260feedparser==4.1
254feedvalidator==0.0.0DEV-r1049261feedvalidator==0.0.0DEV-r1049
255fixtures==3.0.0262fixtures==3.0.0
256FormEncode==1.2.4263FormEncode==1.2.4
264gmpy==1.17
257grokcore.component==1.6265grokcore.component==1.6
258html5browser==0.0.9266html5browser==0.0.9
259httmock==1.2.3267httmock==1.2.3
260httplib2==0.8268httplib2==0.8
269idna==2.6
261imagesize==0.7.1270imagesize==0.7.1
262importlib==1.0.2271importlib==1.0.2
272incremental==17.5.0
273ipaddress==1.0.18
263ipython==0.13.2274ipython==0.13.2
264iso8601==0.1.12275iso8601==0.1.12
265jsautobuild==0.2276jsautobuild==0.2
@@ -277,7 +288,7 @@
277lazr.restful==0.20.1288lazr.restful==0.20.1
278lazr.restfulclient==0.13.2289lazr.restfulclient==0.13.2
279lazr.smtptest==1.3290lazr.smtptest==1.3
280lazr.sshserver==0.1.3291lazr.sshserver==0.1.7
281lazr.testing==0.1.1292lazr.testing==0.1.1
282lazr.uri==1.0.3293lazr.uri==1.0.3
283libnacl==1.3.6294libnacl==1.3.6
@@ -302,13 +313,16 @@
302pbr==0.11.1313pbr==0.11.1
303pgbouncer==0.0.8314pgbouncer==0.0.8
304prettytable==0.7.2315prettytable==0.7.2
316psutil==5.4.2
305psycopg2==2.6.1317psycopg2==2.6.1
306pyasn1==0.1.6318pyasn1==0.4.2
319pyasn1-modules==0.2.1
320pycparser==2.18
307pycrypto==2.6321pycrypto==2.6
308pygpgme==0.2322pygpgme==0.2
309pyinotify==0.9.4323pyinotify==0.9.4
310pymacaroons==0.9.2324pymacaroons==0.9.2
311pyOpenSSL==0.13325pyOpenSSL==17.5.0
312pystache==0.5.3326pystache==0.5.3
313python-dateutil==1.5327python-dateutil==1.5
314python-debian==0.1.23328python-debian==0.1.23
@@ -324,11 +338,12 @@
324rabbitfixture==0.3.6338rabbitfixture==0.3.6
325requests==2.7.0339requests==2.7.0
326requests-toolbelt==0.6.2340requests-toolbelt==0.6.2
341service-identity==17.0.0
327setproctitle==1.1.7342setproctitle==1.1.7
328setuptools-git==1.2343setuptools-git==1.2
329simplejson==3.8.2344simplejson==3.8.2
330SimpleTAL==4.3345SimpleTAL==4.3
331six==1.9.0346six==1.11.0
332snowballstemmer==1.2.1347snowballstemmer==1.2.1
333soupmatchers==0.2348soupmatchers==0.2
334sphinxcontrib-websupport==1.0.1349sphinxcontrib-websupport==1.0.1
@@ -339,14 +354,9 @@
339testresources==0.2.7354testresources==0.2.7
340testscenarios==0.4355testscenarios==0.4
341timeline==0.0.3356timeline==0.0.3
342# Build of lp:~canonical-launchpad-branches/twisted:lp-backport.357Twisted[conch,tls]==16.5.0
343# p1 Support diffie-hellman-group14-sha1 key exchange in conch.ssh.
344# p2 Add diffie-hellman-group-exchange-sha256 to twisted.conch.ssh.
345# Add support in twisted.conch.ssh for hmac-sha2-256 and hmac-sha2-512.
346# post3 Use PEP 440-compliant version.
347Twisted==13.0.0post3
348txAMQP==0.6.2358txAMQP==0.6.2
349txfixtures==0.1.4359txfixtures==0.4.1
350txlongpoll==0.2.12360txlongpoll==0.2.12
351txlongpollfixture==0.1.3361txlongpollfixture==0.1.3
352txpkgupload==0.2362txpkgupload==0.2
353363
=== modified file 'lib/lp/codehosting/tests/test_acceptance.py'
--- lib/lp/codehosting/tests/test_acceptance.py 2016-12-31 05:01:10 +0000
+++ lib/lp/codehosting/tests/test_acceptance.py 2018-02-26 12:48:14 +0000
@@ -5,7 +5,6 @@
55
6__metaclass__ = type6__metaclass__ = type
77
8import atexit
9import os8import os
10import re9import re
11import signal10import signal
@@ -156,7 +155,6 @@
156 tac_handler = SSHServerLayer.getTacHandler()155 tac_handler = SSHServerLayer.getTacHandler()
157 tac_handler.setUp()156 tac_handler.setUp()
158 SSHServerLayer._reset()157 SSHServerLayer._reset()
159 atexit.register(tac_handler.tearDown)
160 forker = SSHServerLayer.getForker()158 forker = SSHServerLayer.getForker()
161 forker.setUp()159 forker.setUp()
162160
163161
=== modified file 'lib/lp/services/librarianserver/testing/server.py'
--- lib/lp/services/librarianserver/testing/server.py 2016-06-02 17:52:38 +0000
+++ lib/lp/services/librarianserver/testing/server.py 2018-02-26 12:48:14 +0000
@@ -155,20 +155,24 @@
155 return155 return
156 chunks = self.getLogChunks()156 chunks = self.getLogChunks()
157 # A typical startup: upload, download, restricted up, restricted down.157 # A typical startup: upload, download, restricted up, restricted down.
158 #2010-10-20 14:28:21+0530 [-] Log opened.158 #2017-12-09 06:33:13+0530 [-] Loading /home/ubuntu/launchpad/lp-branches/devel/daemons/librarian.tac...
159 #2010-10-20 14:28:21+0530 [-] twistd 10.1.0 (/usr/bin/python 2.6.5) starting up.159 #2017-12-09 06:33:19+0530 [-] Loaded.
160 #2010-10-20 14:28:21+0530 [-] reactor class: twisted.internet.selectreactor.SelectReactor.160 #2017-12-09 06:33:19+0530 [-] twistd 16.5.0 (/home/ubuntu/launchpad/lp-branches/devel/env/bin/python2.7 2.7.12) starting up.
161 #2010-10-20 14:28:21+0530 [-] lp.services.librarianserver.libraryprotocol.FileUploadFactory starting on 59090161 #2017-12-09 06:33:19+0530 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
162 #2010-10-20 14:28:21+0530 [-] Starting factory <lp.services.librarianserver.libraryprotocol.FileUploadFactory instance at 0x6f8ff38>162 #2017-12-09 06:33:19+0530 [-] FileUploadFactory starting on 39851
163 #2010-10-20 14:28:21+0530 [-] twisted.web.server.Site starting on 58000163 #2017-12-09 06:33:19+0530 [-] Starting factory <lp.services.librarianserver.libraryprotocol.FileUploadFactory instance at 0xf0ef80ac>
164 #2010-10-20 14:28:21+0530 [-] Starting factory <twisted.web.server.Site instance at 0x6fb2638>164 #2017-12-09 06:33:19+0530 [-] Site starting on 45355
165 #2010-10-20 14:28:21+0530 [-] lp.services.librarianserver.libraryprotocol.FileUploadFactory starting on 59095165 #2017-12-09 06:33:19+0530 [-] Starting factory <twisted.web.server.Site instance at 0xf0ef848c>
166 #2010-10-20 14:28:21+0530 [-] Starting factory <lp.services.librarianserver.libraryprotocol.FileUploadFactory instance at 0x6fb25f0>166 #2017-12-09 06:33:19+0530 [-] FileUploadFactory starting on 42150
167 #2010-10-20 14:28:21+0530 [-] twisted.web.server.Site starting on 58005167 #2017-12-09 06:33:19+0530 [-] Starting factory <lp.services.librarianserver.libraryprotocol.FileUploadFactory instance at 0xf0ef856c>
168 self.upload_port = int(chunks[3].split()[-1])168 #2017-12-09 06:33:19+0530 [-] Site starting on 37341
169 self.download_port = int(chunks[5].split()[-1])169 #2017-12-09 06:33:19+0530 [-] Starting factory <twisted.web.server.Site instance at 0xf0ef85ec>
170 self.restricted_upload_port = int(chunks[7].split()[-1])170 #2017-12-09 06:33:19+0530 [-] Not using upstream librarian
171 self.restricted_download_port = int(chunks[9].split()[-1])171 #2017-12-09 06:33:19+0530 [-] daemon ready!
172 self.upload_port = int(chunks[4].split()[-1])
173 self.download_port = int(chunks[6].split()[-1])
174 self.restricted_upload_port = int(chunks[8].split()[-1])
175 self.restricted_download_port = int(chunks[10].split()[-1])
172 self.service_config = dedent("""\176 self.service_config = dedent("""\
173 [librarian_server]177 [librarian_server]
174 root: %s178 root: %s
175179
=== modified file 'lib/lp/services/twistedsupport/tests/test_gracefulshutdown.py'
--- lib/lp/services/twistedsupport/tests/test_gracefulshutdown.py 2015-10-14 15:22:01 +0000
+++ lib/lp/services/twistedsupport/tests/test_gracefulshutdown.py 2018-02-26 12:48:14 +0000
@@ -99,7 +99,7 @@
9999
100 def make_dummy_http_request(self):100 def make_dummy_http_request(self):
101 """Make a dummy HTTP request for tests."""101 """Make a dummy HTTP request for tests."""
102 return http.Request('fake channel', True)102 return http.Request(http.HTTPChannel(), True)
103103
104 def test_200_when_available(self):104 def test_200_when_available(self):
105 """When the factory is available a 200 response is generated."""105 """When the factory is available a 200 response is generated."""
106106
=== modified file 'setup.py'
--- setup.py 2017-12-22 09:59:33 +0000
+++ setup.py 2018-02-26 12:48:14 +0000
@@ -219,7 +219,7 @@
219 'testtools',219 'testtools',
220 'timeline',220 'timeline',
221 'transaction',221 'transaction',
222 'Twisted',222 'Twisted[conch,tls]',
223 'txfixtures',223 'txfixtures',
224 'txlongpoll',224 'txlongpoll',
225 'txlongpollfixture',225 'txlongpollfixture',