Merge lp:~vila/bzr/475585-lp-proxy-py24-compat into lp:bzr

Proposed by Vincent Ladeuil
Status: Merged
Merged at revision: not available
Proposed branch: lp:~vila/bzr/475585-lp-proxy-py24-compat
Merge into: lp:bzr
Diff against target: 33 lines (+9/-2)
2 files modified
NEWS (+4/-0)
bzrlib/plugins/launchpad/lp_registration.py (+5/-2)
To merge this branch: bzr merge lp:~vila/bzr/475585-lp-proxy-py24-compat
Reviewer Review Type Date Requested Status
bzr-core Pending
Review via email: mp+14489@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Vincent Ladeuil (vila) wrote :

This patch fixes the issue by checking explicitly that we can call xmlrpclib.Transport.__init__

That still leave the question about how and when we lost python2.4 tests...

Revision history for this message
John A Meinel (jameinel) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2009-11-04 22:29:40 +0000
3+++ NEWS 2009-11-05 20:15:20 +0000
4@@ -135,7 +135,11 @@
5 and similar errors. (Andrew Bennetts, #429747, #243391)
6
7 * Launchpad urls can now be resolved from behind proxies.
8+<<<<<<< TREE
9 (Gordon Tyler, Vincent Ladeuil, #186920)
10+=======
11+ (Gordon Tyler, Vincent Ladeuil, #186920, #475585)
12+>>>>>>> MERGE-SOURCE
13
14 * Reduce the strictness for StaticTuple, instead add a debug flag
15 ``-Dstatic_tuple`` which will change apis to be strict and raise errors.
16
17=== modified file 'bzrlib/plugins/launchpad/lp_registration.py'
18--- bzrlib/plugins/launchpad/lp_registration.py 2009-10-30 21:02:37 +0000
19+++ bzrlib/plugins/launchpad/lp_registration.py 2009-11-05 20:15:20 +0000
20@@ -56,8 +56,11 @@
21
22 class XMLRPCTransport(xmlrpclib.Transport):
23
24- def __init__(self, scheme, use_datetime=0):
25- xmlrpclib.Transport.__init__(self, use_datetime=use_datetime)
26+ def __init__(self, scheme):
27+ init = getattr(xmlrpclib.Transport, '__init__', None)
28+ if init is not None:
29+ # Not available before python2.5
30+ init(self)
31 self._scheme = scheme
32 self._opener = _urllib2_wrappers.Opener()
33 self.verbose = 0