Skip to content

gh-136061: IDLE - update code in editor.Editor.load_extension #134874

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

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e5f4260
fix a dos
johnzhou721 May 29, 2025
aa5b5a8
📜🤖 Added by blurb_it.
blurb-it[bot] May 29, 2025
edfa904
Update Misc/NEWS.d/next/Security/2025-05-29-03-24-18.gh-issue-134873.…
johnzhou721 May 30, 2025
2090baf
another dos and also simplify
johnzhou721 May 30, 2025
d2838a5
grumble
johnzhou721 May 30, 2025
83bafff
have condition
johnzhou721 May 30, 2025
660fbd3
significant refactor
johnzhou721 May 30, 2025
15f821a
Update Lib/idlelib/editor.py
johnzhou721 Jun 1, 2025
6a59e50
rem blank line
johnzhou721 Jun 1, 2025
546f19b
write some tests
johnzhou721 Jun 1, 2025
605373b
static
johnzhou721 Jun 1, 2025
9625fcc
linter
johnzhou721 Jun 1, 2025
d0017b6
get this right
johnzhou721 Jun 1, 2025
88c318c
write more tests
johnzhou721 Jun 1, 2025
6323ab8
unconditionally remove last character, tests
johnzhou721 Jun 1, 2025
01921fc
more organized testing also speedup test
johnzhou721 Jun 1, 2025
5f9bb55
grumble
johnzhou721 Jun 1, 2025
a087395
fix some tests and add some new ones
johnzhou721 Jun 1, 2025
6604a73
fix everythign
johnzhou721 Jun 1, 2025
3f0abfb
precommit
johnzhou721 Jun 1, 2025
1e9bdfd
Merge branch 'main' into idledos
johnzhou721 Jun 12, 2025
0b3c5b6
Merge branch 'main' into idledos
johnzhou721 Jun 14, 2025
338e2fc
Merge branch 'main' into idledos
johnzhou721 Jun 15, 2025
7c92d9a
Apply suggestions from code review
terryjreedy Jun 28, 2025
e1fb6b9
Apply suggestions from code review
terryjreedy Jun 28, 2025
7b67419
Update Lib/idlelib/idle_test/test_editor.py
terryjreedy Jun 28, 2025
1037bea
Delete Misc/NEWS.d/next/Security/2025-05-29-03-24-18.gh-issue-134873.…
terryjreedy Jun 28, 2025
e505938
📜🤖 Added by blurb_it.
blurb-it[bot] Jun 28, 2025
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
5 changes: 1 addition & 4 deletions Lib/idlelib/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1203,10 +1203,7 @@ def load_extension(self, name):
self.apply_bindings(keydefs)
for vevent in keydefs:
methodname = vevent.replace("-", "_")
while methodname[:1] == '<':
methodname = methodname[1:]
while methodname[-1:] == '>':
methodname = methodname[:-1]
methodname = methodname.lstrip('<').rstrip('>')
methodname = methodname + "_event"
if hasattr(ins, methodname):
self.text.bind(vevent, getattr(ins, methodname))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Code for replacing left and right angled brackets in extension names when loading extensions in IDLE has been simplified.
Loading