Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-87820: IDLE: fix config disabling tab completion#26421

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
taleinat wants to merge1 commit intopython:main
base:main
Choose a base branch
Loading
fromtaleinat:bpo-43654/IDLE-fix-config-disabling-tab-completion-take2

Conversation

taleinat
Copy link
Contributor

@taleinattaleinat commentedMay 28, 2021
edited by terryjreedy
Loading

(Alternative PR toGH-26403.)

The underlying issue causing tab-completion to be broken after using the config dialog: Two events are bound to<Key-Tab>:<<smart-indent>> and<<autocomplete>>. The order these are bound is important: The binding to<<autocomplete>> must be done last so that it will be invoked first. The current bug is that<<smart-indent>> is unbound and then bound again by the config dialog, which changes the order and breaks tab-completion.

This PR removes three key bindings from the key configuration mechanism, which are required to always be bound to specific keys for IDLE to behave properly:

  • '<<smart-backspace>>': ['<Key-BackSpace>']
  • '<<newline-and-indent>>': ['<Key-Return>', '<Key-KP_Enter>']
  • '<<smart-indent>>': ['<Key-Tab>']

I manually verified that having aconfig-keys.cfg file in.idlerc with those keys defined in it doesn't cause any issues after this change is made. (IdleConf.GetCoreKeys() is written in a way that ensures this.)

This removes three key bindings from the keyconfiguration mechanism, which are required toalways be bound to specific keys for IDLE tobehave properly:* '<<smart-backspace>>': ['<Key-BackSpace>'],* '<<newline-and-indent>>': ['<Key-Return>', '<Key-KP_Enter>'],* '<<smart-indent>>': ['<Key-Tab>'],Signed-off-by: Tal Einat <532281+taleinat@users.noreply.github.com>
Copy link
Member

@terryjreedyterryjreedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I would like to merge the code and .def changes as are but am not quite sure that we should. See comment on the issue.

Comment on lines +302 to +303
# Bind keys to pseudoevents for non-configurable key-specific handlers.
text.event_add('<<smart-backspace>>', '<Key-BackSpace>')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The only function reason to keep these fixed keys separate from those that follow is that the pseudoevent -- handler bindings are done above for these and below for the existing fixed key keys. And this is related to where the handler are defined. So keep the separation for now.

taleinat reacted with thumbs up emoji
Comment on lines +3 to +5
``<<newline-and-indent>>`` (Return, Enter) and ``<<smart-backspace>>``
(Backspace) from the configuration mechanism, making them hard-coded
instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

These two are not relevant to tab completion. So it we do these together, I think we need to change the PR title (see my issue title revision) and reword this a bit.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I agree.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'm not sure the PR/commit title must describe all of the technical changes made. The additional change to the<<newline-and-indent>> and<<smart-backspace>> bindings has negligible significance to users, since even before this change, changing these bindings breaks IDLE rather badly.

Having this detail in the NEWS entry, and possibly in the body of the commit message, seems right to me.

Copy link
ContributorAuthor

@taleinattaleinatJul 5, 2021
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

To be clear, I now think that the existing PR title is good, since it describes the only significant bug being fixed.

Copy link
Member

@terryjreedyterryjreedyJul 5, 2021
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Today I think the title is fine as is. The message that follows can say more.

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsbot added the staleStale PR or inactive for long period of time. labelJul 3, 2021
@ambvambv removed the needs backport to 3.9only security fixes labelMay 17, 2022
@ambv
Copy link
Contributor

This missed the boat for inclusion in Python 3.9 which accepts security fixes only as of today.

@serhiy-storchakaserhiy-storchaka added the needs backport to 3.11only security fixes labelMay 20, 2022
@github-actionsgithub-actionsbot removed the staleStale PR or inactive for long period of time. labelAug 9, 2022
@terryjreedyterryjreedy self-assigned thisSep 18, 2022
@terryjreedyterryjreedy changed the titlebpo-43654: IDLE: fix config disabling tab completiongh-87820: IDLE: fix config disabling tab completionSep 18, 2022
@terryjreedyterryjreedy removed the type-bugAn unexpected behavior, bug, or error labelSep 18, 2022
@hugovkhugovk removed the needs backport to 3.10only security fixes labelApr 7, 2023
@serhiy-storchakaserhiy-storchaka added needs backport to 3.12only security fixes needs backport to 3.13bugs and security fixes and removed needs backport to 3.11only security fixes labelsMay 9, 2024
@tomasr8tomasr8 removed the needs backport to 3.12only security fixes labelApr 10, 2025
@python-cla-bot
Copy link

python-cla-botbot commentedApr 18, 2025
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed

@serhiy-storchakaserhiy-storchaka added the needs backport to 3.14bugs and security fixes labelMay 8, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@terryjreedyterryjreedyterryjreedy left review comments

Assignees

@terryjreedyterryjreedy

Labels
awaiting core reviewneeds backport to 3.13bugs and security fixesneeds backport to 3.14bugs and security fixes
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

9 participants
@taleinat@ambv@terryjreedy@hugovk@serhiy-storchaka@tomasr8@the-knights-who-say-ni@ezio-melotti@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp