[Cython] "minierror" in Shadow.py?

mark florisson markflorisson88 at gmail.com
Sat Jan 19 19:46:19 CET 2013


On 19 January 2013 07:22, Stefan Behnel <stefan_ml at behnel.de> wrote:
> Hi,
>
> I just wanted to release 0.18 beta1 when I noticed this code in Shadow.py,
> function index_type():
>
> """
>             raise minierror.InvalidTypeSpecification(
>                 "Only a step of 1 may be provided to indicate C or "
>                 "Fortran contiguity")
> """
>
> There is no import "minierror" and the comments seem to indicate that this
> is mostly a copy&paste oversight from code in minivect. Can this function
> (and the other changes in that file that came in the same commit) be
> removed from the 0.18 branch or are they needed for something?
>
> https://github.com/cython/cython/commit/b9a2c953974c4ebc4aa37e7e64d642ce117337fb
>
> Stefan
> _______________________________________________
> cython-devel mailing list
> cython-devel at python.org
> http://mail.python.org/mailman/listinfo/cython-devel

Hey Stefan,

Those changes are needed to support specifying memoryviews from pure
python. This is useful for instance to select a memoryview
specialization of a def function from Python.

I think the fix is to just define that exception and remove the
reference to minierror.

Mark


More information about the cython-devel mailing list