[issue24687] refleak on SyntaxError in function parameter annotation

2015-07-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b5a7f529b4ac by Yury Selivanov in branch '3.5':
Issue #24687: Plug refleak on SyntaxError in function parameters annotations.
https://hg.python.org/cpython/rev/b5a7f529b4ac

New changeset cf91ae981afd by Yury Selivanov in branch 'default':
Merge 3.5 (Issue #24687)
https://hg.python.org/cpython/rev/cf91ae981afd

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24687
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24687] refleak on SyntaxError in function parameter annotation

2015-07-23 Thread Yury Selivanov

Yury Selivanov added the comment:

Thanks, Benjamin!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24687
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24687] refleak on SyntaxError in function parameter annotation

2015-07-23 Thread Yury Selivanov

Changes by Yury Selivanov yseliva...@gmail.com:


--
resolution:  - fixed
stage: patch review - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24687
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24687] refleak on SyntaxError in function parameter annotation

2015-07-23 Thread Yury Selivanov

Yury Selivanov added the comment:

 I would prefer that compiler_visit_argannotation[s] be fixed to use the 
 normal calling convention.

Agree, new patch attached.

--
Added file: http://bugs.python.org/file39990/compile2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24687
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24687] refleak on SyntaxError in function parameter annotation

2015-07-23 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Seems fine to me.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24687
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24687] refleak on SyntaxError in function parameter annotation

2015-07-22 Thread Benjamin Peterson

Benjamin Peterson added the comment:

I would prefer that compiler_visit_argannotation[s] be fixed to use the normal 
calling convention.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24687
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24687] refleak on SyntaxError in function parameter annotation

2015-07-22 Thread Yury Selivanov

New submission from Yury Selivanov:

A simple way of reproducing the issue is to try to compile the following piece 
of code with refleaks check mode on:

   def foo(a:(yield)): pass

Since '(yield)' expression is outside of a function, it will trigger a 
SyntaxError.

There is a subtle bug in compile.c though, specifically in 
compiler_visit_argannotation method; it should return -1 in case of error, but 
the VISIT macro it uses returns 0 on errors.

Attached patch uses 'compiler_visit_expr' directly returning correct error code.

--
components: Interpreter Core
files: compile.patch
keywords: patch
messages: 247153
nosy: benjamin.peterson, ncoghlan, yselivanov
priority: high
severity: normal
stage: patch review
status: open
title: refleak on SyntaxError in function parameter annotation
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file39985/compile.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24687
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com