[Python-checkins] r83123 - in python/branches/release27-maint: Lib/xmlrpclib.py Misc/NEWS

victor.stinner python-checkins at python.org
Sat Jul 24 04:51:49 CEST 2010


Author: victor.stinner
Date: Sat Jul 24 04:51:49 2010
New Revision: 83123

Log:
Backport of 83120 (#9032)

XML-RPC client: Transport.request() retries on EPIPE error

The EPIPE error occurs when the server closes the socket and the client sends a
"big" XML-RPC request (I don't know exactly the size threshold).

request() just have to ignore the error because single_request() closes the
socket on error, and so the next call to single_request() will open a new
socket.

Remove also a comment in the HTTP client because it's now wrong: see r70643 and
issue #5542.


Modified:
   python/branches/release27-maint/   (props changed)
   python/branches/release27-maint/Lib/xmlrpclib.py
   python/branches/release27-maint/Misc/NEWS

Modified: python/branches/release27-maint/Lib/xmlrpclib.py
==============================================================================
--- python/branches/release27-maint/Lib/xmlrpclib.py	(original)
+++ python/branches/release27-maint/Lib/xmlrpclib.py	Sat Jul 24 04:51:49 2010
@@ -1263,7 +1263,7 @@
             try:
                 return self.single_request(host, handler, request_body, verbose)
             except socket.error, e:
-                if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED):
+                if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED, errno.EPIPE):
                     raise
             except httplib.BadStatusLine: #close after we sent request
                 if i:

Modified: python/branches/release27-maint/Misc/NEWS
==============================================================================
--- python/branches/release27-maint/Misc/NEWS	(original)
+++ python/branches/release27-maint/Misc/NEWS	Sat Jul 24 04:51:49 2010
@@ -18,6 +18,10 @@
 Library
 -------
 
+- Issue #9032: XML-RPC client retries the request on EPIPE error. The EPIPE
+  error occurs when the server closes the socket and the client sends a big
+  XML-RPC request.
+
 - Issue #5542: Remove special logic that closes HTTPConnection socket on EPIPE.
 
 - Issue #4629: getopt raises an error if an argument ends with = whereas getopt


More information about the Python-checkins mailing list