Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-30 Thread Neal Norwitz
On 5/29/06, Martin v. Löwis [EMAIL PROTECTED] wrote: OTOH, perhaps a deprecation warning on PyArgs_Parse() is sufficient? What about that? It doesn't address other cases where OLDARGS are used without PyArgs_Parse though. What other cases remain? People might have complex argument

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-30 Thread Paul Moore
On 5/30/06, Georg Brandl [EMAIL PROTECTED] wrote: Neal Norwitz wrote: I'd be satisfied with a deprecation warning for PyArg_Parse, though we (*) should really figure out how to make it work on Windows. I haven't seen anyone object to the C compiler deprecation warning. There is something

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-30 Thread Fredrik Lundh
Georg Brandl wrote: I'd be satisfied with a deprecation warning for PyArg_Parse, though we (*) should really figure out how to make it work on Windows. I haven't seen anyone object to the C compiler deprecation warning. There is something at

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-30 Thread Scott Dial
Neal Norwitz wrote: Already done for gcc, see Py_DEPRECATED in pyport.h. Would be nice if someone could add support on Windows. The manner that macro is used can't be leveraged to work in the VC compiler. I admit to not having done an extensive search for the usage of Py_DEPRECATED, but to

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-30 Thread Georg Brandl
Fredrik Lundh wrote: Georg Brandl wrote: I'd be satisfied with a deprecation warning for PyArg_Parse, though we (*) should really figure out how to make it work on Windows. I haven't seen anyone object to the C compiler deprecation warning. There is something at

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-30 Thread Fredrik Lundh
Georg Brandl wrote: and links to http://msdn2.microsoft.com/en-us/library/c8xdzzhh.aspx which provides a pragma that does the same thing, and is documented to work for both C and C++, and also works for macros. But we'd have to use an #ifdef for every deprecated function. or a

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-29 Thread Guido van Rossum
On 5/28/06, Martin v. Löwis [EMAIL PROTECTED] wrote: Georg Brandl wrote: There's still a ton used under Modules. Also, if no flag is specified, it will default to 0 (ie, METH_OLDARGS). I wonder how many third party modules use METH_OLDARGS directly or more likely indirectly. These

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-29 Thread Fredrik Lundh
Neal Norwitz wrote: Also, it would be easy to detect METH_OLDARGS in PyCFunction_New and raise an appropriate exception. I agree with Martin this should raise a deprecation warning in 2.5. why? this is a clear case of unnecessary meddling. removing it won't remove much code (a whopping

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-29 Thread Thomas Wouters
On 5/29/06, Fredrik Lundh [EMAIL PROTECTED] wrote: this is a clear case of unnecessary meddling.removing it won't removemuch code (a whopping 11 lines is dedicated to this), nor give any speedups whatsoever; all you're doing is generating extra work and support issues for a bunch of third-party

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-29 Thread Georg Brandl
Thomas Wouters wrote: On 5/29/06, *Fredrik Lundh* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: this is a clear case of unnecessary meddling. removing it won't remove much code (a whopping 11 lines is dedicated to this), nor give any speed ups whatsoever; all you're

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-29 Thread Martin v. Löwis
Georg Brandl wrote: Isn't there at least a GCC __attribute__((deprecated))? Yes, but it applies to functions only. I guess you could make a __deprecated__ function, and then expand METH_OLDARGS to a call of that function. That won't help in cases where there are no flags given at all in the

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-29 Thread Georg Brandl
Martin v. Löwis wrote: Georg Brandl wrote: Isn't there at least a GCC __attribute__((deprecated))? Yes, but it applies to functions only. I guess you could make a __deprecated__ function, and then expand METH_OLDARGS to a call of that function. That won't help in cases where there are no

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-29 Thread Martin v. Löwis
Georg Brandl wrote: I thought more about PyArg_Parse for __deprecated__. Ah, PyArg_Parse can, of course. Having it actually do that should not hurt, either - but you need a reliable check whether the compiler supports __deprecated__. Regards, Martin

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-29 Thread Martin v. Löwis
Guido van Rossum wrote: I think that should be done for 2.5, but nothing else. Or, perhaps a deprecation warning could be generated if it is still used. I'll let Martin decide this one. I just sent a message to some that producing a DeprecationWarning is fine, but now I read some opposition;

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-29 Thread Georg Brandl
Martin v. Löwis wrote: Guido van Rossum wrote: I think that should be done for 2.5, but nothing else. Or, perhaps a deprecation warning could be generated if it is still used. I'll let Martin decide this one. I just sent a message to some that producing a DeprecationWarning is fine, but

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-29 Thread Neal Norwitz
On 5/29/06, Martin v. Löwis [EMAIL PROTECTED] wrote: Georg Brandl wrote: I thought more about PyArg_Parse for __deprecated__. Ah, PyArg_Parse can, of course. Having it actually do that should not hurt, either - but you need a reliable check whether the compiler supports __deprecated__.

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-29 Thread Neal Norwitz
On 5/29/06, Thomas Wouters [EMAIL PROTECTED] wrote: On 5/29/06, Fredrik Lundh [EMAIL PROTECTED] wrote: this is a clear case of unnecessary meddling. removing it won't remove much code (a whopping 11 lines is dedicated to this), nor give any speed ups whatsoever; all you're doing is

[Python-Dev] Remove METH_OLDARGS?

2006-05-28 Thread Georg Brandl
In the process of reviewing and possibly extending getargs.c, I stumbled over the compatibility flag supposedly used for METH_OLDARGS functions. No code in the core uses this calling convention any more, and it has been deprecated for quite a long time (since 2.2), so would it be appropriate to

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-28 Thread Neal Norwitz
On 5/28/06, Georg Brandl [EMAIL PROTECTED] wrote: In the process of reviewing and possibly extending getargs.c, I stumbled over the compatibility flag supposedly used for METH_OLDARGS functions. No code in the core uses this calling convention any more, and it has been deprecated for quite a

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-28 Thread Raymond Hettinger
In the process of reviewing and possibly extending getargs.c, I stumbled over the compatibility flag supposedly used for METH_OLDARGS functions. No code in the core uses this calling convention any more, and it has been deprecated for quite a long time (since 2.2), so would it be appropriate

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-28 Thread Georg Brandl
Neal Norwitz wrote: On 5/28/06, Georg Brandl [EMAIL PROTECTED] wrote: In the process of reviewing and possibly extending getargs.c, I stumbled over the compatibility flag supposedly used for METH_OLDARGS functions. No code in the core uses this calling convention any more, and it has been

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-28 Thread Martin v. Löwis
Georg Brandl wrote: There's still a ton used under Modules. Also, if no flag is specified, it will default to 0 (ie, METH_OLDARGS). I wonder how many third party modules use METH_OLDARGS directly or more likely indirectly. These modules can be converted. I think that should be done for

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-28 Thread Neal Norwitz
On 5/28/06, Georg Brandl [EMAIL PROTECTED] wrote: Neal Norwitz wrote: On 5/28/06, Georg Brandl [EMAIL PROTECTED] wrote: In the process of reviewing and possibly extending getargs.c, I stumbled over the compatibility flag supposedly used for METH_OLDARGS functions. No code in the core uses