← Back to team overview

testtools-dev team mailing list archive

Re: [Merge] lp:~jseutter/testtools/py3_again into lp:testtools

 

Review: Needs Fixing

the change to raise is invalid - it causes the wrong exception to be raised. AFAIK there is no way to do it compatibly with python 3, which is why that file isn't menat to be compiled on python3.

We don't want get_revno() to silently fail if bzrlib is not present - get_revno is required for non-final versions.

The change to not catch SyntaxError makes sense, but I'm sorry, the other bits do not. I'll cherrypick that component into trunk tomorrowish. I'm marking this needs-fixing so noone just-merges it, but you don't need to do furhter work - I'll cherrypick the bits out. If you want to figure out how to not install _compat2x.py on python3, that would be excellent, and probably fix the bytecompilation error.

>>> try:
...  try:
...   raise ValueError("foo")
...  except ValueError:
...   raise sys.exc_info()
... except ValueError, e:
...  print e, type(e)
... 
 <type 'exceptions.ValueError'>
>>> try:
...  try:
...   raise ValueError("foo")
...  except ValueError:
...   c,o,t = sys.exc_info()
...   raise c,o,t
... except ValueError, e:
...  print e, type(e)
... 
foo <type 'exceptions.ValueError'>

-- 
https://code.launchpad.net/~jseutter/testtools/py3_again/+merge/105569
Your team testtools developers is subscribed to branch lp:testtools.


Follow ups

References