[New-bugs-announce] [issue36961] ast_unparser.c doesn't handle PEP570

Pablo Galindo Salgado report at bugs.python.org
Sat May 18 18:06:09 EDT 2019


New submission from Pablo Galindo Salgado <pablogsal at gmail.com>:

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

----------
assignee: pablogsal
components: Interpreter Core
messages: 342819
nosy: pablogsal
priority: normal
severity: normal
status: open
title: ast_unparser.c doesn't handle PEP570
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36961>
_______________________________________


More information about the New-bugs-announce mailing list