Author terry.reedy
Recipients csabella, terry.reedy
Date 2017-09-16.04:16:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1505535381.81.0.462294249702.issue31488@psf.upfronthosting.co.za>
In-reply-to
Content
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 #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.
History
Date User Action Args
2017-09-16 04:16:21terry.reedysetrecipients: + terry.reedy, csabella
2017-09-16 04:16:21terry.reedysetmessageid: <1505535381.81.0.462294249702.issue31488@psf.upfronthosting.co.za>
2017-09-16 04:16:21terry.reedylinkissue31488 messages
2017-09-16 04:16:20terry.reedycreate