Skip to content

Remove binding of captured exceptions when not used to reduce the chances of creating cycles #17246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 19, 2019

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Nov 19, 2019

Capturing exceptions into names can lead to reference cycles though the __traceback__ attribute of the exceptions in some obscure cases that have been reported previously and fixed individually. As these variables are not used anyway, we can remove the binding to reduce the chances of creating reference cycles.

See for example: #13135

@pablogsal
Copy link
Member Author

Apologies for the noise regarding the review list, I don't know why GitHub reacted like that :(

@pablogsal pablogsal merged commit 293dd23 into python:master Nov 19, 2019
@pablogsal pablogsal deleted the no_cycles branch November 19, 2019 21:34
@pablogsal
Copy link
Member Author

Thanks for the review!

jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request Dec 5, 2019
…nces of creating cycles (pythonGH-17246)

Capturing exceptions into names can lead to reference cycles though the __traceback__ attribute of the exceptions in some obscure cases that have been reported previously and fixed individually. As these variables are not used anyway, we can remove the binding to reduce the chances of creating reference cycles.

See for example pythonGH-13135
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
…nces of creating cycles (pythonGH-17246)

Capturing exceptions into names can lead to reference cycles though the __traceback__ attribute of the exceptions in some obscure cases that have been reported previously and fixed individually. As these variables are not used anyway, we can remove the binding to reduce the chances of creating reference cycles.

See for example pythonGH-13135
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants