[Python-Dev] Remove METH_OLDARGS?

Neal Norwitz nnorwitz at gmail.com
Tue May 30 08:14:33 CEST 2006


On 5/29/06, "Martin v. Löwis" <martin at v.loewis.de> 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 processing
> procedure not involving PyArg_Parse, these would just break with a
> runtime error in Py3k. If the module is maintained, it should be easy
> to fix it. If the module is unmaintained, producing a warning now
> might not help, either.

One case would be if the function doesn't take any args, but the args
aren't checked, just ignored.  Another case I was thinking about was
PyArg_NoArgs which is a macro, but that just calls PyArg_Parse, so it
would get flagged.  I can't imagine there would be enough of these
cases to matter.

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.

n
--
* Where we means someone with a Windows box of course. :-)


More information about the Python-Dev mailing list