classification
Title: parser module fails to validate "with" statements.
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, dbinger
Priority: normal Keywords: patch

Created on 2008-11-23 19:07 by dbinger, last changed 2008-11-24 16:22 by benjamin.peterson. This issue is now closed.

Files
File name Uploaded Description Edit
parsewith.diff dbinger, 2008-11-23 19:07 suggested patch with unit test.
Messages (4)
msg76271 - (view) Author: David Binger (dbinger) Date: 2008-11-23 19:07
The parser module validates node trees when they are built from sequences.
The validator must, unfortunately, be updated every time there is a change
in the grammar.  The current validator fails to validate "with"
statements.  This bug probably exists in earlier versions of python
that support "with", but I haven't checked.

Here is a patch with a unit test for py3k.
Files involved: parsermodule.c, test_parser.py.
msg76296 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-11-24 04:09
Thanks for the patch! Fixed in r67365.
msg76334 - (view) Author: David Binger (dbinger) Date: 2008-11-24 16:21
Thanks, Benjamin.

I see that you applied this to the main python branch,
which is probably okay (though I haven't tested it),
but I wrote the patch against the py3k code.
Did you mean to apply it to py3k?

On Nov 23, 2008, at 11:09 PM, Benjamin Peterson wrote:

>
> Benjamin Peterson <musiccomposition@gmail.com> added the comment:
>
> Thanks for the patch! Fixed in r67365.
>
> ----------
> nosy: +benjamin.peterson
> resolution:  -> fixed
> status: open -> closed
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue4396>
> _______________________________________
msg76335 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-11-24 16:22
On Mon, Nov 24, 2008 at 10:21 AM, David Binger <report@bugs.python.org> wrote:
>
> David Binger <davidbinger@mac.com> added the comment:
>
> Thanks, Benjamin.
>
> I see that you applied this to the main python branch,
> which is probably okay (though I haven't tested it),
> but I wrote the patch against the py3k code.
> Did you mean to apply it to py3k?

Yes, I applied it to the trunk because it was a problem there, too. It
will be merged into py3k eventually.
History
Date User Action Args
2008-11-24 16:22:06benjamin.petersonsetmessages: + msg76335
2008-11-24 16:21:22dbingersetmessages: + msg76334
2008-11-24 04:09:26benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg76296
nosy: + benjamin.peterson
2008-11-23 19:07:07dbingercreate