Skip to content

Parser module doesn't understand function annotations. #53400

Closed

Description

@mdickinson
BPO 9154
Nosy @amauryfa, @mdickinson
Files
  • parser_annotations_kwonly.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/mdickinson'
    closed_at = <Date 2012-04-29.18:11:32.753>
    created_at = <Date 2010-07-04.19:03:22.288>
    labels = ['extension-modules', 'type-bug']
    title = "Parser module doesn't understand function annotations."
    updated_at = <Date 2012-04-29.18:11:32.753>
    user = 'https://github.com/mdickinson'

    bugs.python.org fields:

    activity = <Date 2012-04-29.18:11:32.753>
    actor = 'mark.dickinson'
    assignee = 'mark.dickinson'
    closed = True
    closed_date = <Date 2012-04-29.18:11:32.753>
    closer = 'mark.dickinson'
    components = ['Extension Modules']
    creation = <Date 2010-07-04.19:03:22.288>
    creator = 'mark.dickinson'
    dependencies = []
    files = ['17880']
    hgrepos = []
    issue_num = 9154
    keywords = ['patch']
    message_count = 4.0
    messages = ['109256', '109373', '111164', '159632']
    nosy_count = 3.0
    nosy_names = ['amaury.forgeotdarc', 'mark.dickinson', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'patch review'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue9154'
    versions = ['Python 3.2', 'Python 3.3']

    Activity

    1. mdickinson commented on Jul 4, 2010

      @mdickinson
      MemberAuthor
      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 "<stdin>", line 1, in <module>
      parser.ParserError: VALIDATION FAILURE: report this to the maintainer!
      [38264 refs]
    2. self-assigned this
      on Jul 4, 2010
    3. added
      extension-modules
      type-bug
      on Jul 4, 2010
    4. mdickinson commented on Jul 6, 2010

      @mdickinson
      MemberAuthor

      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.

    5. amauryfa commented on Jul 22, 2010

      @amauryfa
      Contributor

      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.

    6. python-dev commented on Apr 29, 2012

      python-devmannequin
      Mannequin
    7. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    extension-modulestype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions