[Fedora-suds-list] Persistent connections - anyone else interested / suggest howto / working on it?

Rod Montgomery monty at starfief.com
Wed Oct 21 14:05:43 UTC 2009


Currently (i.e. r580 / 0.3.7 release candidate) Suds uses urllib2, which uses urllib, both from the standard Python library.

For Python 2.5.2, urllib2 adds a "Connection: close" header, with the following comment:

         # We want to make an HTTP/1.1 request, but the addinfourl
         # class isn't prepared to deal with a persistent connection.
         # It will try to read all remaining data from the socket,
         # which will block while the server waits for the next request.
         # So make sure the connection gets closed after the (only)
         # request.

(lines 1069-1074 of /usr/lib/python2.5/urllib2.py).

I'm interested in making Suds able to use persistent connections.

Twisted (twistedmatrix.com) seems to have an elaborate HTTP/1.1 Client module in development, that threatens to support 
persistent connections, but I have been unable to figure out how stable it is, and I don't understand how hard it would be to 
make Suds able to use it.

http://twistedmatrix.com/trac/wiki/TwistedWebClient

http://twistedmatrix.com/trac/ticket/3420

which leads to

http://twistedmatrix.com/trac/ticket/886

Another possibility is httplib2:

http://pypi.python.org/pypi/httplib2/python3-0.5.0

Neither project seems to have much recent development-mailing-list activity, though neither seems completely dead either.

The Right Thing To Do would be to make Suds' use of any external HTTP package optional, rather than mandatory, to avoid 
putting Suds at the mercy of the stability of that external package.

Anyone else interested in having persistent connections in Suds?

Anyone else have other suggestions for how to go about getting them?

Anyone else actually working on this? (I don't see any open Suds-Trac tickets for it.)

Thanks!




More information about the fedora-suds-list mailing list