Skip to content

Commit 9a40f9a

Browse files
committed
Update xmlrpc
1 parent b722ece commit 9a40f9a

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

Lib/test/test_xmlrpc.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def test_dump_none(self):
187187
xmlrpclib.loads(strg)[0][0])
188188
self.assertRaises(TypeError, xmlrpclib.dumps, (arg1,))
189189

190-
@unittest.expectedFailure # TODO: RUSTPYTHON
190+
@unittest.expectedFailure # TODO: RUSTPYTHON
191191
def test_dump_encoding(self):
192192
value = {'key\u20ac\xa4':
193193
'value\u20ac\xa4'}
@@ -228,7 +228,7 @@ def test_dump_bytes(self):
228228
self.assertIs(type(newvalue), xmlrpclib.Binary)
229229
self.assertIsNone(m)
230230

231-
@unittest.expectedFailure # TODO: RUSTPYTHON
231+
@unittest.expectedFailure # TODO: RUSTPYTHON
232232
def test_loads_unsupported(self):
233233
ResponseError = xmlrpclib.ResponseError
234234
data = '<params><param><value><spam/></value></param></params>'
@@ -278,7 +278,7 @@ def test_load_standard_types(self):
278278
'<member><name>a</name><value><int>1</int></value></member>'
279279
'</struct>', {'a': 1, 'b': 2})
280280

281-
@unittest.expectedFailure # TODO: RUSTPYTHON
281+
@unittest.expectedFailure # TODO: RUSTPYTHON
282282
def test_load_extension_types(self):
283283
check = self.check_loads
284284
check('<nil/>', None)
@@ -311,7 +311,7 @@ def test_get_host_info(self):
311311

312312
def test_ssl_presence(self):
313313
try:
314-
import ssl
314+
import ssl # noqa: F401
315315
except ImportError:
316316
has_ssl = False
317317
else:
@@ -832,7 +832,7 @@ def test_nonascii(self):
832832
# protocol error; provide additional information in test output
833833
self.fail("%s\n%s" % (e, getattr(e, "headers", "")))
834834

835-
@unittest.expectedFailure # TODO: RUSTPYTHON
835+
@unittest.expectedFailure # TODO: RUSTPYTHON
836836
def test_client_encoding(self):
837837
start_string = '\u20ac'
838838
end_string = '\xa4'
@@ -1013,7 +1013,7 @@ class SimpleServerEncodingTestCase(BaseServerTestCase):
10131013
def threadFunc(evt, numrequests, requestHandler=None, encoding=None):
10141014
http_server(evt, numrequests, requestHandler, 'iso-8859-15')
10151015

1016-
@unittest.expectedFailure # TODO: RUSTPYTHON
1016+
@unittest.expectedFailure # TODO: RUSTPYTHON
10171017
def test_server_encoding(self):
10181018
start_string = '\u20ac'
10191019
end_string = '\xa4'

Lib/xmlrpc/server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def register_multicall_functions(self):
239239
240240
see http://www.xmlrpc.com/discuss/msgReader$1208"""
241241

242-
self.funcs.update({'system.multicall' : self.system_multicall})
242+
self.funcs['system.multicall'] = self.system_multicall
243243

244244
def _marshaled_dispatch(self, data, dispatch_method = None, path = None):
245245
"""Dispatches an XML-RPC method from marshalled (XML) data.
@@ -578,6 +578,7 @@ class SimpleXMLRPCServer(socketserver.TCPServer,
578578
"""
579579

580580
allow_reuse_address = True
581+
allow_reuse_port = False
581582

582583
# Warning: this is for debugging purposes only! Never set this to True in
583584
# production code, as will be sending out sensitive information (exception

0 commit comments

Comments
 (0)