-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
gh-139289: Lazy import rlcompleter to fix the refleak #139305
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
gh-139289: Lazy import rlcompleter to fix the refleak #139305
Conversation
|
Hey @encukou , as this fixes the broken buildbot, should we try to expedite it? |
|
Maybe @iritkatriel can help with the review as you are familiar with the background? The original code has no problem with its own but the existing issue of |
|
Thanks @gaogaotiantian for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
|
Sorry, @gaogaotiantian, I could not cleanly backport this to |
|
GH-139357 is a backport of this pull request to the 3.13 branch. |
… subprocess (GH-139185) (GH-139305) (GH-139280) * gh-138860: Lazy import rlcompleter in pdb to avoid deadlock in subprocess (GH-139185) (cherry picked from commit c8624cd) * gh-139289: Lazy import rlcompleter to fix the refleak (GH-139305) (cherry picked from commit 8288f36) Co-authored-by: Tian Gao <[email protected]>
We made the
rlcompleterimport even lazier. It will now only be imported when being used. We also need to customize the import procedure to avoid having side effects of changing the completer. However, theatexitcallback will still be added.This is not the final solution, but it can fix the refleak while not exposing the original problem again. We should polish it after we fix the
import rlcompleterside effect for good.atexitmodule breaks refleak check #139289