Hi, just starting a little thread here to collect things to remember when we migrate to Python 3k one day.
Robert Bradshaw wrote: > Stefan Behnel wrote: >>>> Also, there's Python 3, where especially the C-API is still in flux. >>>> Not sure >>>> if it's worth to start thinking about that yet, but it should at least >>>> stay on the list. >>> >>> Yep. >> >> I asked on cython-dev to see how far the C-API is. Answer I got is >> that it may >> take a bit to stabilize, including renaming types (str etc.) and >> fixing the >> outdated docs. So we'll have to see what the status will be in June. >> It might really be worth a sprint by then. >> >> http://comments.gmane.org/gmane.comp.python.devel/92255?set_lines=100000 >> >> Two additional things I see here: 1) porting Cython itself, and 2) >> working on >> better optimisation support in general, to keep users from doing >> direct C-API >> calls in Cython code, as this might lead to reduced portability. > > I think Python 2.x will be around for quite a while, even after P3k > comes out, but if the API is starting to stabilize (and even if not) I > think it is good to start looking at it. Porting Cython itself should be > pretty easy, 3.0 is mostly backwards compatible, and I don't think we > use much that isn't. It will almost certainly require a branch, though. We might be lucky as most of Cython's code is still pretty old style, without using unicode, generators and the like. I added bundles that fix at least the obvious "print()" and "<>" stuff. Things like "print >> sys.stderr" will need fixing, no idea what else is waiting... > Ideally, I would like to be able to run (the same) Cython with Python > 2.x or 3.x, and have it produce code that compiles (using macros) for > inclusion in either 2.x or 3.x runtimes. We can do this for 2.3-2.5. > Whether or not this is feasible across such a major revision remains to > be seen, but I'm optimistic. So am I (still). We will have to figure out some transition semantics for str/unicode/bytes, though, also at the Cython syntax level. But I guess that has time till the first Py3k beta release. Stefan
package-upstream.bundle
Description: Binary data
upstream.bundle
Description: Binary data
_______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
