Rev 4226: (andrew) Some small fixes for compatibility with Python's trunk. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Wed Apr 1 04:04:29 BST 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4226
revision-id: pqm at pqm.ubuntu.com-20090401030426-i2p8321efq55f7jm
parent: pqm at pqm.ubuntu.com-20090401021937-weq1st849rreuonn
parent: andrew.bennetts at canonical.com-20090327061229-tc6h0ofy5ans2lub
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2009-04-01 04:04:26 +0100
message:
(andrew) Some small fixes for compatibility with Python's trunk.
modified:
bzrlib/__init__.py __init__.py-20050309040759-33e65acf91bbcd5d
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/test_http.py testhttp.py-20051018020158-b2eef6e867c514d9
------------------------------------------------------------
revno: 4208.3.2
revision-id: andrew.bennetts at canonical.com-20090327061229-tc6h0ofy5ans2lub
parent: andrew.bennetts at canonical.com-20090327061214-vorihm2f85nclp9k
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: tmp2.7
timestamp: Fri 2009-03-27 17:12:29 +1100
message:
Fix one test failure in test_http under Python 2.7a0.
modified:
bzrlib/tests/test_http.py testhttp.py-20051018020158-b2eef6e867c514d9
------------------------------------------------------------
revno: 4208.3.1
revision-id: andrew.bennetts at canonical.com-20090327061214-vorihm2f85nclp9k
parent: pqm at pqm.ubuntu.com-20090326131816-4nzmlssnd4huc5cu
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: tmp2.7
timestamp: Fri 2009-03-27 17:12:14 +1100
message:
Make the test suite run, although not pass, with current Python trunk (2.7a0)
modified:
bzrlib/__init__.py __init__.py-20050309040759-33e65acf91bbcd5d
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
=== modified file 'bzrlib/__init__.py'
--- a/bzrlib/__init__.py 2009-03-24 05:12:24 +0000
+++ b/bzrlib/__init__.py 2009-03-27 06:12:14 +0000
@@ -102,7 +102,7 @@
else:
raise ValueError("version_info %r not valid" % (version_info,))
- version_string = '%d.%d.%d.%s.%d' % version_info
+ version_string = '%d.%d.%d.%s.%d' % tuple(version_info)
return main_version + sub_string
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py 2009-03-27 15:28:27 +0000
+++ b/bzrlib/tests/__init__.py 2009-04-01 03:04:26 +0000
@@ -794,13 +794,6 @@
import pdb
pdb.Pdb().set_trace(sys._getframe().f_back)
- def exc_info(self):
- absent_attr = object()
- exc_info = getattr(self, '_exc_info', absent_attr)
- if exc_info is absent_attr:
- exc_info = getattr(self, '_TestCase__exc_info')
- return exc_info()
-
def _check_leaked_threads(self):
active = threading.activeCount()
leaked_threads = active - TestCase._active_threads
@@ -1315,7 +1308,7 @@
def _do_skip(self, result, reason):
addSkip = getattr(result, 'addSkip', None)
if not callable(addSkip):
- result.addError(self, self.exc_info())
+ result.addError(self, sys.exc_info())
else:
addSkip(self, reason)
@@ -1354,7 +1347,7 @@
self.tearDown()
return
except:
- result.addError(self, self.exc_info())
+ result.addError(self, sys.exc_info())
return
ok = False
@@ -1362,7 +1355,7 @@
testMethod()
ok = True
except self.failureException:
- result.addFailure(self, self.exc_info())
+ result.addFailure(self, sys.exc_info())
except TestSkipped, e:
if not e.args:
reason = "No reason given."
@@ -1372,7 +1365,7 @@
except KeyboardInterrupt:
raise
except:
- result.addError(self, self.exc_info())
+ result.addError(self, sys.exc_info())
try:
self.tearDown()
@@ -1383,7 +1376,7 @@
except KeyboardInterrupt:
raise
except:
- result.addError(self, self.exc_info())
+ result.addError(self, sys.exc_info())
ok = False
if ok: result.addSuccess(self)
finally:
=== modified file 'bzrlib/tests/test_http.py'
--- a/bzrlib/tests/test_http.py 2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/test_http.py 2009-03-27 06:12:29 +0000
@@ -1307,7 +1307,7 @@
# Since the tests using this class will replace
# _urllib2_wrappers.Request, we can't just call the base class __init__
# or we'll loop.
- RedirectedRequest.init_orig(self, method, url, args, kwargs)
+ RedirectedRequest.init_orig(self, method, url, *args, **kwargs)
self.follow_redirections = True
More information about the bazaar-commits
mailing list