Skip to content

bpo-34854: Fix a crash in string annotations containing specific lambda.#9645

Merged
serhiy-storchaka merged 1 commit into
python:masterfrom
serhiy-storchaka:ast-unparse-lambda-keywordonly
Sep 30, 2018
Merged

bpo-34854: Fix a crash in string annotations containing specific lambda.#9645
serhiy-storchaka merged 1 commit into
python:masterfrom
serhiy-storchaka:ast-unparse-lambda-keywordonly

Conversation

@serhiy-storchaka
Copy link
Copy Markdown
Member

@serhiy-storchaka serhiy-storchaka commented Sep 30, 2018

Compiling a string annotation containing a lambda with keyword-only
argument without default value caused a crash.

https://bugs.python.org/issue34854

Compiling a string annotation containing a lambda with keyword-only
argument without default value caused a crash.
@ambv
Copy link
Copy Markdown
Contributor

ambv commented Sep 30, 2018

Good catch. Thanks! ✨ 🍰 ✨

@serhiy-storchaka serhiy-storchaka merged commit 2a2940e into python:master Sep 30, 2018
@miss-islington
Copy link
Copy Markdown
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@serhiy-storchaka serhiy-storchaka deleted the ast-unparse-lambda-keywordonly branch September 30, 2018 18:07
@bedevere-bot
Copy link
Copy Markdown

GH-9646 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 30, 2018
…onGH-9645)

* Compiling a string annotation containing a lambda with keyword-only
argument without default value caused a crash.

* Remove the final "*" (it is incorrect syntax) in the representation of
lambda without *args and keyword-only arguments when compile from AST.

* Improve the representation of lambda without arguments.
(cherry picked from commit 2a2940e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
miss-islington added a commit that referenced this pull request Sep 30, 2018
)

* Compiling a string annotation containing a lambda with keyword-only
argument without default value caused a crash.

* Remove the final "*" (it is incorrect syntax) in the representation of
lambda without *args and keyword-only arguments when compile from AST.

* Improve the representation of lambda without arguments.
(cherry picked from commit 2a2940e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@serhiy-storchaka
Copy link
Copy Markdown
Member Author

Thank you for your review @ambv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants