Re: [Cython] del command

2011-02-17 Thread Stefan Behnel
Reply sent to cython-users. Stefan ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel

[Cython] del command

2011-02-17 Thread Prashant Saxena
Hello, python 2.6.6 Cython-0.14.1 xp, mac, linux When I am using "del" command in my scripts and compiling using pure python mode, I am getting an error: "Deletion of local or C global name not supported" There are couple of places where I have to delete an object. I am using a hack to solve

Re: [Cython] Fixing NumPy support for Python 3 (Stefan, please help!)

2011-02-17 Thread Stefan Behnel
Lisandro Dalcin, 17.02.2011 17:24: On 17 February 2011 12:16, Stefan Behnel wrote: Lisandro Dalcin, 17.02.2011 15:32: Stefan, what do you think about the patch below? This hunk is part of a series of fixes required to get numpy-dev working under Python 3.2. The root of the issue is that __cyth

Re: [Cython] [cython-users] Cython .pxd introspection: listing defined constants

2011-02-17 Thread Stefan Behnel
Robert Bradshaw, 18.02.2011 00:54: Forgot reply-all... didin't we have this discussion before about making that the default for this list as it is by-far the most common desired behavior? Yes we did. And I guess it would be "the default" for mailing lists if it was just that: a default, not so

Re: [Cython] Python C-api ref count semantics

2011-02-17 Thread Stefan Behnel
Chris Colbert, 18.02.2011 03:23: What is the rule of thumb when declaring functions from python's C-api when comes to ref counting? The general rule is to not declare them yourself. Instead, cimport them from the cpython package. (See Cython/Includes/) If I define a test case like so: cde

[Cython] Gmane archive

2011-02-17 Thread Stefan Behnel
Hi, I still didn't get a response from Gmane, but this article doesn't look promising: http://article.gmane.org/gmane.discuss/13987 So I guess we'll have to request a new group. Very unfortunate. Stefan ___ cython-devel mailing list cython-devel@py

Re: [Cython] [cython-users] Cython .pxd introspection: listing defined constants

2011-02-17 Thread W. Trevor King
On Thu, Feb 17, 2011 at 3:53 PM, Robert Bradshaw wrote: > On Thu, Feb 17, 2011 at 3:12 PM, W. Trevor King wrote: >> On Thu, Feb 17, 2011 at 01:25:10PM -0800, Robert Bradshaw wrote: >>> On Thu, Feb 17, 2011 at 5:29 AM, W. Trevor King wrote: >>> > On Wed, Feb 16, 2011 at 03:55:19PM -0800, Robert Brad

[Cython] Python C-api ref count semantics

2011-02-17 Thread Chris Colbert
What is the rule of thumb when declaring functions from python's C-api when comes to ref counting? If I define a test case like so: cdef extern from "Python.h": object PyWeakref_NewRef(object, object) object PyWeakref_GET_OBJECT(object) class Foo(object): pass cdef class Test:

Re: [Cython] [cython-users] Cython .pxd introspection: listing defined constants

2011-02-17 Thread Robert Bradshaw
Forgot reply-all... didin't we have this discussion before about making that the default for this list as it is by-far the most common desired behavior? On Thu, Feb 17, 2011 at 3:53 PM, Robert Bradshaw wrote: > On Thu, Feb 17, 2011 at 3:12 PM, W. Trevor King wrote: >> On Thu, Feb 17, 2011 at 01:

Re: [Cython] [cython-users] Cython .pxd introspection: listing defined constants

2011-02-17 Thread W. Trevor King
On Thu, Feb 17, 2011 at 01:25:10PM -0800, Robert Bradshaw wrote: > On Thu, Feb 17, 2011 at 5:29 AM, W. Trevor King wrote: > > On Wed, Feb 16, 2011 at 03:55:19PM -0800, Robert Bradshaw wrote: > >> On Wed, Feb 16, 2011 at 8:17 AM, W. Trevor King wrote: > >> > What I'm missing is a way to bind the M

Re: [Cython] [cython-users] Cython .pxd introspection: listing defined constants

2011-02-17 Thread Robert Bradshaw
On Thu, Feb 17, 2011 at 5:29 AM, W. Trevor King wrote: > This thread is coming over to cython-dev (and the new cython-devel) > from cython-users because it turns out it will probably require > chaning the Cython code.  To get everyone who hasn't been following on > cython-users up to speed, here's

[Cython] python 2.7/3.x and numpy-dev (Dag, I need a quick comment)

2011-02-17 Thread Lisandro Dalcin
I'm working on a patch to get old, recent, and dev NumPy working in 2.7/3.x. So far, I had success, but I still have two failures like the one pasted below. Dag, could you elaborate a bit about the purpose of __Pyx_BufFmt_CheckString() ? It is just a validity check for pep 3118 format strings? Do

Re: [Cython] Fixing NumPy support for Python 3 (Stefan, please help!)

2011-02-17 Thread Stefan Behnel
Lisandro Dalcin, 17.02.2011 15:32: Stefan, what do you think about the patch below? This hunk is part of a series of fixes required to get numpy-dev working under Python 3.2. The root of the issue is that __cythonbufferdefaults__ keys&values end-up being "bytes" (this coercion is triggered in Int

Re: [Cython] [cython-users] Cython .pxd introspection: listing defined constants

2011-02-17 Thread Lisandro Dalcin
On 17 February 2011 11:35, W. Trevor King wrote: > On Thu, Feb 17, 2011 at 10:53:15AM -0300, Lisandro Dalcin wrote: >> Cython could certainly support "cpdef struct", it is just a matter to >> define a proposal and find a contributor to implement it :-) > > Is there a CEP template (a la PEPs 9 and

Re: [Cython] [cython-users] Cython .pxd introspection: listing defined constants

2011-02-17 Thread W. Trevor King
On Thu, Feb 17, 2011 at 10:53:15AM -0300, Lisandro Dalcin wrote: > Cython could certainly support "cpdef struct", it is just a matter to > define a proposal and find a contributor to implement it :-) Is there a CEP template (a la PEPs 9 and 12) that should be discussed on the mailing list, or do I

[Cython] Fixing NumPy support for Python 3 (Stefan, please help!)

2011-02-17 Thread Lisandro Dalcin
Stefan, what do you think about the patch below? This hunk is part of a series of fixes required to get numpy-dev working under Python 3.2. The root of the issue is that __cythonbufferdefaults__ keys&values end-up being "bytes" (this coercion is triggered in Interpreter.py). diff --git a/Cython/C

[Cython] [PATCH] Add .gitignores to cython and cython-docs

2011-02-17 Thread W. Trevor King
Here's a pair of patches doing just that. I also ignore *.c in cython, because all .c files are currently auto-generated. Perhaps that will not always be the case? If it seems to risky, feel free to leave that part out. -- This email may be signed or encrypted with GPG (http://www.gnupg.org).

Re: [Cython] [cython-users] Cython .pxd introspection: listing defined constants

2011-02-17 Thread W. Trevor King
On Thu, Feb 17, 2011 at 08:29:41AM -0500, W. Trevor King wrote: > cpdef struct Foo: > cpdef public int intA > cpdef readonly int intB > cdef void *ptr Oops, for consistency with classes, the variables declarations should read `cdef public` and and `cdef readonly`. Perh

Re: [Cython] Outdated `hg export` on cython-devel homepage

2011-02-17 Thread Stefan Behnel
W. Trevor King, 17.02.2011 14:51: The `hg export` on the cython-devel page [1] should probably be changed to (or additionally list) `git format-patch`, now that Cython's versioned in Git. Keeping the `hg export` reference might be useful for Mercurial lovers using hg-git. [1]: http://mail.pytho

Re: [Cython] [cython-users] Cython .pxd introspection: listing defined constants

2011-02-17 Thread W. Trevor King
This thread is coming over to cython-dev (and the new cython-devel) from cython-users because it turns out it will probably require chaning the Cython code. To get everyone who hasn't been following on cython-users up to speed, here's a summary of what I'm trying to do: That's what I was trying t

[Cython] Outdated `hg export` on cython-devel homepage

2011-02-17 Thread W. Trevor King
The `hg export` on the cython-devel page [1] should probably be changed to (or additionally list) `git format-patch`, now that Cython's versioned in Git. Keeping the `hg export` reference might be useful for Mercurial lovers using hg-git. [1]: http://mail.python.org/mailman/listinfo/cython-devel

Re: [Cython] Fwd: Re: Cython builds on various Debian platforms

2011-02-17 Thread Yaroslav Halchenko
On Wed, 16 Feb 2011, Lisandro Dalcin wrote: > > | AssertionError > > `--- > > what could be done about it or should it be excluded? > I've pushed some fixes. Now this testcase should run from ancient > Python 2.3 to head Python 3.2, both for static and sharedlib builds > (but not in Windows). fi

[Cython] documentation tarball

2011-02-17 Thread Jason Grout
Would it be too much trouble to post a snapshot of the cython-docs tree along with a cython release? I see the git repository for cython-docs, but it would be more convenient for an end-user who wants a copy of the docs to not have to search through the commit log to find the right commit corr