[wingide-users] Python 3.0
support at wingware.com
Thu Apr 24 07:18:14 MDT 2008
Humberto Diogenes wrote:
> Is there any way to run python3.0 projects inside Wing? I tried it in
> Wing 3.1.0b2 but got syntax errors on wingdb.py -- obvious things like
> print instead of print().
> Then, just for kicks, I tried running 2to3 in wingdb.py but, as
> expected, it didn't work very well... :)
There's no support for Python 3.0 in Wing yet so debugging will not work.
Even if you got the Python parts of the debugger converted, there is an
extension module in there that would need conversion and recompilation.
I looked a little at doing this but came to the conclusion it was still
a bit early. I did get far enough to have the general impression that
it won't be a terribly huge amount of code changes to get the extension
module to _compile_. However, I did see we'll have to rework some code
that deals with thread states and code objects in our extension module
and that could have all sorts of implications as far as functionality
that needs to be tested and fixed.
If you're a Wing Pro customer you can get the sources for Wing by signing
an NDA http://wingware.com/pub/wingide/support/source-non-discl.pdf
and of course you're welcome to play around with it. I looked at
this perhaps 5-6 months ago when there was a lot of FUD about 3.0 going
around. My goal then was mostly to get a general idea of how hard it
will be -- and certainly this is a good metric by which to measure
just how much pain (or not) it will cost to convert complex code that's
tied very closely to Python's internals.
When we do get to this, I was hoping to document what we run into and
blog about it and how we solve the issue of supporting both 2.x and
3.x in the same code base, since I think it could be of general interest.
Of course it won't really be the same code base. Best case we'll auto-convert
a good percentage of the code w/ 2to3 and use #ifdefs in the extension module.
But since we support back to Python 1.5.2, we can't just convert all the Python
code in the debugger to be Python 2.6 and thus 2to3-ready. So it gets a bit
Anyway, thanks for finding the 'except' bug in wingdb.py!
Wingware | Python IDE
Advancing Software Development
More information about the wingide-users