Re: [Cython] Cython 0.21 released

2014-10-11 Thread Yaroslav Halchenko
On Wed, 10 Sep 2014, Stefan Behnel wrote:

> Hi all,

> on behalf of the Cython dev team, I'm pleased to announce the release of
> Cython 0.21, a major feature release. Thanks everyone who contributed code,
> documentation improvements, test feedback, bug reports and/or otherwise
> helpful insights for this release.

a little change detected while down-stream testing builds in Debian
(previous version was 0.20.2 and it built fine)

 
 ...
 vertex_format.last_shader = self
 for i in xrange(vertex_format.vattr_count):
 attr = &vertex_format.vattr[i]
 if attr.per_vertex == 0:
 continue
 attr.index = glGetAttribLocation(self.program, attr.name)
   ^
 
 
 kivy/graphics/shader.pyx:448:63: Casting temporary Python object to 
non-numeric non-Python type

I wondered if that is an intentional restriction now to restrict such casting
only to numeric (and exclude the simplest form -- bytes/chars) or a
regression?

Cheers!
-- 
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Research Scientist,Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834   Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] Cython 0.21 released

2014-10-11 Thread Stefan Behnel
Yaroslav Halchenko schrieb am 11.10.2014 um 16:18:
> On Wed, 10 Sep 2014, Stefan Behnel wrote:
>> on behalf of the Cython dev team, I'm pleased to announce the release of
>> Cython 0.21, a major feature release. Thanks everyone who contributed code,
>> documentation improvements, test feedback, bug reports and/or otherwise
>> helpful insights for this release.
> 
> a little change detected while down-stream testing builds in Debian
> (previous version was 0.20.2 and it built fine)
> 
>  
>  ...
>  vertex_format.last_shader = self
>  for i in xrange(vertex_format.vattr_count):
>  attr = &vertex_format.vattr[i]
>  if attr.per_vertex == 0:
>  continue
>  attr.index = glGetAttribLocation(self.program,  *>attr.name)
>^
>  
>  
>  kivy/graphics/shader.pyx:448:63: Casting temporary Python object to 
> non-numeric non-Python type

Wow, interesting piece of code. What's that even supposed to do?

Looking up their code, I find that "attr.name" is a char*:

https://github.com/kivy/kivy/blob/master/kivy/graphics/vertex.pxd

So the above code creates a temporary Python bytes object by copying data
from a char*, then gets the char* to the internal object buffer and throws
the object away, thus deleting its buffer. Then it passes that invalidated
char* into a function. I can't see how this makes any sense. And I'm happy
to see that Cython catches this kind of bug now.


> I wondered if that is an intentional restriction now to restrict such casting
> only to numeric (and exclude the simplest form -- bytes/chars) or a
> regression?

It seems they fixed their code already:

https://github.com/kivy/kivy/commit/827bd6c7b7d04ec72cb3bdbf0ffcd90630d90008

Stefan

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


[Cython] kivy patch for: Cython 0.21 released

2014-10-11 Thread Yaroslav Halchenko

On Sat, 11 Oct 2014, Stefan Behnel wrote:

> Yaroslav Halchenko schrieb am 11.10.2014 um 16:18:
> > On Wed, 10 Sep 2014, Stefan Behnel wrote:
> >> on behalf of the Cython dev team, I'm pleased to announce the release of
> >> Cython 0.21, a major feature release. Thanks everyone who contributed code,
> >> documentation improvements, test feedback, bug reports and/or otherwise
> >> helpful insights for this release.

> > a little change detected while down-stream testing builds in Debian
> > (previous version was 0.20.2 and it built fine)

> >  
> >  ...
> >  vertex_format.last_shader = self
> >  for i in xrange(vertex_format.vattr_count):
> >  attr = &vertex_format.vattr[i]
> >  if attr.per_vertex == 0:
> >  continue
> >  attr.index = glGetAttribLocation(self.program,  > *>attr.name)
> >^
> >  

> >  kivy/graphics/shader.pyx:448:63: Casting temporary Python object to 
> > non-numeric non-Python type

> Wow, interesting piece of code. What's that even supposed to do?

> Looking up their code, I find that "attr.name" is a char*:

> https://github.com/kivy/kivy/blob/master/kivy/graphics/vertex.pxd

> So the above code creates a temporary Python bytes object by copying data
> from a char*, then gets the char* to the internal object buffer and throws
> the object away, thus deleting its buffer. Then it passes that invalidated
> char* into a function. I can't see how this makes any sense. And I'm happy
> to see that Cython catches this kind of bug now.


> > I wondered if that is an intentional restriction now to restrict such 
> > casting
> > only to numeric (and exclude the simplest form -- bytes/chars) or a
> > regression?

> It seems they fixed their code already:

> https://github.com/kivy/kivy/commit/827bd6c7b7d04ec72cb3bdbf0ffcd90630d90008

Gotcha -- THANKS a bunch for a detailed response!

CCing kivy maintainers in Debian -- get ready for upcoming cython 0.21
upload - a little patch to pick up! ;)

-- 
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Research Scientist,Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834   Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel


[Cython] s3ql and llfuse FTBFS Re: Cython 0.21 released

2014-10-11 Thread Yaroslav Halchenko


On Wed, 10 Sep 2014, Stefan Behnel wrote:
> on behalf of the Cython dev team, I'm pleased to announce the release of
> Cython 0.21, a major feature release. Thanks everyone who contributed code,
> documentation improvements, test feedback, bug reports and/or otherwise
> helpful insights for this release.

in two packages (s3ql, python-llfuse) so far I have ran into

Traceback (most recent call last):
  File "setup.py", line 304, in 
main()
  File "setup.py", line 182, in main
command_options={ 'sdist': { 'formats': ('setup.py', 'bztar') } },
  File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
  File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
  File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
  File "setup.py", line 228, in run
**options)
  File "/usr/lib/python3/dist-packages/Cython/Compiler/Main.py", line 620, in 
compile
options = CompilationOptions(defaults = options, **kwds)
  File "/usr/lib/python3/dist-packages/Cython/Compiler/Main.py", line 501, in 
__init__
', '.join(unknown_options)))
ValueError: got unexpected compilation options: warning_errors, recursive

looking at s3ql  those are provided to cython_compile call and packages built
successfully before.

I see that recursive option was removed in 0.20b1~505  so not sure how it built
before with 0.20.2 (probably providing "bogus" options just didn't trigger this
ValueError).  Would you advise on the ideal course of patching? (CCing
maintainers of those packages)

P.S. besides those few of manageable failures I have reported, haven't found
any other new hiccups (there also was a failing unittest in bzr but not even
yet sure if cython related or just a fluke),   so will shortly upload 0.21 to
Debian sid and backports to -devel repository of NeuroDebian.

Cheers!
-- 
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Research Scientist,Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834   Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] s3ql and llfuse FTBFS Re: Cython 0.21 released

2014-10-11 Thread Stefan Behnel
Hi,

thanks for bringing this up.

Yaroslav Halchenko schrieb am 12.10.2014 um 05:04:
> On Wed, 10 Sep 2014, Stefan Behnel wrote:
>> on behalf of the Cython dev team, I'm pleased to announce the release of
>> Cython 0.21, a major feature release. Thanks everyone who contributed code,
>> documentation improvements, test feedback, bug reports and/or otherwise
>> helpful insights for this release.
> 
> in two packages (s3ql, python-llfuse) so far I have ran into
> 
> Traceback (most recent call last):
>   File "setup.py", line 304, in 
> main()
>   File "setup.py", line 182, in main
> command_options={ 'sdist': { 'formats': ('setup.py', 'bztar') } },
>   File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
> dist.run_commands()
>   File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
> self.run_command(cmd)
>   File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
> cmd_obj.run()
>   File "setup.py", line 228, in run
> **options)
>   File "/usr/lib/python3/dist-packages/Cython/Compiler/Main.py", line 620, in 
> compile
> options = CompilationOptions(defaults = options, **kwds)
>   File "/usr/lib/python3/dist-packages/Cython/Compiler/Main.py", line 501, in 
> __init__
> ', '.join(unknown_options)))
> ValueError: got unexpected compilation options: warning_errors, recursive
> 
> looking at s3ql  those are provided to cython_compile call and packages built
> successfully before.
> 
> I see that recursive option was removed in 0.20b1~505  so not sure how it 
> built
> before with 0.20.2 (probably providing "bogus" options just didn't trigger 
> this
> ValueError).  Would you advise on the ideal course of patching? (CCing
> maintainers of those packages)

Those options were previously ignored, so they can safely be removed.

I actually think it would have been nicer (blaming myself here) to start by
raising a visible warning first rather than a hard error. I wasn't aware of
the impact that silently ignoring these options had in the past.

I'll relax it for 0.21.1, which is close anyway.


> P.S. besides those few of manageable failures I have reported, haven't found
> any other new hiccups (there also was a failing unittest in bzr but not even
> yet sure if cython related or just a fluke),   so will shortly upload 0.21 to
> Debian sid and backports to -devel repository of NeuroDebian.

Thanks!

Stefan

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


[Cython] accidental breakage of 0.20.x branch

2014-10-11 Thread Stefan Behnel
Hi,

I accidentally updated the 0.20.x branch to recent 0.21.x (typo), and then
had to force push it over to fix it. Sorry for that, I hope it doesn't
cause too much trouble.

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