launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25408
[Merge] ~cjwatson/launchpad:py3-xmlrpc-proxy-bytes into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:py3-xmlrpc-proxy-bytes into launchpad:master.
Commit message:
Encode URL to bytes for twisted.web.xmlrpc.Proxy
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/391484
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-xmlrpc-proxy-bytes into launchpad:master.
diff --git a/cronscripts/supermirror-pull.py b/cronscripts/supermirror-pull.py
index f230a88..5cf1196 100755
--- a/cronscripts/supermirror-pull.py
+++ b/cronscripts/supermirror-pull.py
@@ -53,8 +53,9 @@ if __name__ == '__main__':
log = set_up_logging_for_script(
options, 'supermirror_puller', options.log_file)
manager = scheduler.JobScheduler(
- LoggingProxy(config.codehosting.codehosting_endpoint, log), log,
- options.branch_type)
+ LoggingProxy(
+ config.codehosting.codehosting_endpoint.encode('UTF-8'), log),
+ log, options.branch_type)
reactor.callWhenRunning(run_mirror, log, manager)
reactor.run()
diff --git a/lib/lp/buildmaster/interactor.py b/lib/lp/buildmaster/interactor.py
index b1d9ccd..be6bb60 100644
--- a/lib/lp/buildmaster/interactor.py
+++ b/lib/lp/buildmaster/interactor.py
@@ -171,10 +171,11 @@ class BuilderSlave(object):
:param pool: Used by tests to override the HTTPConnectionPool.
:param process_pool: Used by tests to override the ProcessPool.
"""
- rpc_url = urlappend(builder_url.encode('utf-8'), 'rpc')
+ rpc_url = urlappend(builder_url, 'rpc')
if proxy is None:
server_proxy = xmlrpc.Proxy(
- rpc_url, allowNone=True, connectTimeout=timeout)
+ rpc_url.encode('UTF-8'), allowNone=True,
+ connectTimeout=timeout)
server_proxy.queryFactory = QuietQueryFactory
else:
server_proxy = proxy
diff --git a/lib/lp/buildmaster/model/buildfarmjobbehaviour.py b/lib/lp/buildmaster/model/buildfarmjobbehaviour.py
index 7140275..fa44fb9 100644
--- a/lib/lp/buildmaster/model/buildfarmjobbehaviour.py
+++ b/lib/lp/buildmaster/model/buildfarmjobbehaviour.py
@@ -54,7 +54,7 @@ class BuildFarmJobBehaviourBase:
self.build = build
self._builder = None
self._authserver = xmlrpc.Proxy(
- config.builddmaster.authentication_endpoint,
+ config.builddmaster.authentication_endpoint.encode('UTF-8'),
connectTimeout=config.builddmaster.authentication_timeout)
@property
diff --git a/lib/lp/codehosting/codeimport/tests/test_workermonitor.py b/lib/lp/codehosting/codeimport/tests/test_workermonitor.py
index 06635e3..9aaa3f3 100644
--- a/lib/lp/codehosting/codeimport/tests/test_workermonitor.py
+++ b/lib/lp/codehosting/codeimport/tests/test_workermonitor.py
@@ -868,7 +868,9 @@ class TestWorkerMonitorIntegration(TestCaseInTempDir, TestCase):
logger = BufferLogger()
monitor = CIWorkerMonitorForTesting(
job_id, logger,
- xmlrpc.Proxy(config.codeimportdispatcher.codeimportscheduler_url),
+ xmlrpc.Proxy(
+ config.codeimportdispatcher.codeimportscheduler_url.encode(
+ 'UTF-8')),
"anything")
deferred = monitor.run()
diff --git a/lib/lp/services/librarianserver/db.py b/lib/lp/services/librarianserver/db.py
index 3483935..dc59db5 100644
--- a/lib/lp/services/librarianserver/db.py
+++ b/lib/lp/services/librarianserver/db.py
@@ -51,7 +51,7 @@ class Library:
"""
self.restricted = restricted
self._authserver = xmlrpc.Proxy(
- config.librarian.authentication_endpoint,
+ config.librarian.authentication_endpoint.encode('UTF-8'),
connectTimeout=config.librarian.authentication_timeout)
# The following methods are read-only queries.
diff --git a/scripts/code-import-worker-monitor.py b/scripts/code-import-worker-monitor.py
index 15b193b..a505225 100755
--- a/scripts/code-import-worker-monitor.py
+++ b/scripts/code-import-worker-monitor.py
@@ -69,7 +69,9 @@ class CodeImportWorker(LaunchpadScript):
def _main(self, job_id):
worker = CodeImportWorkerMonitor(
job_id, self.logger,
- xmlrpc.Proxy(config.codeimportdispatcher.codeimportscheduler_url),
+ xmlrpc.Proxy(
+ config.codeimportdispatcher.codeimportscheduler_url.encode(
+ 'UTF-8')),
self.options.access_policy)
return worker.run()