← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jameinel/launchpad/py27-zope-response-692057 into lp:launchpad

 

The proposal to merge lp:~jameinel/launchpad/py27-zope-response-692057 into lp:launchpad has been updated.

Description changed to:

This fixes a python-2.7 compatibility change in the xmlrpc layers.
xmlrpclib in 2.7 stopped using the HTTP wrapper, and changed its code to use the 'getresponse' method rather than the 'getreply' methods.

The existing 'getresponse' returns a Zope object that doesn't conform to the expected return (an httplib.HTTPResponse object). So this change moves the zope portion into a common private helper, and then wraps that with the appropriate objects.

We 'cheat' a little bit by creating a '_FakeSocket', because HTTPResponse takes only a socket, though the only thing it does with the socket is call 'makefile()'.

With this change: bin/test -vv -t private-xmlrpc.txt
Passes on both python-2.6 and python-2.7

LOC: This adds a 24 LOC, but we can compensate that with the number of lines we'll be able to remove once we switch to python 2.7. Also, I think we have a LoC credit from our earlier refactorings.

For more details, see:
https://code.launchpad.net/~jameinel/launchpad/py27-zope-response-692057/+merge/112743
-- 
https://code.launchpad.net/~jameinel/launchpad/py27-zope-response-692057/+merge/112743
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.


References