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

Proposed by Colin Watson on 2017-12-21
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 2017-12-21 Approve on 2018-01-30
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.
William Grant (wgrant) :
review: Approve (code)
18531. By Colin Watson on 2018-02-26

Sync up Twisted requirement in setup.py with constraints.txt.

18532. By Colin Watson on 2018-02-26

Upgrade to lazr.sshserver 0.1.7.

0.1.6 fixes a long-standing exception-handling bug when loading user-supplied
public keys, and 0.1.7 fixes a regression in 0.1.5.

18533. By Colin Watson on 2018-02-26

Merge devel.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'constraints.txt'
2--- constraints.txt 2018-02-21 15:25:48 +0000
3+++ constraints.txt 2018-02-26 12:48:14 +0000
4@@ -228,6 +228,9 @@
5 amqp==1.4.9
6 amqplib==1.0.2
7 anyjson==0.3.3
8+appdirs==1.4.3
9+asn1crypto==0.23.0
10+attrs==17.3.0
11 auditor==0.0.3
12 auditorclient==0.0.4
13 auditorfixture==0.0.7
14@@ -238,7 +241,10 @@
15 bson==0.3.3
16 bzr==2.6.0.lp.2
17 celery==3.1.18
18+cffi==1.11.2
19 Chameleon==2.11
20+constantly==15.1.0
21+cryptography==2.1.4
22 cssselect==0.9.1
23 cssutils==0.9.10
24 d2to1==0.2.12
25@@ -248,18 +254,23 @@
26 dnspython==1.10.0
27 dulwich==0.18.6
28 elementtree==1.2.6-20050316
29+enum34==1.1.6
30 epydoc==3.0.1
31 extras==1.0.0
32 feedparser==4.1
33 feedvalidator==0.0.0DEV-r1049
34 fixtures==3.0.0
35 FormEncode==1.2.4
36+gmpy==1.17
37 grokcore.component==1.6
38 html5browser==0.0.9
39 httmock==1.2.3
40 httplib2==0.8
41+idna==2.6
42 imagesize==0.7.1
43 importlib==1.0.2
44+incremental==17.5.0
45+ipaddress==1.0.18
46 ipython==0.13.2
47 iso8601==0.1.12
48 jsautobuild==0.2
49@@ -277,7 +288,7 @@
50 lazr.restful==0.20.1
51 lazr.restfulclient==0.13.2
52 lazr.smtptest==1.3
53-lazr.sshserver==0.1.3
54+lazr.sshserver==0.1.7
55 lazr.testing==0.1.1
56 lazr.uri==1.0.3
57 libnacl==1.3.6
58@@ -302,13 +313,16 @@
59 pbr==0.11.1
60 pgbouncer==0.0.8
61 prettytable==0.7.2
62+psutil==5.4.2
63 psycopg2==2.6.1
64-pyasn1==0.1.6
65+pyasn1==0.4.2
66+pyasn1-modules==0.2.1
67+pycparser==2.18
68 pycrypto==2.6
69 pygpgme==0.2
70 pyinotify==0.9.4
71 pymacaroons==0.9.2
72-pyOpenSSL==0.13
73+pyOpenSSL==17.5.0
74 pystache==0.5.3
75 python-dateutil==1.5
76 python-debian==0.1.23
77@@ -324,11 +338,12 @@
78 rabbitfixture==0.3.6
79 requests==2.7.0
80 requests-toolbelt==0.6.2
81+service-identity==17.0.0
82 setproctitle==1.1.7
83 setuptools-git==1.2
84 simplejson==3.8.2
85 SimpleTAL==4.3
86-six==1.9.0
87+six==1.11.0
88 snowballstemmer==1.2.1
89 soupmatchers==0.2
90 sphinxcontrib-websupport==1.0.1
91@@ -339,14 +354,9 @@
92 testresources==0.2.7
93 testscenarios==0.4
94 timeline==0.0.3
95-# Build of lp:~canonical-launchpad-branches/twisted:lp-backport.
96-# p1 Support diffie-hellman-group14-sha1 key exchange in conch.ssh.
97-# p2 Add diffie-hellman-group-exchange-sha256 to twisted.conch.ssh.
98-# Add support in twisted.conch.ssh for hmac-sha2-256 and hmac-sha2-512.
99-# post3 Use PEP 440-compliant version.
100-Twisted==13.0.0post3
101+Twisted[conch,tls]==16.5.0
102 txAMQP==0.6.2
103-txfixtures==0.1.4
104+txfixtures==0.4.1
105 txlongpoll==0.2.12
106 txlongpollfixture==0.1.3
107 txpkgupload==0.2
108
109=== modified file 'lib/lp/codehosting/tests/test_acceptance.py'
110--- lib/lp/codehosting/tests/test_acceptance.py 2016-12-31 05:01:10 +0000
111+++ lib/lp/codehosting/tests/test_acceptance.py 2018-02-26 12:48:14 +0000
112@@ -5,7 +5,6 @@
113
114 __metaclass__ = type
115
116-import atexit
117 import os
118 import re
119 import signal
120@@ -156,7 +155,6 @@
121 tac_handler = SSHServerLayer.getTacHandler()
122 tac_handler.setUp()
123 SSHServerLayer._reset()
124- atexit.register(tac_handler.tearDown)
125 forker = SSHServerLayer.getForker()
126 forker.setUp()
127
128
129=== modified file 'lib/lp/services/librarianserver/testing/server.py'
130--- lib/lp/services/librarianserver/testing/server.py 2016-06-02 17:52:38 +0000
131+++ lib/lp/services/librarianserver/testing/server.py 2018-02-26 12:48:14 +0000
132@@ -155,20 +155,24 @@
133 return
134 chunks = self.getLogChunks()
135 # A typical startup: upload, download, restricted up, restricted down.
136- #2010-10-20 14:28:21+0530 [-] Log opened.
137- #2010-10-20 14:28:21+0530 [-] twistd 10.1.0 (/usr/bin/python 2.6.5) starting up.
138- #2010-10-20 14:28:21+0530 [-] reactor class: twisted.internet.selectreactor.SelectReactor.
139- #2010-10-20 14:28:21+0530 [-] lp.services.librarianserver.libraryprotocol.FileUploadFactory starting on 59090
140- #2010-10-20 14:28:21+0530 [-] Starting factory <lp.services.librarianserver.libraryprotocol.FileUploadFactory instance at 0x6f8ff38>
141- #2010-10-20 14:28:21+0530 [-] twisted.web.server.Site starting on 58000
142- #2010-10-20 14:28:21+0530 [-] Starting factory <twisted.web.server.Site instance at 0x6fb2638>
143- #2010-10-20 14:28:21+0530 [-] lp.services.librarianserver.libraryprotocol.FileUploadFactory starting on 59095
144- #2010-10-20 14:28:21+0530 [-] Starting factory <lp.services.librarianserver.libraryprotocol.FileUploadFactory instance at 0x6fb25f0>
145- #2010-10-20 14:28:21+0530 [-] twisted.web.server.Site starting on 58005
146- self.upload_port = int(chunks[3].split()[-1])
147- self.download_port = int(chunks[5].split()[-1])
148- self.restricted_upload_port = int(chunks[7].split()[-1])
149- self.restricted_download_port = int(chunks[9].split()[-1])
150+ #2017-12-09 06:33:13+0530 [-] Loading /home/ubuntu/launchpad/lp-branches/devel/daemons/librarian.tac...
151+ #2017-12-09 06:33:19+0530 [-] Loaded.
152+ #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.
153+ #2017-12-09 06:33:19+0530 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
154+ #2017-12-09 06:33:19+0530 [-] FileUploadFactory starting on 39851
155+ #2017-12-09 06:33:19+0530 [-] Starting factory <lp.services.librarianserver.libraryprotocol.FileUploadFactory instance at 0xf0ef80ac>
156+ #2017-12-09 06:33:19+0530 [-] Site starting on 45355
157+ #2017-12-09 06:33:19+0530 [-] Starting factory <twisted.web.server.Site instance at 0xf0ef848c>
158+ #2017-12-09 06:33:19+0530 [-] FileUploadFactory starting on 42150
159+ #2017-12-09 06:33:19+0530 [-] Starting factory <lp.services.librarianserver.libraryprotocol.FileUploadFactory instance at 0xf0ef856c>
160+ #2017-12-09 06:33:19+0530 [-] Site starting on 37341
161+ #2017-12-09 06:33:19+0530 [-] Starting factory <twisted.web.server.Site instance at 0xf0ef85ec>
162+ #2017-12-09 06:33:19+0530 [-] Not using upstream librarian
163+ #2017-12-09 06:33:19+0530 [-] daemon ready!
164+ self.upload_port = int(chunks[4].split()[-1])
165+ self.download_port = int(chunks[6].split()[-1])
166+ self.restricted_upload_port = int(chunks[8].split()[-1])
167+ self.restricted_download_port = int(chunks[10].split()[-1])
168 self.service_config = dedent("""\
169 [librarian_server]
170 root: %s
171
172=== modified file 'lib/lp/services/twistedsupport/tests/test_gracefulshutdown.py'
173--- lib/lp/services/twistedsupport/tests/test_gracefulshutdown.py 2015-10-14 15:22:01 +0000
174+++ lib/lp/services/twistedsupport/tests/test_gracefulshutdown.py 2018-02-26 12:48:14 +0000
175@@ -99,7 +99,7 @@
176
177 def make_dummy_http_request(self):
178 """Make a dummy HTTP request for tests."""
179- return http.Request('fake channel', True)
180+ return http.Request(http.HTTPChannel(), True)
181
182 def test_200_when_available(self):
183 """When the factory is available a 200 response is generated."""
184
185=== modified file 'setup.py'
186--- setup.py 2017-12-22 09:59:33 +0000
187+++ setup.py 2018-02-26 12:48:14 +0000
188@@ -219,7 +219,7 @@
189 'testtools',
190 'timeline',
191 'transaction',
192- 'Twisted',
193+ 'Twisted[conch,tls]',
194 'txfixtures',
195 'txlongpoll',
196 'txlongpollfixture',