[Cython] Control flow graph

2011-02-13 Thread Vitja Makarov
Hi! In order to implement "reaching definitions" algorithm. I'm now working on control-flow (or data-flow) graph. Here is funny picture made with graphviz ;) http://piccy.info/view3/1099337/ca29d7054d09bd0503cefa25f5f49420/1200/ -- vitja. ___ cython-

Re: [Cython] Control flow graph

2011-02-14 Thread Vitja Makarov
2011/2/15 Vitja Makarov : > 2011/2/15 Robert Bradshaw : >> On Sun, Feb 13, 2011 at 11:40 PM, Vitja Makarov >> wrote: >>> Hi! >>> >>> In order to implement "reaching definitions" algorithm. >>> I'm now working on control-flow (or

Re: [Cython] Control flow graph

2011-02-15 Thread Vitja Makarov
2011/2/15 Stefan Behnel : > Robert Bradshaw, 15.02.2011 08:21: >> >> On Mon, Feb 14, 2011 at 9:49 PM, Vitja Makarov wrote: >>> >>> 2011/2/15 Robert Bradshaw: >>>> >>>> On Sun, Feb 13, 2011 at 11:40 PM, Vitja Makarov wrote: >>>&g

Re: [Cython] Control flow graph

2011-02-15 Thread Vitja Makarov
2011/2/15 Stefan Behnel : > Robert Bradshaw, 15.02.2011 08:21: >> >> On Mon, Feb 14, 2011 at 9:49 PM, Vitja Makarov wrote: >>> >>> 2011/2/15 Robert Bradshaw: >>>> >>>> On Sun, Feb 13, 2011 at 11:40 PM, Vitja Makarov wrote: >>>&g

Re: [Cython] Control flow graph

2011-02-20 Thread Vitja Makarov
2011/2/16 Vitja Makarov : > 2011/2/15 Stefan Behnel : >> Robert Bradshaw, 15.02.2011 08:21: >>> >>> On Mon, Feb 14, 2011 at 9:49 PM, Vitja Makarov wrote: >>>> >>>> 2011/2/15 Robert Bradshaw: >>>>> >>>>> On Sun, Feb 13

Re: [Cython] Control flow graph

2011-02-22 Thread Vitja Makarov
2011/2/22 Stefan Behnel : > Vitja Makarov, 20.02.2011 18:23: >> >> 2011/2/16 Vitja Makarov: >>> >>> Hmm... both python and codespeaks in the thread > > Yes, we should keep it to cython-devel only. Sorry for mixing it up. > > >>> Here is my

Re: [Cython] Control flow graph

2011-02-28 Thread Vitja Makarov
2011/2/23 Vitja Makarov : > 2011/2/23 Vitja Makarov : >> 2011/2/22 Stefan Behnel : >>> Vitja Makarov, 20.02.2011 18:23: >>>> >>>> 2011/2/16 Vitja Makarov: >>>>> >>>>> Hmm... both python and codespeaks in the thread >

[Cython] "__ipow__ has wrong number of arguments" is back here

2011-03-02 Thread Vitja Makarov
Hi! I noticed that this error came back again. https://sage.math.washington.edu:8091/hudson/view/cython-devel/job/cython-devel-tests-py26-c/lastCompletedBuild/testReport/(root)/CythonRunTestCase/compiling__c__and_running_special_methods_T561/ -- vitja. __

Re: [Cython] strange bug in starred target

2011-03-02 Thread Vitja Makarov
2011/3/3 Vitja Makarov : > This doesn't work: > def assign(): >    a, *b = 1,2,3,4,5 >    return a, b > >>>> import x >>>> x.assign() > Traceback (most recent call last): >  File "", line 1, in >  File "x.pyx", line 6, in

Re: [Cython] Control flow graph

2011-03-02 Thread Vitja Makarov
2011/2/28 Vitja Makarov : > 2011/2/23 Vitja Makarov : >> 2011/2/23 Vitja Makarov : >>> 2011/2/22 Stefan Behnel : >>>> Vitja Makarov, 20.02.2011 18:23: >>>>> >>>>> 2011/2/16 Vitja Makarov: >>>>>> >>>>>>

Re: [Cython] Multiple modules in one compilation unit

2011-03-03 Thread Vitja Makarov
2011/3/3 mark florisson : > On 3 March 2011 07:43, Stefan Behnel wrote: >> Lisandro Dalcin, 03.03.2011 05:38: >>> >>> On 2 March 2011 21:01, Greg Ewing  wrote: Stefan Behnel wrote: > > you'd call "cython" on a package and it would output a directory with a > single __init__.s

Re: [Cython] strange bug in starred target

2011-03-03 Thread Vitja Makarov
2011/3/3 Vitja Makarov : > 2011/3/3 Vitja Makarov : >> This doesn't work: >> def assign(): >>    a, *b = 1,2,3,4,5 >>    return a, b >> >>>>> import x >>>>> x.assign() >> Traceback (most recent call last): >>  

[Cython] InlinedGeneratorExpression question

2011-03-08 Thread Vitja Makarov
Hi! Here is example code: def foo(seq): cdef int x return any(x for x in seq) Here inner x have type int, how does cdef affects nested scope? Is that correct? -- vitja. ___ cython-devel mailing list cython-devel@python.org http://mail.python.or

[Cython] unbound local variables

2011-03-08 Thread Vitja Makarov
What is the right way to handle cdefed unbounds? cdef object foo print foo cdef int foo print foo And how buffers and arrays should be handled? Now I'm skipping buffers, arrays and structs. There are some examples in test suite: ...

Re: [Cython] Out of order side effects of argument evaluation in function calls (ticket #654)

2011-03-11 Thread Vitja Makarov
2011/3/11 Stefan Behnel : > Hi, > > ticket 654 describes a code generation problem where the arguments to a cdef > function are not being evaluated in the order they are written down in the > code. > > http://trac.cython.org/cython_trac/ticket/654 > > This introduces problems when the arguments hav

Re: [Cython] Out of order side effects of argument evaluation in function calls (ticket #654)

2011-03-17 Thread Vitja Makarov
2011/3/17 Robert Bradshaw : > On Thu, Mar 17, 2011 at 6:15 AM, Jason Grout > wrote: >> On 3/16/11 11:05 PM, Robert Bradshaw wrote: >>> >>> On Wed, Mar 16, 2011 at 7:53 AM, Stefan Behnel >>>  wrote: I'm actually leaning towards not guaranteeing the order of execution if C doesn't do

[Cython] Message system refactoring

2011-03-21 Thread Vitja Makarov
Now error/warning messages are stored in global variables at Cython.Compiler.Errors I think it's much better to move error handling into some object, Main.Context for example. Some benefits: - reduce use of global variables - allow more then one cython compiler instance at the time - make it m

Re: [Cython] Message system refactoring

2011-03-21 Thread Vitja Makarov
2011/3/21 Dag Sverre Seljebotn : > On 03/21/2011 11:45 AM, Vitja Makarov wrote: >> >> Now error/warning messages are stored in global variables at >> Cython.Compiler.Errors >> >> I think it's much better to move error handling into some object, >> M

Re: [Cython] Bug in cython-mode.el under GNU Emacs 23.2.1

2011-03-21 Thread Vitja Makarov
2011/3/22 Rafe Kettler : > I've just tried out cython-mode.el and I was a bit disappointed when it > didn't work right off the bat. > > I added the following to my .emacs: > > (setq load-path (cons "~/lib/emacs-plugins" load-path)) > (require 'cython-mode) > > this initially gave me the following e

Re: [Cython] Rewriting/compiling parts of CPython's stdlib in Cython

2011-03-21 Thread Vitja Makarov
2011/3/22 Stefan Behnel : > Stefan Behnel, 22.03.2011 07:10: >> >> there seems to be quite some interest in a project to get parts of CPython >> and specifically its stdlib rewritten in Cython. >> [...] I gave it a try with difflib and it turned out to be quite easy. >> >> http://blog.behnel.de/ind

Re: [Cython] Rewriting/compiling parts of CPython's stdlib in Cython

2011-03-23 Thread Vitja Makarov
2011/3/23 Stefan Behnel : > Craig Citro, 23.03.2011 08:11: >>> >>> We have a clear 1.0 goal, being able to compile the full Python >>> language. We're not there yet, but very close. It may make sense at >>> that point to also clean up any cruft we don't want to continue >>> supporting forever. I ag

Re: [Cython] Bug report: lambda and numpy.vectorize segfaults

2011-03-23 Thread Vitja Makarov
2011/3/23 René Rex : > Hello > > The attached code creates a segfault with Cython 0.14.1. A workaround > is to use a real function instead of lambda. Using the normal python > interpreter the same code works flawlessly. > > Here are my build commands: > > cython --embed vectorizeBug.pyx > gcc -pthr

Re: [Cython] Bug report: lambda and numpy.vectorize segfaults

2011-03-23 Thread Vitja Makarov
2011/3/23 Stefan Behnel : > Vitja Makarov, 23.03.2011 17:25: >> >>   File "/home/vitja/tmp/cython-my-git/Cython/Compiler/Parsing.py", >> line 2307, in p_c_arg_decl >>     if 'pxd' in s.level: >> AttributeError: 'PyrexScanner' object ha

Re: [Cython] Bug report: lambda and numpy.vectorize segfaults

2011-03-24 Thread Vitja Makarov
2011/3/24 Stefan Behnel : > Vitja Makarov, 23.03.2011 20:11: >> >> 2011/3/23 Stefan Behnel: >>> >>> Vitja Makarov, 23.03.2011 17:25: >>>> >>>>   File "/home/vitja/tmp/cython-my-git/Cython/Compiler/Parsing.py", >>>&g

[Cython] cygdb gdb script problem

2011-03-29 Thread Vitja Makarov
Running cygdb with Cython installed in the system leads to the following problem: vitja@vitja-laptop:~/work/cython-vitek-git/zzz$ python ../cygdb.py GNU gdb (GDB) 7.2-ubuntu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later

Re: [Cython] cygdb gdb script problem

2011-03-29 Thread Vitja Makarov
2011/3/29 mark florisson : > On 29 March 2011 21:11, Vitja Makarov wrote: >> Running cygdb with Cython installed in the system leads to the >> following problem: >> >> vitja@vitja-laptop:~/work/cython-vitek-git/zzz$ python ../cygdb.py >> GNU gdb (GDB) 7.2-

Re: [Cython] problem building master with python3

2011-04-04 Thread Vitja Makarov
2011/4/4 Darren Dale : > On Mon, Apr 4, 2011 at 3:32 PM, Darren Dale wrote: >> I'm attempting to install cython from the git repository to benefit >> from this fix: http://trac.cython.org/cython_trac/ticket/597 . When I >> run "python3 setup.py install --user", I get an error: >> >> cythoning /Use

Re: [Cython] speed.pypy.org

2011-04-11 Thread Vitja Makarov
2011/4/11 Stefan Behnel : > Hi, > > I'm currently discussing with Maciej Fijalkowski (PyPy) how to get Cython > running on speed.pypy.org (that's what I wrote "cythonrun" for). If it works > out well, we may have it up in a couple of days. > > I would expect that Cython won't be a big winner in thi

Re: [Cython] Control flow graph

2011-04-14 Thread Vitja Makarov
Can I use cython-generators project on hudson for control-flow tests? So I'll move cf branch development to my master branch. -- vitja. ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel

[Cython] Recent bugs in generators

2011-04-17 Thread Vitja Makarov
Hi! 1. Lambda-generator: Previous implementation was inspired by Python2.6: >>> list((lambda:((yield 1), (yield 2)))()) [1, 2, (None, None)] things changed in python2.7: >>> list((lambda:((yield 1), (yield 2)))()) [1, 2] 2. GeneratorExit is initialized to StopIteration when running generators_p

Re: [Cython] Recent bugs in generators

2011-04-17 Thread Vitja Makarov
2011/4/18 Stefan Behnel : > Vitja Makarov, 17.04.2011 17:57: >> >> 3. check_yield_in_exception() > > I added this because I found a failing pyregr test that uses it (testing the > @contextmanager decorator). > > >> Cython calls __Pyx_ExceptionReset when excep

Re: [Cython] Recent bugs in generators

2011-04-18 Thread Vitja Makarov
2011/4/18 Stefan Behnel : > Vitja Makarov, 18.04.2011 06:38: >> >> 2011/4/18 Stefan Behnel: >>> >>> Vitja Makarov, 17.04.2011 17:57: >>>> >>>> 3. check_yield_in_exception() >>> >>> I added this because I found a fail

Re: [Cython] Recent bugs in generators

2011-04-18 Thread Vitja Makarov
2011/4/19 Stefan Behnel : > Vitja Makarov, 18.04.2011 15:19: >> >> There is one more interesting thing: >> >> def test_yield_inside_genexp(): >>     """ >>     >>>  o = test_yield_inside_genexp() >>     >>>  list(o) &

Re: [Cython] Recent bugs in generators

2011-04-20 Thread Vitja Makarov
2011/4/18 Stefan Behnel : > Vitja Makarov, 18.04.2011 06:38: >> >> 2011/4/18 Stefan Behnel: >>> >>> Vitja Makarov, 17.04.2011 17:57: >>>> >>>> 3. check_yield_in_exception() >>> >>> I added this because I found a fail

Re: [Cython] Recent bugs in generators

2011-04-20 Thread Vitja Makarov
2011/4/20 Stefan Behnel : > Vitja Makarov, 20.04.2011 10:26: >> >> 2011/4/18 Stefan Behnel: >>> >>> Vitja Makarov, 18.04.2011 06:38: >>>> >>>> 2011/4/18 Stefan Behnel: >>>>> >>>>> Vitja Makarov, 17.04.2011 17:5

Re: [Cython] Recent bugs in generators

2011-04-20 Thread Vitja Makarov
2011/4/20 Stefan Behnel : > Vitja Makarov, 20.04.2011 11:50: >> >> 2011/4/20 Stefan Behnel: >>> >>> Vitja Makarov, 20.04.2011 10:26: >>>> >>>> 2011/4/18 Stefan Behnel: >>>>> >>>>> generators have their own life

Re: [Cython] Recent bugs in generators

2011-04-20 Thread Vitja Makarov
2011/4/20 Stefan Behnel : > Vitja Makarov, 20.04.2011 12:51: >> >> 2011/4/20 Stefan Behnel: >>> >>> Vitja Makarov, 20.04.2011 11:50: >>>> >>>> 2011/4/20 Stefan Behnel: >>>>> >>>>> Vitja Makarov, 20.04.2011

[Cython] Build module script

2011-04-20 Thread Vitja Makarov
Now we have cythonrun build script, may be it's time to create script for easy module building? -- vitja. ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel

Re: [Cython] Build module script

2011-04-21 Thread Vitja Makarov
2011/4/21 mark florisson : > On 21 April 2011 08:57, Vitja Makarov wrote: >> Now we have cythonrun build script, may be it's time to create script >> for easy module building? >> >> -- >> vitja. >> ___

Re: [Cython] Hudson pyregr testing takes too long

2011-04-24 Thread Vitja Makarov
2011/4/25 Stefan Behnel : > Stefan Behnel, 07.04.2011 13:52: >> >> Stefan Behnel, 07.04.2011 13:46: >>> >>> I just noticed that the CPython pyregr tests have jumped up from ~14 >>> minutes for a run to ~4 hours when we added generator support. >>> >>> >>> https://sage.math.washington.edu:8091/hudso

Re: [Cython] Hudson pyregr testing takes too long

2011-04-25 Thread Vitja Makarov
2011/4/25 Stefan Behnel : > Vitja Makarov, 25.04.2011 08:19: >> >> 2011/4/25 Stefan Behnel: >>> >>> Stefan Behnel, 07.04.2011 13:52: >>>> >>>> Stefan Behnel, 07.04.2011 13:46: >>>>> >>>>> I just noticed that th

Re: [Cython] Hudson pyregr testing takes too long

2011-04-25 Thread Vitja Makarov
2011/4/25 Stefan Behnel : > Vitja Makarov, 25.04.2011 11:04: >> >> 2011/4/25 Stefan Behnel: >>> >>> Vitja Makarov, 25.04.2011 08:19: >>>> >>>> 2011/4/25 Stefan Behnel: >>>>> >>>>> Stefan Behnel, 07.04.2011 13

Re: [Cython] speed.pypy.org

2011-04-29 Thread Vitja Makarov
2011/4/27 Stefan Behnel : > Robert Bradshaw, 27.04.2011 19:08: >> >> On Wed, Apr 27, 2011 at 12:45 AM, Stefan Behnel wrote: >>> >>> Actually, if we want a proper history, I'd suggest a separate codespeed >>> installation somewhere. >> >> Makes sense. How many CPU-hours does it take? > > Including t

[Cython] Dead code removal

2011-05-03 Thread Vitja Makarov
Hi! I can move unreachable code removal into its own branch and then make a pull request. But it seems to me that dead code removal should be done in control flow analysis so there are few options: 1. remove unreachable code in control flow transformation 2. set is_terminator flag in control flo

[Cython] jenkins problems

2011-05-03 Thread Vitja Makarov
Hi! Jenkins doesn't work for me. It seems that it can't do pull and is running tests again obsolete sources. May be because of forced push. There are only 6 errors here: https://sage.math.washington.edu:8091/hudson/view/cython-vitek/job/cython-vitek-tests-py27-c/ -- vitja. _

Re: [Cython] jenkins problems

2011-05-03 Thread Vitja Makarov
2011/5/4 Vitja Makarov : > Hi! > > Jenkins doesn't work for me. It seems that it can't do pull and is > running tests again obsolete sources. > May be because of forced push. > > There are only 6 errors here: > https://sage.math.washington.edu:8091/hudson/view/c

Re: [Cython] jenkins problems

2011-05-03 Thread Vitja Makarov
2011/5/4 Vitja Makarov : > 2011/5/4 Vitja Makarov : >> Hi! >> >> Jenkins doesn't work for me. It seems that it can't do pull and is >> running tests again obsolete sources. >> May be because of forced push. >> >> There are only 6 errors her

Re: [Cython] jenkins problems

2011-05-04 Thread Vitja Makarov
2011/5/4 Yury V. Zaytsev : > On Wed, 2011-05-04 at 10:35 +0400, Vitja Makarov wrote: >> > Can you please provide me jenkins account and I'll try to fix the issues >> > myself? >> > >> >> It's better to use: >> >> $ git fetch ori

Re: [Cython] jenkins problems

2011-05-04 Thread Vitja Makarov
2011/5/4 Stefan Behnel : > Vitja Makarov, 04.05.2011 07:09: >> >> Jenkins doesn't work for me. It seems that it can't do pull and is >> running tests again obsolete sources. >> May be because of forced push. >> >> There are only 6 errors here: &

Re: [Cython] jenkins problems

2011-05-04 Thread Vitja Makarov
2011/5/4 Stefan Behnel : > Vitja Makarov, 04.05.2011 21:14: >> >> 2011/5/4 Stefan Behnel: >>> >>> Vitja Makarov, 04.05.2011 07:09: >>>> >>>> Jenkins doesn't work for me. It seems that it can't do pull and is >>&g

Re: [Cython] Hudson pyregr testing takes too long

2011-05-04 Thread Vitja Makarov
2011/4/25 Vitja Makarov : > 2011/4/25 Stefan Behnel : >> Vitja Makarov, 25.04.2011 11:04: >>> >>> 2011/4/25 Stefan Behnel: >>>> >>>> Vitja Makarov, 25.04.2011 08:19: >>>>> >>>>> 2011/4/25 Stefan Behnel: >>>&

Re: [Cython] Hudson pyregr testing takes too long

2011-05-05 Thread Vitja Makarov
2011/5/5 Stefan Behnel : > Vitja Makarov, 05.05.2011 08:41: >> >> Recently I've found that pyregr.test_dict (test_mutatingiteration) >> test makes it slow: >> >> def test_mutatingiteration(): >>     d = {} >>     d[1] = 1 >>

Re: [Cython] Git workflow, branches, pull requests

2011-05-05 Thread Vitja Makarov
2011/5/6 Robert Bradshaw : > I don't like the default to be "don't pull from me"--I'd rather there > be some convention to indicate a branch is being used as a queue. > Maybe even foo-queue, or a leading underscore if people like that. > > On Thu, May 5, 2011 at 2:03 PM, Dag Sverre Seljebotn > wro

Re: [Cython] Git workflow, branches, pull requests

2011-05-06 Thread Vitja Makarov
2011/5/6 Dag Sverre Seljebotn : > On 05/06/2011 08:20 AM, Vitja Makarov wrote: >> >> 2011/5/6 Robert Bradshaw: >>> >>> I don't like the default to be "don't pull from me"--I'd rather there >>> be some convention to indicate a bran

[Cython] buffers and flow-control

2011-05-09 Thread Vitja Makarov
I've never been using buffers so my question is: Should uninitialized buffer access raise UnboundLocalVariable error? Like this: def foo(): cdef object bar print bar -- vitja. ___ cython-devel mailing list cython-devel@python.org http://mai

[Cython] Scoped expressions and generators problem

2011-05-19 Thread Vitja Makarov
I don't know how to handle scopedexprs in generators, here are some examples: [(yield i) for i in l] or [i for i in yield] In Python3 language mode scoped expression is created for list comprehension and loop variable is moved there. So now it isn't stored inside generator closure and is lost bet

Re: [Cython] nonecheck directive

2011-05-22 Thread Vitja Makarov
2011/5/22 Stefan Behnel : > Dag Sverre Seljebotn, 21.05.2011 09:07: >> >> On 05/21/2011 07:57 AM, Stefan Behnel wrote: >>> >>> In the future, I think we should be more careful with potentially >>> harmful options, and always prefer safety over speed - *especially* when >>> we know that the safe way

Re: [Cython] local variable handling in generators

2011-05-23 Thread Vitja Makarov
2011/5/22 Stefan Behnel : > Hi, > > I've been looking at the nqueens benchmark for a while, and I think it's > actually not that a bad benchmark for generators. > > http://hg.python.org/benchmarks/file/tip/performance/bm_nqueens.py > > A better implementation only for Py2.7/Py3 is here: > > https:/

Re: [Cython] local variable handling in generators

2011-05-23 Thread Vitja Makarov
2011/5/23 Stefan Behnel : > Vitja Makarov, 23.05.2011 10:13: >> >> With live variable analysis that should be easy to save/restore only >> active variables at the yield point. > > "Active" in the sense of "modified", I suppose? That's what I was

Re: [Cython] local variable handling in generators

2011-05-23 Thread Vitja Makarov
2011/5/23 Stefan Behnel : > Vitja Makarov, 23.05.2011 10:50: >> >> 2011/5/23 Stefan Behnel: >>> >>> Vitja Makarov, 23.05.2011 10:13: >>>> >>>> With live variable analysis that should be easy to save/restore only >>>> active var

Re: [Cython] local variable handling in generators

2011-05-23 Thread Vitja Makarov
2011/5/23 Robert Bradshaw : >> >> Then again, "del x" would be a more obvious way to spell this ... > > And then setting it to NULL would actually be correct. > That is already done ;) But usually you wouldn't use del statement in your code. > In any case, I'm -1 to deleting references once their

Re: [Cython] local variable handling in generators

2011-05-23 Thread Vitja Makarov
2011/5/23 Stefan Behnel : > > However, once we really know which values change between yield calls, i.e. > which ones need to be stored away, it will actually be less expensive in > most cases. We currently pay the indirection penalty for each access, even > read access, whereas the C compiler can

[Cython] CF and finally clause

2011-05-24 Thread Vitja Makarov
Hi! When I create control flow graph I have to visit finally clause twice. This is required because of different outputs should be generated for success and exception case: try: a = might_raise() finally: pass # 'a' might be uninitialized here print(a) # and definitely defined here So a

[Cython] subclassing list

2011-05-24 Thread Vitja Makarov
cdef class Foo(list): pass def foo(): f = Foo() f.append(1) gcc -g3 -fPIC -I/usr/include/python2.6 -g3 -W -Wall-c -o lll.o lll.c lll.c: In function ‘__pyx_pf_3lll_foo’: lll.c:468: error: ‘struct __pyx_obj_3lll_Foo’ has no member named ‘None’ Is this a known bug? -- vitja. _

[Cython] Small issue with buffers

2011-05-25 Thread Vitja Makarov
Hi! Trying to fix some tests broken by CF I've found this issue: def fuu(object[int] b1): cdef object[int] b2 print b1 buff.c: In function ‘__pyx_pf_4buff_fuu’: buff.c:504: error: ‘__pyx_bstruct_b2’ undeclared (first use in this function) buff.c:504: error: (Each undeclared identifier is

Re: [Cython] Broken tests

2011-05-27 Thread Vitja Makarov
2011/5/27 Stefan Behnel : > Hi, > > could we please make it a requirement to run the complete test suite after a > branch merge? Or at least taking a close look at Jenkins after pushing a > merge? And then fixing the bugs it finds? > > Stefan > There are failing tests in _control_flow branch. I gu

Re: [Cython] Broken tests

2011-05-27 Thread Vitja Makarov
2011/5/27 Dag Sverre Seljebotn : > On 05/27/2011 02:41 PM, Vitja Makarov wrote: >> >> 2011/5/27 Stefan Behnel: >>> >>> Hi, >>> >>> could we please make it a requirement to run the complete test suite >>> after a >>> branch merge?

[Cython] Control Flow

2011-05-27 Thread Vitja Makarov
I've recently fixed some issues: - closure variables were not tracked - scoped expression variables were initialized to None So, I should fix broken tests, here are some of them: nogil (should be fixed) purecdef (upstream) cfunc_directive_in_pyclass (upstream) bufaccess_noassignT444 (should be

Re: [Cython] Redundant Cython exception message strings

2011-05-28 Thread Vitja Makarov
2011/5/28 Robert Bradshaw : > On Fri, May 27, 2011 at 3:32 PM, Stefan Behnel wrote: >> Hi, >> >> I recently stumbled over a tradeoff question with AttributeError, and now >> found the same situation for UnboundLocalError in Vitja's control flow >> branch. So here it is. >> >> When we raise an exce

Re: [Cython] Control Flow

2011-05-28 Thread Vitja Makarov
2011/5/28 Robert Bradshaw : > On Fri, May 27, 2011 at 7:27 AM, Vitja Makarov > wrote: >> I've recently fixed some issues: >> >>  - closure variables were not tracked >>  - scoped expression variables were initialized to None >> >> So, I should fix b

Re: [Cython] Control Flow

2011-05-28 Thread Vitja Makarov
2011/5/28 Stefan Behnel : > Vitja Makarov, 28.05.2011 11:48: >> >> 2011/5/28 Robert Bradshaw: >>> >>> On Fri, May 27, 2011 at 7:27 AM, Vitja Makarov wrote: >>>> >>>> I've recently fixed some issues: >>>> >>&

Re: [Cython] Control Flow

2011-05-28 Thread Vitja Makarov
2011/5/28 Stefan Behnel : > Vitja Makarov, 28.05.2011 13:48: >> >> 2011/5/28 Stefan Behnel: >>> >>> Vitja Makarov, 28.05.2011 11:48: >>>> >>>> 2011/5/28 Robert Bradshaw: >>>>> >>>>> On Fri, May

Re: [Cython] Control Flow

2011-05-28 Thread Vitja Makarov
2011/5/28 Stefan Behnel : > Vitja Makarov, 28.05.2011 14:12: >> >> 2011/5/28 Stefan Behnel: >>> >>> Ok, I think we're done then, right? Anything else to do before merging it >>> back? >> >> I hope so ;) > > I gave your branch a te

Re: [Cython] Control Flow

2011-05-29 Thread Vitja Makarov
2011/5/28 Stefan Behnel : > Stefan Behnel, 28.05.2011 18:06: >> >> Let's see how much of Sage we break. > > ... quite a bit. From a superficial glance, there seem to be some real bugs, > but most of the failures and warnings are most likely just uninitialised > variables that are expected to be Non

Re: [Cython] Control Flow

2011-05-29 Thread Vitja Makarov
2011/5/29 Stefan Behnel : > Vitja Makarov, 29.05.2011 10:11: >> >> 2011/5/28 Stefan Behnel: >>> >>> Stefan Behnel, 28.05.2011 18:06: >>>> >>>> Let's see how much of Sage we break. >>> >>> ... quite a bit. From a superf

Re: [Cython] Control Flow

2011-05-29 Thread Vitja Makarov
2011/5/29 Stefan Behnel : > Vitja Makarov, 29.05.2011 11:17: >> >> 2011/5/29 Stefan Behnel: >>> >>> Vitja Makarov, 29.05.2011 10:11: >>>> >>>> I've started new branch called control_flow_fixes. >>> >>> I think you

Re: [Cython] Control Flow

2011-05-30 Thread Vitja Makarov
2011/5/29 Vitja Makarov : > 2011/5/29 Stefan Behnel : >> Vitja Makarov, 29.05.2011 11:17: >>> >>> 2011/5/29 Stefan Behnel: >>>> >>>> Vitja Makarov, 29.05.2011 10:11: >>>>> >>>>> I've started new branch called

Re: [Cython] Control Flow

2011-05-30 Thread Vitja Makarov
2011/5/30 Stefan Behnel : > Vitja Makarov, 30.05.2011 20:53: >> >> I see sigsegv in lxml tests: >> >> 1222/1364 ( 89.6%): test_xmlschema_import_file >> (lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase) ... Segmentation >> fault >> >> https://sa

[Cython] wiki.cython.org is down

2011-05-30 Thread Vitja Makarov
With error: Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. -- vitja. ___ cython-devel mailing list cython-devel@python.org http://mail

Re: [Cython] local variable handling in generators

2011-05-31 Thread Vitja Makarov
2011/5/24 Stefan Behnel : > Vitja Makarov, 23.05.2011 21:33: >> >> 2011/5/23 Stefan Behnel: >>> >>> However, once we really know which values change between yield calls, >>> i.e. >>> which ones need to be stored away, it will actually be les

[Cython] Bindings performance issue

2011-05-31 Thread Vitja Makarov
Hi! Is bindings performance issue valuable? $ cat bindbench.pyx def wo_bindings(): pass def outer(): def inner(): pass return inner with_bindings = outer() $ python >>> import timeit >>> timeit.repeat('with_bindings()', setup='from bindbench import wo_bindings, >>> with_bin

Re: [Cython] Bindings performance issue

2011-06-01 Thread Vitja Makarov
2011/6/1 mark florisson : > On 31 May 2011 20:25, Vitja Makarov wrote: >> Hi! >> >> Is bindings performance issue valuable? >> >> $ cat bindbench.pyx >> def wo_bindings(): >>    pass >> >> def outer(): >>    def inner(): >>    

Re: [Cython] Bindings performance issue

2011-06-02 Thread Vitja Makarov
2011/6/2 Robert Bradshaw : > On Wed, Jun 1, 2011 at 7:26 AM, Vitja Makarov wrote: >> 2011/6/1 mark florisson : >>> On 31 May 2011 20:25, Vitja Makarov wrote: >>>> Hi! >>>> >>>> Is bindings performance issue valuable? >>>

Re: [Cython] Bindings performance issue

2011-06-02 Thread Vitja Makarov
2011/6/2 Robert Bradshaw : >> Initially bindings was written to support bound class methods (am I right?) >> So when we use it for regular functions 'binding' in the name doesn't >> reflect its purpose. > > There's three kinds of functions we create: PyCFunctions, binding > PyCFunctions, and extens

Re: [Cython] Bindings performance issue

2011-06-04 Thread Vitja Makarov
I've tried that: https://github.com/vitek/cython/compare/master..._bindings Results are not bad: 168 failing tests for pyregr2.7 and 463 for py3 -- vitja. ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cyt

Re: [Cython] Bindings performance issue

2011-06-04 Thread Vitja Makarov
2011/6/4 mark florisson : > On 4 June 2011 12:24, Vitja Makarov wrote: >> I've tried that: https://github.com/vitek/cython/compare/master..._bindings >> >> Results are not bad: 168 failing tests for pyregr2.7 and 463 for py3 > > Nice, it partly duplicates wo

Re: [Cython] local variable handling in generators

2011-06-07 Thread Vitja Makarov
2011/5/31 Dag Sverre Seljebotn : > On 05/31/2011 01:07 PM, Vitja Makarov wrote: >> >> 2011/5/24 Stefan Behnel: >>> >>> Vitja Makarov, 23.05.2011 21:33: >>>> >>>> 2011/5/23 Stefan Behnel: >>>>> >>>>> However, o

[Cython] Constant folding

2011-06-10 Thread Vitja Makarov
Hi! When CF is there it is possible to improve constant folding. Some NameNode references could be easily replaced by appropriate ConstNode. Could that help GCC to produce faster code? -- vitja. ___ cython-devel mailing list cython-devel@python.org ht

[Cython] Some bugs found while testing cython on django

2011-06-19 Thread Vitja Makarov
Hi! Trying to compile django I've found some problems: 1. It seems that cython currently doesn't support tuples inside args definition: def foo((a, b), c): Currently this gives missing argument name and crash inside CreateControlFlow graph cython -X binding=True django/contrib/gis/forms/fields

Re: [Cython] Some bugs found while testing cython on django

2011-06-20 Thread Vitja Makarov
2011/6/20 Stefan Behnel : > Vitja Makarov, 19.06.2011 21:37: >> >> Trying to compile django I've found some problems: >> >> 1. It seems that cython currently doesn't support tuples inside args >> definition: >> >> def foo((a, b), c): >

Re: [Cython] Bindings performance issue

2011-06-20 Thread Vitja Makarov
Wow now we have about 11K tests with 171 errors! https://sage.math.washington.edu:8091/hudson/view/cython-vitek/job/cython-vitek-tests-pyregr-py27-c/ -- vitja. ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinf

Re: [Cython] Bindings performance issue

2011-06-21 Thread Vitja Makarov
2011/6/21 Stefan Behnel : > Vitja Makarov, 20.06.2011 22:23: >> >> Wow now we have about 11K tests with 171 errors! >> >> >> https://sage.math.washington.edu:8091/hudson/view/cython-vitek/job/cython-vitek-tests-pyregr-py27-c/ > > Yes, that was a low

Re: [Cython] Bindings performance issue

2011-06-21 Thread Vitja Makarov
2011/6/21 Vitja Makarov : > 2011/6/21 Stefan Behnel : >> Vitja Makarov, 20.06.2011 22:23: >>> >>> Wow now we have about 11K tests with 171 errors! >>> >>> >>> https://sage.math.washington.edu:8091/hudson/view/cython-vitek/job/cython-vitek-

Re: [Cython] Bindings performance issue

2011-06-21 Thread Vitja Makarov
2011/6/21 Stefan Behnel : > Vitja Makarov, 21.06.2011 09:07: >> >> 2011/6/21 Stefan Behnel: >>> >>> Vitja Makarov, 20.06.2011 22:23: >>>> >>>> Wow now we have about 11K tests with 171 errors! >>>> >>>> >>&

[Cython] strange bug in parallel assignment

2011-06-22 Thread Vitja Makarov
Hi! Looking at hudson pyregr output I've found this issue: (a, b), (c,) = (1, 2), {1: 2} Traceback (most recent call last): File "cython.py", line 17, in main(command_line = 1) File "/home/vitja/work/cython-vitek/Cython/Compiler/Main.py", line 821, in main result = compile(sources,

Re: [Cython] strange bug in parallel assignment

2011-06-22 Thread Vitja Makarov
2011/6/22 Vitja Makarov : > Hi! > > Looking at hudson pyregr output I've found this issue: > > (a, b), (c,) = (1, 2), {1: 2} > > Traceback (most recent call last): >  File "cython.py", line 17, in >    main(command_line = 1) >  File "/home/vitj

Re: [Cython] PEP 380 approved: syntax for generator delegation

2011-06-27 Thread Vitja Makarov
2011/6/27 Stefan Behnel : > Hi, > > PEP 380 ("yield from") recently went through the approval gate. > > http://www.python.org/dev/peps/pep-0380/ > > The implementation in CPython isn't rounded up yet and lots of tests are > missing from the test suite. But it's agreed that it'll make it into 3.3, >

[Cython] Hudson is down?

2011-07-04 Thread Vitja Makarov
It seems that hudson server is down. -- vitja. ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel

[Cython] PEP 3135 -- New Super

2011-07-04 Thread Vitja Makarov
I was thinking about implementing new super() with no arguments. The problem is where to store __class__, I see two options here: 1. Add func_class member to CyFunction, this way __class__ will be private and not visible for inner functions: 2. Put it into closure Actually, I like the first one.

Re: [Cython] PEP 3135 -- New Super

2011-07-05 Thread Vitja Makarov
2011/7/5 Stefan Behnel : > Vitja Makarov, 05.07.2011 08:21: >> >> I was thinking about implementing new super() with no arguments. > > Please do :) > > If you start working on it, please assign the ticket to you: > > http://trac.cython.org/cython_trac/ticket/6

  1   2   3   4   >