Issue 34854: Crash in string annotations in lambda with keyword-only argument without default value (original) (raw)

Issue34854

Created on 2018-09-30 16:25 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 9645 merged serhiy.storchaka,2018-09-30 16:29
PR 9646 merged miss-islington,2018-09-30 18:07
Messages (5)
msg326730 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-09-30 16:25
Compiling a string annotation containing a lambda with keyword-only argument without default value causes a crash. from __future__ import annotations def f() -> (lambda *, x: x): pass The following PR fixes this crash. It also fixes other errors: * Removes a space between "lambda" and ":" in the representation of lambda without argument. * Removes the final "*" (it is incorrect syntax) in the representation of lambda without *args and keyword-only arguments when compile from AST.
msg326737 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-09-30 18:07
New changeset 2a2940e5c3e6d92f4fac5e9d361a1e224bb2f12e by Serhiy Storchaka in branch 'master': bpo-34854: Fix compiling string annotations containing lambdas. (GH-9645) https://github.com/python/cpython/commit/2a2940e5c3e6d92f4fac5e9d361a1e224bb2f12e
msg326739 - (view) Author: miss-islington (miss-islington) Date: 2018-09-30 18:19
New changeset 0f161b307969f86b4f8f31baf38f53f5462a9874 by Miss Islington (bot) in branch '3.7': bpo-34854: Fix compiling string annotations containing lambdas. (GH-9645) https://github.com/python/cpython/commit/0f161b307969f86b4f8f31baf38f53f5462a9874
msg326742 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-09-30 18:33
These bugs was found when working on .
msg326743 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2018-09-30 18:41
Should go to @ambv. On Sun, Sep 30, 2018 at 9:29 AM Serhiy Storchaka <report@bugs.python.org> wrote: > > Change by Serhiy Storchaka <storchaka+cpython@gmail.com>: > > > ---------- > keywords: +patch > pull_requests: +9037 > stage: -> patch review > > _______________________________________ > Python tracker <report@bugs.python.org> > <https://bugs.python.org/issue34854> > _______________________________________ > -- --Guido (mobile)
History
Date User Action Args
2022-04-11 14:59:06 admin set github: 79035
2018-09-30 18:41:05 gvanrossum set messages: +
2018-09-30 18:33:39 serhiy.storchaka set status: open -> closedresolution: fixedmessages: + stage: patch review -> resolved
2018-09-30 18:19:20 miss-islington set nosy: + miss-islingtonmessages: +
2018-09-30 18:07:22 miss-islington set pull_requests: + <pull%5Frequest9038>
2018-09-30 18:07:10 serhiy.storchaka set messages: +
2018-09-30 16:29:33 serhiy.storchaka set keywords: + patchstage: patch reviewpull_requests: + <pull%5Frequest9037>
2018-09-30 16:25:00 serhiy.storchaka create