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

2016-10-18 Thread Jeroen Demeyer
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-packages/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-packages/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-packages/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-packages/Cython/Compiler/PyrexTypes.py", 
line 3489, in specialize

T = values[self.templates[0]]
KeyError: 
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel


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

2016-10-18 Thread Robert Bradshaw
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


On Tue, Oct 18, 2016 at 1:17 AM, Jeroen Demeyer 
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: 
> ___
> cython-devel mailing list
> cython-devel@python.org
> https://mail.python.org/mailman/listinfo/cython-devel
>
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] Cython 0.25 beta

2016-10-18 Thread Yury Selivanov

Please also take a look at https://github.com/cython/cython/issues/1493


On 2016-10-10 3:50 PM, Robert Bradshaw wrote:

Thanks for all of those to tested the alpha release. I think we've managed
to fix all the issues and regressions raised in that thread; here's a beta
that's likely to turn into a release candidate.

https://github.com/cython/cython/archive/0.25b0.zip



___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel


___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel