Issue 9154: Parser module doesn't understand function annotations. (original) (raw)

Issue9154

Created on 2010-07-04 19:03 by mark.dickinson, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
parser_annotations_kwonly.patch mark.dickinson,2010-07-06 09:14 review
Messages (4)
msg109256 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-07-04 19:03
Python 3.2a0 (py3k:82529M, Jul 4 2010, 17:35:10) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import parser [38213 refs] >>> parser.sequence2st(parser.suite("def f(a:int) -> int: pass").totuple()) Traceback (most recent call last): File "", line 1, in parser.ParserError: VALIDATION FAILURE: report this to the maintainer! [38264 refs]
msg109373 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-07-06 09:14
Patch fixing validation of function annotations and keyword-only arguments. There's still the issue of false positives: annotations on lambda arguments should raise an exception, but don't.
msg111164 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2010-07-22 10:24
The extra space in Grammar was already removed in r82624. The remaining part of the patch looks good to me. The lambda thing is not important, if you get an error when trying to compile the resulting st.
msg159632 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-04-29 17:36
New changeset 9f57d66689ca by Mark Dickinson in branch '3.2': Issue #9154: Fix parser module to understand function annotations. http://hg.python.org/cpython/rev/9f57d66689ca New changeset cee5cb877631 by Mark Dickinson in branch 'default': Issue #9154: Merge fix from 3.2. http://hg.python.org/cpython/rev/cee5cb877631
History
Date User Action Args
2022-04-11 14:57:03 admin set github: 53400
2012-04-29 18:11:32 mark.dickinson set status: open -> closedresolution: fixed
2012-04-29 17:36:08 python-dev set nosy: + python-devmessages: +
2012-03-10 18:35:37 mark.dickinson set versions: + Python 3.3, - Python 3.1
2010-07-22 10:24:09 amaury.forgeotdarc set nosy: + amaury.forgeotdarcmessages: +
2010-07-06 09:14:54 mark.dickinson set stage: test needed -> patch review
2010-07-06 09:14:44 mark.dickinson set files: + parser_annotations_kwonly.patchkeywords: + patchmessages: +
2010-07-04 19:03:22 mark.dickinson create