Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ast_unparser.c doesn't handle PEP570 #81142

Closed
pablogsal opened this issue May 18, 2019 · 2 comments
Closed

ast_unparser.c doesn't handle PEP570 #81142

pablogsal opened this issue May 18, 2019 · 2 comments
Assignees
Labels
3.8 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@pablogsal
Copy link
Member

BPO 36961
Nosy @pablogsal
PRs
  • bpo-36961: Handle positional-only arguments in uparse.c #13412
  • 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/pablogsal'
    closed_at = <Date 2019-05-18.22:40:37.155>
    created_at = <Date 2019-05-18.22:06:09.837>
    labels = ['interpreter-core', '3.8']
    title = "ast_unparser.c doesn't handle PEP570"
    updated_at = <Date 2019-05-18.22:40:37.154>
    user = 'https://github.com/pablogsal'

    bugs.python.org fields:

    activity = <Date 2019-05-18.22:40:37.154>
    actor = 'pablogsal'
    assignee = 'pablogsal'
    closed = True
    closed_date = <Date 2019-05-18.22:40:37.155>
    closer = 'pablogsal'
    components = ['Interpreter Core']
    creation = <Date 2019-05-18.22:06:09.837>
    creator = 'pablogsal'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36961
    keywords = ['patch']
    message_count = 2.0
    messages = ['342819', '342822']
    nosy_count = 1.0
    nosy_names = ['pablogsal']
    pr_nums = ['13412']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue36961'
    versions = ['Python 3.8']

    @pablogsal
    Copy link
    Member Author

    Any line in test_annotations() containing positional-only markers
    in Lib/test/test_future.py will fail:

            eq('lambda x, /: x')
    Run tests sequentially
    0:00:00 load avg: 0.71 [1/1] test_future
    test test_future failed -- Traceback (most recent call last):
      File "/home/pablogsal/github/cpython/Lib/test/test_future.py", line 186, in test_annotations
        eq("lambda a, /, b, c=True, *vararg, d, e='str', **kwargs: a + b")
      File "/home/pablogsal/github/cpython/Lib/test/test_future.py", line 141, in assertAnnotationEqual
        self.assertEqual(actual, expected)
    AssertionError: "lambda b, c=True, *vararg, d, e='str', **kwargs: a + b" != "lambda a, /, b, c=True, *vararg, d, e='str', **kwargs: a + b"
    - lambda b, c=True, *vararg, d, e='str', **kwargs: a + b
    + lambda a, /, b, c=True, *vararg, d, e='str', **kwargs: a + b
    ?        ++++++

    test_future failed

    == Tests result: FAILURE ==

    1 test failed:
    test_future

    Total duration: 46 ms
    Tests result: FAILURE

    @pablogsal pablogsal added the 3.8 only security fixes label May 18, 2019
    @pablogsal pablogsal self-assigned this May 18, 2019
    @pablogsal pablogsal added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label May 18, 2019
    @pablogsal
    Copy link
    Member Author

    New changeset da6129e by Pablo Galindo in branch 'master':
    bpo-36961: Handle positional-only arguments in uparse.c (GH-13412)
    da6129e

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant