Skip to content

[3.6] bpo-25532: Protect against infinite loops in inspect.unwrap() (GH-1717)#3778

Merged
serhiy-storchaka merged 1 commit intopython:3.6from
serhiy-storchaka:backport-f9169ce-3.6
Sep 27, 2017
Merged

[3.6] bpo-25532: Protect against infinite loops in inspect.unwrap() (GH-1717)#3778
serhiy-storchaka merged 1 commit intopython:3.6from
serhiy-storchaka:backport-f9169ce-3.6

Conversation

@serhiy-storchaka
Copy link
Copy Markdown
Member

@serhiy-storchaka serhiy-storchaka commented Sep 27, 2017

Some objects (like test mocks) auto-generate new objects on
attribute access, which can lead to an infinite loop in
inspect.unwrap().

Ensuring references are retained to otherwise temporary objects
and capping the size of the memo dict turns this case into a
conventional exception instead..
(cherry picked from commit f9169ce)

https://bugs.python.org/issue25532

…ythonGH-1717)

Some objects (like test mocks) auto-generate new objects on
attribute access, which can lead to an infinite loop in
inspect.unwrap().

Ensuring references are retained to otherwise temporary objects
and capping the size of the memo dict turns this case into a
conventional exception instead..
(cherry picked from commit f9169ce)
@serhiy-storchaka serhiy-storchaka merged commit 02c3cdc into python:3.6 Sep 27, 2017
@serhiy-storchaka serhiy-storchaka deleted the backport-f9169ce-3.6 branch September 27, 2017 06:34
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