[Cython] some pull requests for 0.16?

mark florisson markflorisson88 at gmail.com
Tue Mar 20 17:40:28 CET 2012

On 18 March 2012 11:58, Stefan Behnel <stefan_ml at behnel.de> wrote:
> Hi,
> I put up two new pull requests on github:
> Implementation of PEP 380 (yield from):
> https://github.com/cython/cython/pull/96
> Rewrite of dict iteration:
> https://github.com/cython/cython/pull/95
> Given that the release of 0.16 has currently slowed down a bit, and given
> that these are really nice features, could someone (and especially Mark, as
> the responsible release manager) take a look at them and give an opinion
> regarding their suitability for 0.16?

Sorry about the slowdown, my BT internet connection at home got closed
off, so working on a release is rather hard, hopefully that will be
fixed within the next few days. Anyway, during the sprints Dag worked
on the numpy attributes accesses to generate non-deprecated numpy
code, I'm not sure how far along that is and if we can get that in as
well, or have it wait until 0.16.1.
I worked on enhancing fused types runtime dispatching (e.g. select the
right specialization at runtime from the argument types), especially
on matching buffers. It's also a bit of a rewrite as the complexity
grew quite a bit and ndarray and fused types were broken in subtle
ways (I would do the pull request now if I hadn't left the code at
home :).

Finally, there is a serious bug in the reversed(range()) optimization
that Mike Graham discovered when working on the range() optimization
with a runtime step, which is basically wrong for any step that is not
1 or -1 (it simply swaps the bounds with an offset by 1, but it
actually has to figure out what the actual last value was in the range
and use that as the start instead). I personally consider this a
blocker, so I'll try contacting Mike and see if he is still
(interested in) working on that.

As for the two pull requests, both are quite large, but the dict
iteration rewrite is more like an enhancement whereas the 'yield from'
is really a new (somewhat big) feature. I would personally prefer to
merge only enhancements and bug fixes, but not new features. If you
feel confident enough that the dict iteration pull request is ready to
be merged, then please do so. We can do an 0.16.1 release with the
'yield from', the 'lnotab' line number mapping from code objects to
Cython source and probably the boundscheck and wraparound
optimizations I started working on (and other things if and when they
come up). We can release 0.16.1 somewhat shortly after releasing 0.16.
I think a shorter release cycle with less changes would be beneficial
and give us swifter feedback about bugs, missing features, wanted
features, etc.

So I propose that when we merged dict iteration, fused types
enhancements and the range bug fix, we do another beta release. We (I)
also need to look into the test failures on Gentoo.

> Personally, I think they are ready, but they'd certainly require another
> beta release for testing.
> You may notice that I also added the PyPy related preprocessor defines
> master and used them in a couple of places to reduce Cython's dependency on
> CPython details. That doesn't mean we already support PyPy (there are still
> open issues, mostly on their side). I only pushed the changes that were
> non-intrusive and helped me in preparing the two branches above in a clean
> way. I have some more changes in my PyPy branch:
> https://github.com/scoder/cython/tree/pypy
> Stefan
> _______________________________________________
> cython-devel mailing list
> cython-devel at python.org
> http://mail.python.org/mailman/listinfo/cython-devel

More information about the cython-devel mailing list