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
IDLE: Update feature classes when options are changed. #75669
Comments
For this issue, a 'feature class' is a non-extension class with options configured on the config dialog. Currently there are 4 such classes, which were extension classes before conversion by bpo-27099. Currently, an extension class option takes effect either when IDLE is restarted and the module reads the value, or when a new instance is created and the instance reads the value. There is currently no mechanism to update existing instances. As part of the conversion, I gave each feature class a reload classmethod. The method is called at module level after the class is created. The idea was that these methods could also be called from ConfigDialog.activate_config_changes. This issue implements this idea. (Cheryl: testing the new code should be ideally be part of this patch and should be part of new tests for activate_config_changes you have worked on. I am going with manual tests for the moment because the cutoff for 3.6.3rc1 and 3.7.0a1 is next Monday, 12 UTC, about 55 hours from now.) If instances reread the class attribute each time they need it, then updating the class attribute updates all existing instances. An example is the autocomplete popup delay time. If instances only read the class attribute in __init__ and somehow freeze the value, then the class needs to keep track of instances so reload can refresh each. A current example of freezing is the parenmatch type. I will have to either unfreeze the attribute or add a registry set. Fixing up CodeContext will be a separate patch I am already working on. Applying the reload idea to extensions, in particular the example extension, is a much lower priority, and can wait until after the pending releases. |
Are there more work to be done here, or can we close this issue? |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: