launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24652
[Merge] ~cjwatson/launchpad-buildd:putchild-bytes into launchpad-buildd:master
Colin Watson has proposed merging ~cjwatson/launchpad-buildd:putchild-bytes into launchpad-buildd:master.
Commit message:
Always call Resource.putChild with path as bytes
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/383183
Twisted 19.7.0 deprecated passing path as non-bytes.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad-buildd:putchild-bytes into launchpad-buildd:master.
diff --git a/debian/changelog b/debian/changelog
index e549316..cb5db4b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
launchpad-buildd (190) UNRELEASED; urgency=medium
* Switch to git; add Vcs-* fields.
+ * Always call Resource.putChild with path as bytes.
-- Colin Watson <cjwatson@xxxxxxxxxx> Tue, 28 Apr 2020 10:19:27 +0100
diff --git a/lpbuildd/buildd-slave.tac b/lpbuildd/buildd-slave.tac
index 107f6df..e60bb35 100644
--- a/lpbuildd/buildd-slave.tac
+++ b/lpbuildd/buildd-slave.tac
@@ -55,8 +55,8 @@ builderService = service.IServiceCollection(application)
builder.builder.service = builderService
root = resource.Resource()
-root.putChild('rpc', builder)
-root.putChild('filecache', static.File(conf.get('slave', 'filecache')))
+root.putChild(b'rpc', builder)
+root.putChild(b'filecache', static.File(conf.get('slave', 'filecache')))
buildersite = server.Site(root)
strports.service("tcp:%s" % builder.builder._config.get("slave", "bindport"),
diff --git a/lpbuildd/tests/test_snap.py b/lpbuildd/tests/test_snap.py
index 6cc3f4e..e747048 100644
--- a/lpbuildd/tests/test_snap.py
+++ b/lpbuildd/tests/test_snap.py
@@ -392,8 +392,8 @@ class TestSnapBuildManagerIteration(TestCase):
def startFakeRemoteEndpoint(self):
remote_endpoint = resource.Resource()
- remote_endpoint.putChild("a", static.Data("a" * 1024, "text/plain"))
- remote_endpoint.putChild("b", static.Data("b" * 65536, "text/plain"))
+ remote_endpoint.putChild(b"a", static.Data(b"a" * 1024, "text/plain"))
+ remote_endpoint.putChild(b"b", static.Data(b"b" * 65536, "text/plain"))
remote_endpoint_listener = reactor.listenTCP(
0, server.Site(remote_endpoint))
self.addCleanup(remote_endpoint_listener.stopListening)