Re: [Cython] Cython 0.23 released

2015-08-18 Thread Stefan Behnel
Antoine Martin schrieb am 17.08.2015 um 14:14:
> On 17/08/15 14:14, Stefan Behnel wrote:
>> Stefan Behnel schrieb am 17.08.2015 um 08:17:
>>> Antoine Martin schrieb am 17.08.2015 um 06:09:
 On 09/08/15 13:54, Antoine Martin wrote:
> I've just hit a regression with 0.23: a recursion loop generating code
> for this particular pyx:
> http://xpra.org/trac/browser/xpra/trunk/src/xpra/codecs/nvenc4/encoder.pyx
 I have narrowed it down to the problematic finally block via trial and
 error:
 http://xpra.org/trac/browser/xpra/trunk/src/xpra/codecs/nvenc4/encoder.pyx#L2024
 Any of those statements, including the simple logging ones, cause
 Cython's "fresh_finally_clause" code to go into an infinite loop via
 deepcopy.

 What am I doing wrong here?
 Those statements look fine and they used to compile just fine too.
>>> Thanks for the report. This is a bug in the latest Cython release. I'll see
>>> if I can come up with a fix.
>> I couldn't reproduce it with any reasonable amount of test code yet, but
>> does this fix it for you?
>>
>> https://github.com/cython/cython/commit/5a40d5459aad1c6f15fb8526f0144d3c0f1dfe76
> I am afraid not, I still get the same stacktrace.
> Let me know if there's anything else I can try.

How about this?

https://github.com/cython/cython/commit/5fa766ac25a31b0c1addd08efd19d2d34661317b

Stefan

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


[Cython] Cython fails to build if pgen is available

2015-08-18 Thread Dominic Sacré
Hi,

I'm getting the following error trying to build Cython 0.23:

Cython/Parser/Grammar: No such file or directory
Traceback (most recent call last):
  File "setup.py", line 289, in 
compile_cython_modules(cython_profile, cython_compile_more,
cython_with_refnanny)
  File "setup.py", line 135, in compile_cython_modules
os.path.join(parser_dir, 'graminit.c'),
  File
"/data/master/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/subprocess.py",
line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command
'['/data/master/build/tmp/sysroots/x86_64-linux/usr/bin/python-native/pgen',
'Cython/Parser/Grammar', 'Cython/Parser/graminit.h',
'Cython/Parser/graminit.c']' returned non-zero exit status 1

The toolchain is based on OpenEmbedded, and unlike most distribution
packages, its Python installation actually contains pgen.

Where would that Cython/Parser/Grammar file come from?
Alternatively, is there a clean way (without patching setup.py) to skip
compiling the grammar?


Cheers,

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


Re: [Cython] Cython fails to build if pgen is available

2015-08-18 Thread Robert Bradshaw
On Tue, Aug 18, 2015 at 3:02 PM, Dominic Sacré  wrote:
> Hi,
>
> I'm getting the following error trying to build Cython 0.23:
>
> Cython/Parser/Grammar: No such file or directory
> Traceback (most recent call last):
>   File "setup.py", line 289, in 
> compile_cython_modules(cython_profile, cython_compile_more,
> cython_with_refnanny)
>   File "setup.py", line 135, in compile_cython_modules
> os.path.join(parser_dir, 'graminit.c'),
>   File
> "/data/master/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/subprocess.py",
> line 540, in check_call
> raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command
> '['/data/master/build/tmp/sysroots/x86_64-linux/usr/bin/python-native/pgen',
> 'Cython/Parser/Grammar', 'Cython/Parser/graminit.h',
> 'Cython/Parser/graminit.c']' returned non-zero exit status 1
>
> The toolchain is based on OpenEmbedded, and unlike most distribution
> packages, its Python installation actually contains pgen.
>
> Where would that Cython/Parser/Grammar file come from?
> Alternatively, is there a clean way (without patching setup.py) to skip
> compiling the grammar?

The grammar is here: https://github.com/cython/cython/tree/master/Cython/Parser

Looks like eveyone who tried to use this did so from a git clone, not
the sdist. Omission fixed:
https://github.com/cython/cython/commit/969de4eab048896c6f29b9251dc4324309a1abb4
Either patch this in/distribute these files or patch setup.py.
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] Cython 0.23 released

2015-08-18 Thread Antoine Martin
On 19/08/15 01:03, Stefan Behnel wrote:
> Antoine Martin schrieb am 17.08.2015 um 14:14:
>> On 17/08/15 14:14, Stefan Behnel wrote:
>>> Stefan Behnel schrieb am 17.08.2015 um 08:17:
 Antoine Martin schrieb am 17.08.2015 um 06:09:
> On 09/08/15 13:54, Antoine Martin wrote:
>> I've just hit a regression with 0.23: a recursion loop generating code
>> for this particular pyx:
>> http://xpra.org/trac/browser/xpra/trunk/src/xpra/codecs/nvenc4/encoder.pyx
> I have narrowed it down to the problematic finally block via trial and
> error:
> http://xpra.org/trac/browser/xpra/trunk/src/xpra/codecs/nvenc4/encoder.pyx#L2024
> Any of those statements, including the simple logging ones, cause
> Cython's "fresh_finally_clause" code to go into an infinite loop via
> deepcopy.
>
> What am I doing wrong here?
> Those statements look fine and they used to compile just fine too.
 Thanks for the report. This is a bug in the latest Cython release. I'll see
 if I can come up with a fix.
>>> I couldn't reproduce it with any reasonable amount of test code yet, but
>>> does this fix it for you?
>>>
>>> https://github.com/cython/cython/commit/5a40d5459aad1c6f15fb8526f0144d3c0f1dfe76
>> I am afraid not, I still get the same stacktrace.
>> Let me know if there's anything else I can try.
> How about this?
>
> https://github.com/cython/cython/commit/5fa766ac25a31b0c1addd08efd19d2d34661317b
That fixes it!

Thank you very much.

Antoine


>
> Stefan
>
> ___
> 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