← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/turnip:twisted-20.3.0 into turnip:master

 

Colin Watson has proposed merging ~cjwatson/turnip:twisted-20.3.0 into turnip:master.

Commit message:
Upgrade to Twisted 20.3.0

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/turnip/+git/turnip/+merge/381014

twisted.test.proto_helpers has been deprecated in favour of twisted.internet.testing, so I updated all uses of the old name.

Dependencies MP: https://code.launchpad.net/~cjwatson/turnip/+git/dependencies/+merge/381013
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/turnip:twisted-20.3.0 into turnip:master.
diff --git a/requirements.txt b/requirements.txt
index e81dffb..a298c0a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -2,12 +2,13 @@ appdirs==1.4.3
 asn1crypto==1.3.0
 attrs==19.3.0
 Automat==20.2.0
+bcrypt==3.1.7
 beautifulsoup4==4.6.3
 cffi==1.14.0
 constantly==15.1.0
 contextlib2==0.4.0
 cornice==3.6.1
-cryptography==2.4.2
+cryptography==2.8
 docutils==0.14
 enum34==1.1.9
 envdir==0.7
@@ -48,7 +49,7 @@ six==1.14.0
 testtools==2.3.0
 traceback2==1.4.0
 translationstring==1.3
-Twisted[conch]==18.9.0
+Twisted[conch]==20.3.0
 unittest2==1.1.0
 venusian==2.1.0
 waitress==0.8.9
diff --git a/turnip/pack/tests/test_functional.py b/turnip/pack/tests/test_functional.py
index 8927b6f..cf20858 100644
--- a/turnip/pack/tests/test_functional.py
+++ b/turnip/pack/tests/test_functional.py
@@ -620,11 +620,12 @@ class TestSmartHTTPFrontendFunctional(FrontendFunctionalTestMixin, TestCase):
         # virtinfo servers started by the mixin.
         frontend_site = server.Site(
             SmartHTTPFrontendResource({
+                "main_site_root": "https://launchpad.test/";,
                 "pack_virt_host": "localhost",
                 "pack_virt_port": self.virt_port,
+                "repo_store": self.root,
                 "virtinfo_endpoint": self.virtinfo_url,
                 "virtinfo_timeout": "15",
-                "repo_store": self.root,
                 }))
         self.frontend_listener = reactor.listenTCP(0, frontend_site)
         self.port = self.frontend_listener.getHost().port
diff --git a/turnip/pack/tests/test_git.py b/turnip/pack/tests/test_git.py
index 3872bb7..802f031 100644
--- a/turnip/pack/tests/test_git.py
+++ b/turnip/pack/tests/test_git.py
@@ -23,8 +23,8 @@ from twisted.internet import (
     defer,
     reactor as default_reactor,
     task,
+    testing,
     )
-from twisted.test import proto_helpers
 from twisted.web import server
 
 from turnip.pack import (
@@ -51,7 +51,7 @@ class TestPackServerProtocol(TestCase):
     def setUp(self):
         super(TestPackServerProtocol, self).setUp()
         self.proto = DummyPackServerProtocol()
-        self.transport = proto_helpers.StringTransportWithDisconnection()
+        self.transport = testing.StringTransportWithDisconnection()
         self.transport.protocol = self.proto
         self.proto.makeConnection(self.transport)
 
@@ -130,7 +130,7 @@ class TestPackBackendProtocol(TestCase):
             self.root, self.hookrpc_handler, self.hookrpc_sock)
         self.proto = DummyPackBackendProtocol()
         self.proto.factory = self.factory
-        self.transport = proto_helpers.StringTransportWithDisconnection()
+        self.transport = testing.StringTransportWithDisconnection()
         self.transport.protocol = self.proto
         self.proto.makeConnection(self.transport)
 
@@ -257,7 +257,7 @@ class TestPackVirtServerProtocol(TestCase):
             b'localhost', backend_port, virtinfo_url, 5)
         proto = git.PackVirtServerProtocol()
         proto.factory = factory
-        self.transport = proto_helpers.StringTransportWithDisconnection()
+        self.transport = testing.StringTransportWithDisconnection()
         self.transport.protocol = proto
         proto.makeConnection(self.transport)
         proto.pauseProducing()
@@ -285,7 +285,7 @@ class TestPackVirtServerProtocol(TestCase):
             b'localhost', backend_port, virtinfo_url, 15, reactor=clock)
         proto = git.PackVirtServerProtocol()
         proto.factory = factory
-        self.transport = proto_helpers.StringTransportWithDisconnection()
+        self.transport = testing.StringTransportWithDisconnection()
         self.transport.protocol = proto
         proto.makeConnection(self.transport)
         d = proto.requestReceived(b'git-upload-pack', b'/example', {})
diff --git a/turnip/pack/tests/test_hookrpc.py b/turnip/pack/tests/test_hookrpc.py
index 2e49d72..e0344f5 100644
--- a/turnip/pack/tests/test_hookrpc.py
+++ b/turnip/pack/tests/test_hookrpc.py
@@ -31,8 +31,8 @@ from twisted.internet import (
     defer,
     reactor,
     task,
+    testing,
     )
-from twisted.test import proto_helpers
 from twisted.web import (
     server,
     xmlrpc,
@@ -72,7 +72,7 @@ class TestJSONNetStringProtocol(TestCase):
     def setUp(self):
         super(TestJSONNetStringProtocol, self).setUp()
         self.proto = DummyJSONNetstringProtocol()
-        self.transport = proto_helpers.StringTransportWithDisconnection()
+        self.transport = testing.StringTransportWithDisconnection()
         self.transport.protocol = self.proto
         self.proto.makeConnection(self.transport)
 
@@ -135,7 +135,7 @@ class TestRPCServerProtocol(TestCase):
             'unauthorized': unauthorized_rpc_method,
             'internal_server_error': internal_server_error_rpc_method,
             })
-        self.transport = proto_helpers.StringTransportWithDisconnection()
+        self.transport = testing.StringTransportWithDisconnection()
         self.transport.protocol = self.proto
         self.proto.makeConnection(self.transport)
 
diff --git a/turnip/pack/tests/test_http.py b/turnip/pack/tests/test_http.py
index 17e662d..26e2754 100644
--- a/turnip/pack/tests/test_http.py
+++ b/turnip/pack/tests/test_http.py
@@ -15,8 +15,8 @@ from twisted.internet import (
     defer,
     reactor as default_reactor,
     task,
+    testing,
     )
-from twisted.test import proto_helpers
 from twisted.web import server
 from twisted.web.test import requesthelper
 
@@ -80,8 +80,7 @@ class FakeRoot(object):
         return {}
 
     def connectToBackend(self, client_factory):
-        self.backend_transport = (
-            proto_helpers.StringTransportWithDisconnection())
+        self.backend_transport = testing.StringTransportWithDisconnection()
         p = client_factory.buildProtocol(None)
         self.backend_transport.protocol = p
         p.makeConnection(self.backend_transport)

Follow ups