-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-37929: avoid Squeezer-related config dialog crashes #15452
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
bpo-37929: avoid Squeezer-related config dialog crashes #15452
Conversation
These were caused by keeping around a reference to the Squeezer instance and calling it's load_font() upon config changes, which sometimes happened even if the shell window no longer existed. This change completely removes that mechanism, instead having the editor window properly update its width attribute, which can then be used by Squeezer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I manually tested code-context and squeezer for some possible regressions.
Please merge Sunday if you think ready, so in b4.
Thanks @taleinat for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8. |
Sorry @taleinat, I had trouble checking out the |
GH-15484 is a backport of this pull request to the 3.7 branch. |
…GH-15452) These were caused by keeping around a reference to the Squeezer instance and calling it's load_font() upon config changes, which sometimes happened even if the shell window no longer existed. This change completely removes that mechanism, instead having the editor window properly update its width attribute, which can then be used by Squeezer. (cherry picked from commit d4b4c00) Co-authored-by: Tal Einat <[email protected]>
Thanks @taleinat for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
GH-15485 is a backport of this pull request to the 3.8 branch. |
…GH-15452) These were caused by keeping around a reference to the Squeezer instance and calling it's load_font() upon config changes, which sometimes happened even if the shell window no longer existed. This change completely removes that mechanism, instead having the editor window properly update its width attribute, which can then be used by Squeezer. (cherry picked from commit d4b4c00) Co-authored-by: Tal Einat <[email protected]>
Thanks for the quick review @terryjreedy! Merged. |
These were caused by keeping around a reference to the Squeezer instance and calling it's load_font() upon config changes, which sometimes happened even if the shell window no longer existed. This change completely removes that mechanism, instead having the editor window properly update its width attribute, which can then be used by Squeezer. (cherry picked from commit d4b4c00) Co-authored-by: Tal Einat <[email protected]>
These were caused by keeping around a reference to the Squeezer instance and calling it's load_font() upon config changes, which sometimes happened even if the shell window no longer existed. This change completely removes that mechanism, instead having the editor window properly update its width attribute, which can then be used by Squeezer. (cherry picked from commit d4b4c00) Co-authored-by: Tal Einat <[email protected]>
…GH-15452) These were caused by keeping around a reference to the Squeezer instance and calling it's load_font() upon config changes, which sometimes happened even if the shell window no longer existed. This change completely removes that mechanism, instead having the editor window properly update its width attribute, which can then be used by Squeezer.
…GH-15452) These were caused by keeping around a reference to the Squeezer instance and calling it's load_font() upon config changes, which sometimes happened even if the shell window no longer existed. This change completely removes that mechanism, instead having the editor window properly update its width attribute, which can then be used by Squeezer.
…GH-15452) These were caused by keeping around a reference to the Squeezer instance and calling it's load_font() upon config changes, which sometimes happened even if the shell window no longer existed. This change completely removes that mechanism, instead having the editor window properly update its width attribute, which can then be used by Squeezer.
These crashes were caused by keeping around a reference to the Squeezer instance and calling it's
load_font()
upon config changes, which sometimes happened even if the shell window no longer existed.This change completely removes that update mechanism, instead having the editor window properly update its width attribute, which can then be used by Squeezer.
Note that the editor window's width is already used in a couple of other places, where it can currently be the incorrect value if the font, font size and/or window width are changed. With this PR, the entire codebase can correctly assume that
EditorWindow.width
is the updated width of the text widget in characters.https://bugs.python.org/issue37929