Skip to content

[3.6] bpo-31588: Validate return value of __prepare__() methods (GH-3764)#3790

Merged
ncoghlan merged 1 commit into
python:3.6from
miss-islington:backport-5837d04-3.6
Sep 27, 2017
Merged

[3.6] bpo-31588: Validate return value of __prepare__() methods (GH-3764)#3790
ncoghlan merged 1 commit into
python:3.6from
miss-islington:backport-5837d04-3.6

Conversation

@miss-islington

@miss-islington miss-islington commented Sep 27, 2017

Copy link
Copy Markdown
Contributor

Class execution requires that prepare() methods return
a proper execution namespace. Check for that immediately
after calling prepare(), rather than passing it through
to the code execution machinery and potentially triggering
SystemError (in debug builds) or a cryptic TypeError
(in release builds).

Patch by Oren Milman.
(cherry picked from commit 5837d04)

https://bugs.python.org/issue31588

…onGH-3764)

Class execution requires that __prepare__() methods return
a proper execution namespace. Check for that immediately
after calling __prepare__(), rather than passing it through
to the code execution machinery and potentially triggering
SystemError (in debug builds) or a cryptic TypeError
(in release builds).

Patch by Oren Milman.
(cherry picked from commit 5837d04)
@the-knights-who-say-ni

Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

Thanks again to your contribution and we look forward to looking at it!

@miss-islington

Copy link
Copy Markdown
Contributor Author

@orenmn and @ncoghlan: Backport status check is done, and it's a success ✅ .

@ncoghlan ncoghlan merged commit 084f80b into python:3.6 Sep 27, 2017
@miss-islington

Copy link
Copy Markdown
Contributor Author

Thanks, @ncoghlan!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants