[Cython] Regression since 0.25a0 involving std::vector

Robert Bradshaw robertwb at gmail.com
Tue Oct 18 11:47:09 EDT 2016


Thanks for checking. This was fixed at https://github.com/cython/
cython/commit/4bf8b9b260c33fe88de5d743d5accbcbf649d8a6 Try
https://github.com/cython/cython/archive/0.25.x.zip
<https://github.com/cython/cython/archive/0.25b0.zip>

On Tue, Oct 18, 2016 at 1:17 AM, Jeroen Demeyer <jdemeyer at cage.ugent.be>
wrote:

> This is a new regression introduced since 0.25a0, found while testing Sage
> with 0.25b1:
>
>
>
> from libcpp.vector cimport vector
> cdef extern from *:
>     cdef cppclass BoostGraph[T]:
>         vector[unsigned long] bandwidth_ordering()
> ctypedef BoostGraph[int] BoostVecDiGraph
>
>
>
> Error compiling Cython file:
> ------------------------------------------------------------
> ...
> from libcpp.vector cimport vector
> cdef extern from *:
>     cdef cppclass BoostGraph[T]:
>         vector[unsigned long] bandwidth_ordering()
> ctypedef BoostGraph[int] BoostVecDiGraph
>                    ^
> ------------------------------------------------------------
>
> /tmp/boost_graph.pyx:5:20: Compiler crash in AnalyseDeclarationsTransform
>
> File 'ModuleNode.py', line 118, in analyse_declarations:
> ModuleNode(boost_graph.pyx:1:0,
>     full_module_name = 'boost_graph')
> File 'Nodes.py', line 425, in analyse_declarations:
> StatListNode(boost_graph.pyx:1:0)
> File 'Nodes.py', line 1567, in analyse_declarations:
> CTypeDefNode(boost_graph.pyx:5:0,
>     visibility = u'private')
> File 'Nodes.py', line 1123, in analyse: TemplatedTypeNode(boost_graph.
> pyx:5:20)
>
> Compiler crash traceback from this point on:
>   File "/usr/local/src/sage-config/local/lib/python2.7/site-packages/Cython/Compiler/Nodes.py",
> line 1123, in analyse
>     self.type = base_type.specialize_here(self.pos, template_types)
>   File "/usr/local/src/sage-config/local/lib/python2.7/site-package
> s/Cython/Compiler/PyrexTypes.py", line 3462, in specialize_here
>     return self.specialize(dict(zip(self.templates, template_values)))
>   File "/usr/local/src/sage-config/local/lib/python2.7/site-package
> s/Cython/Compiler/PyrexTypes.py", line 3480, in specialize
>     specialized.scope = self.scope.specialize(values, specialized)
>   File "/usr/local/src/sage-config/local/lib/python2.7/site-packages/Cython/Compiler/Symtab.py",
> line 2284, in specialize
>     e.type.specialize(values),
>   File "/usr/local/src/sage-config/local/lib/python2.7/site-package
> s/Cython/Compiler/PyrexTypes.py", line 2746, in specialize
>     result = CFuncType(self.return_type.specialize(values),
>   File "/usr/local/src/sage-config/local/lib/python2.7/site-package
> s/Cython/Compiler/PyrexTypes.py", line 3489, in specialize
>     T = values[self.templates[0]]
> KeyError: <CNumericType unsigned long>
> _______________________________________________
> cython-devel mailing list
> cython-devel at python.org
> https://mail.python.org/mailman/listinfo/cython-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cython-devel/attachments/20161018/600a412e/attachment.html>


More information about the cython-devel mailing list