On Thu, 2015-04-16 at 15:38 -0400, Ken Giusti wrote: > And within moments, I hit my first Really Big Problem: > > Jython > > Yep, turns out Jython can't parse 'futurized' python code. Especially > dislikes the > > except <exception>, <var> ---> except <exception> as <var> > > change. Which isn't very helpful, since the 'as' variant is the only syntax > supported by Python 3 (that comma-syntax has been removed). > > This makes porting the python unit tests to python3 a no go. The non-test > python stuff, like the bindings and examples, are not run under jython so > it's not a problem there. > > So what to do? > > Here's a couple of options that I can think of: > > 1) don't port the tests to python 3. > > 2) create two copies of the python tests, one 'old' copy for running under > jython, and a new copy for running under python2 and 3. Remove the old > tests once jython can handle the modern syntax. > > 3) Stop running jython tests > > 4) A better idea I haven't thought of yet. > > I'm pretty much against option 1 - we need to be able to test the bindings > under python 3. I'm open to the others, especially #4. > > Opinions?
It is valuable to have a common test set for python-c and python-j, I've found & fixed interop issues before because of that. Having separate test sources for c and j would effectively put an end to that, there is no way people will keep them in sync manually. But keeping them in python 2 and not testing in python 3 isn't an answer either. And having some python 2 and some python 3 tests will just confuse everybody. I don't know. Jython sucks.
