[issue10869] ast.increment_lineno() increments root node twice

2011-01-08 Thread David White
New submission from David White dappa...@gmail.com: When using ast.increment_lineno(), it visits the root node twice. Therefore if the root node contains the lineno attribute, it is incremented twice. (Often, the root node will not have a lineno attribute, so there is no effect. This is

[issue10869] ast.increment_lineno() increments root node twice

2011-01-08 Thread David White
Changes by David White dappa...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file20317/increment_linenos_27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10869 ___

[issue10869] ast.increment_lineno() increments root node twice

2011-01-08 Thread David White
Changes by David White dappa...@gmail.com: Added file: http://bugs.python.org/file20318/increment_linenos_31.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10869 ___

[issue10869] ast.increment_lineno() increments root node twice

2011-01-08 Thread David White
Changes by David White dappa...@gmail.com: -- resolution: - fixed Added file: http://bugs.python.org/file20319/increment_linenos_3k.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10869

[issue10869] ast.increment_lineno() increments root node twice

2011-01-08 Thread David White
David White dappa...@gmail.com added the comment: I've uploaded the patches. Beware, this is my first attempt to contribute. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10869 ___

[issue10869] ast.increment_lineno() increments root node twice

2011-01-08 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- keywords: +needs review nosy: +aronacher, rhettinger resolution: fixed - stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10869

[issue10869] ast.increment_lineno() increments root node twice

2011-01-08 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r87876. Will backport to other branches. -- nosy: +georg.brandl resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org