Skip to content
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

[3.12] gh-78889: Stop IDLE Shell freezes from sys.stdout.shell.xyz (GH-121876) #121912

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Lib/idlelib/News3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Released after 2023-10-02
=========================


gh-78889: Stop Shell freezes by blocking user access to non-method
sys.stdout.shell attributes, which are all private.

gh-78955: Use user-selected color theme for Help => IDLE Doc.

gh-96905: In idlelib code, stop redefining built-ins 'dict' and 'object'.
Expand Down
3 changes: 3 additions & 0 deletions Lib/idlelib/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,9 @@ class StdioFile(io.TextIOBase):

def __init__(self, shell, tags, encoding='utf-8', errors='strict'):
self.shell = shell
# GH-78889: accessing unpickleable attributes freezes Shell.
# IDLE only needs methods; allow 'width' for possible use.
self.shell._RPCProxy__attributes = {'width': 1}
self.tags = tags
self._encoding = encoding
self._errors = errors
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Stop Shell freezes by blocking user access to non-method sys.stdout.shell attributes,
which are all private.
Loading