On 5/8/08, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > Thanks. I briefly glanced at it and it looks good. What you probably > want to do is commit and then export the patch (that way it will have > some history attached, and you'll get credit for it.)
OK. But perhaps better... It's really hard for you to clone cython-devel and name it cython-devel-py3k, and give me commit access to only that repo? > One remark I had is that perhaps more care needs to be done with > "PyInt_CheckExact" as in Py2 this implies that the size fits into a > long, so it's not quite the same as PyLong_CheckExact. Good catch!. I believe there is PyLong_FitsInLong or something similar to this. I have to check... > IMHO, all sloots should be keept, or > > all unused in py3k should be removed. > > Could you elaborate a bit more on what you mean by "unused?" If > they're still in the struct, I'd think we would need to keep them so > it has the right size/layout, right? I mean that Python 3.0 sources are maintaining some slots in the struct for no good reason... for example, nb_hex and nb_oct. IMHO, they should be removed in core Python... But if they are not removed, of course we still have to fill the struct. > PyClass_New is gone, I've > > Filling the dict ahead of time might actually work better... Just a question: Why Cython does not implement old-style classes this way for Python2.X ? Filling a dict with PyCFunction's and next calling PyClass_New does not work (I've never tried)? > > I actually have no idea on this one--maybe there's some system call > that can give this information? Stefan would probably know better > than me. Anyway this is not really important at this point. In the worst scenario, Python would not be able to find a source file for displaying traceback lines in a fancy way (like the one in IPython), but this is not a real problem. > > > > > > Regards, > > > > > > On 5/8/08, Stefan Behnel <[EMAIL PROTECTED]> wrote: > >> Hi, > >> > >> > >> Lisandro Dalcin wrote: > >>> The last four hours (3:00 AM right now here at Argentina) I've been > >>> working in a patch for enabling Cython generate code working with > >>> Python 2.6 and Python 3.0. > >>> > >>> Until now, the generated code (at least for the full mpi4py project) > >>> compiles and link fine with no errors. > >>> > >>> However, I have a big problems I do not know how to 'fix' in > >>> Cython. > >>> It is related to unbound methods disapearing in Py3K. Then, normal > >>> python classes does not work, but the cdef ones are fine. > >> > >> > >> These are the kind of things that we planned to address at the > >> dev1 workshop. > >> The C-API of Python is expected to stabilize next month, I don't > >> know how > >> stable these parts currently are. > >> > >> > >> > >>> Is there any interest on this to go mainstream? > >> > >> > >> Sure, totally! > >> > >> > >> > >>> I was very > >>> conservative about the PyString/PyUnicode issue. The right one is > >>> used > >>> in a place-by-place base. Of course, because of this, I have to pass > >>> 'bytes' to MPI, and I get 'bytes' from the C calls. > >> > >> > >> Yes, I think this is the right way to deal with it. Python2 was > >> very lax in > >> terms of semantics here, so the two have to be separated on a > >> case-by-case basis. > >> > >> > >> > >>> Finally, I'm completelly sure that I've not fixed all the relevant > >>> parts, but this is IMHO a good starting point. > >> > >> > >> Is it one big patch or did you/can you split it up? > >> > >> As this is potentially a big change, trac is the wrong place to > >> discuss it. We > >> should put up an official Py3 branch that people can actively > >> work on without > >> impacting the main trunk, so that we can merge working stuff > >> gradually. Can > >> you send a bundle against cython-devel to me and Robert for now? > >> He can set it up. > >> > >> Stefan > >> _______________________________________________ > >> Cython-dev mailing list > >> [email protected] > >> http://codespeak.net/mailman/listinfo/cython-dev > >> > > > > > > -- > > Lisandro Dalcín > > --------------- > > Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) > > Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) > > Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) > > PTLC - Güemes 3450, (3000) Santa Fe, Argentina > > > Tel/Fax: +54-(0)342-451.1594<cython- > > py3k.patch>_______________________________________________ > > > Cython-dev mailing list > > [email protected] > > http://codespeak.net/mailman/listinfo/cython-dev > > _______________________________________________ > Cython-dev mailing list > [email protected] > http://codespeak.net/mailman/listinfo/cython-dev > -- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594 _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
