[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-28 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset ecc80b3f1b56f1e4df9e592f8527e622a6b45e01 by Terry Jan Reedy in branch '3.6': [3.6] bpo-30853: IDLE - touch-up configdialog.VarTrace and tests. (GH-2936) (#2937) https://github.com/python/cpython/commit/ecc80b3f1b56f1e4df9e592f8527e622a6b45e01

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-28 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +2989 ___ Python tracker ___ ___

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 5d0f30aae5fccc99690923fc5c7cb58de8ad7eec by Terry Jan Reedy in branch 'master': bpo-30853: IDLE - touch-up configdialog.VarTrace and tests. (#2936) https://github.com/python/cpython/commit/5d0f30aae5fccc99690923fc5c7cb58de8ad7eec --

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: IDLE *will* fail if idleConf.SetOption is called with a wrong config-type (KeyError) or the wrong number of other arguments (TypeError). I did not add the check because it does not cover the non-default callbacks (the majority), let alone all the other

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 02f88d2a411a6a789b33be281adfc3570c49efd5 by Terry Jan Reedy in branch '3.6': [3.6] bpo-30853: IDLE: Convert font and general vars to use VarTrace (GH-2914) (#2935) https://github.com/python/cpython/commit/02f88d2a411a6a789b33be281adfc3570c49efd5

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-28 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +2988 ___ Python tracker ___ ___

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-28 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +2987 ___ Python tracker ___ ___

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 5b59154c0d3d91c0766b9177f6b737b1abcbf3f6 by Terry Jan Reedy (csabella) in branch 'master': bpo-30853: IDLE: Convert font and general vars to use VarTrace (#2914) https://github.com/python/cpython/commit/5b59154c0d3d91c0766b9177f6b737b1abcbf3f6

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-28 Thread Cheryl Sabella
Cheryl Sabella added the comment: "Either *add* or *make_callback* could check len = 3 and callback[0] in idleConf.config_types, with a test added." I didn't add this because I wasn't sure what you wanted to happen if it wasn't right. I suspect it should fail gracefully (not break IDLE), but

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-28 Thread Cheryl Sabella
Cheryl Sabella added the comment: Instead 'hackish', maybe I should have used 'magic'. The overloading just wasn't obvious to me, meaning I have: self.font_bold = tracers.add(BooleanVar(parent), self.var_changed_font) self.space_num = tracers.add(IntVar(parent), ('main', 'Indent',

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: A minor change. Complete the path by adding the other var-trace pairs and after checking carefully, I will be ready to push. I prefer one easy to remember short-name function to two longer-named functions. However, the docstring should specify the tuple as

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-27 Thread Cheryl Sabella
Cheryl Sabella added the comment: Just as an FYI with blurb, I installed it in the same venv as coverage, so I was able to run it with 3.7. It's really cool. -- ___ Python tracker

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-27 Thread Cheryl Sabella
Cheryl Sabella added the comment: The font vars went well, so I also added general vars. I created the blurb. I didn't know if it would work with no body, so I just put a placeholder. I did have another question. Instead of just one tracers.add() method, I was wondering if there's an

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-27 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: +2966 ___ Python tracker ___ ___

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: See in you can install blurb into 3.6 or even 3.5, (pip should work) and run it to add the blurb file. I will fill in the body. -- ___ Python tracker

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Go ahead. If it works with font, add general tab. CD.remove_var_callbacks is currently only called in test_configdialog.tearDownModule. I added the call to prevent getting a TclError for each callback after the test finished. .destroy does not destroy

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 0243bea55dc340067247e635442f2a227705315a by Terry Jan Reedy in branch '3.6': [3.6] bpo-30853: IDLE: Factor a VarTrace class from configdialog.ConfigDialog. (GH-2872) (#2903)

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-26 Thread Cheryl Sabella
Cheryl Sabella added the comment: Thanks! I can try the font vars if you like. One question I keep forgetting to ask -- I can't figure out how remove_var_callbacks gets called. I've grepped for the name and didn't find it anywhere. I don't know what I'm missing. --

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I will include new blurb with PR that uses this with font vars. I might do this tonight. Test coverage of class is 100%. -- stage: test needed -> needs patch versions: +Python 3.6, Python 3.7 ___ Python tracker

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-26 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +2954 ___ Python tracker ___ ___

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 45bf723c6c591ec56a18dad8150ae89797450d8b by Terry Jan Reedy (csabella) in branch 'master': bpo-30853: IDLE: Factor a VarTrace class from configdialog.ConfigDialog. (#2872)

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-25 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: +2923 ___ Python tracker ___ ___

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am going to continue with the tests. -- ___ Python tracker ___ ___

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-24 Thread Cheryl Sabella
Cheryl Sabella added the comment: I would like to work on this, but I don't think I'd be able to have something ready for a few days, so I don't want to hold you up if you would like it sooner. -- ___ Python tracker

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Step 1 is to add the class and then add tests. The tests can use artificial examples. Say 3 vars, 2 callbacks, with the 3rd done as default. I want to start this now -- see below. Let me know if you start working on this so we don't duplicate work. I

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-23 Thread Cheryl Sabella
Cheryl Sabella added the comment: Would you like this change for fonts and indent before the tests for the other tabs are ready or would you like to have tests for all the tabs first? -- ___ Python tracker

[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: This issue is really about managing the set of var,callback pairs. The idea of wrapping vars just clouded the issue. class VarTrace: def __init__(self): self.tracers = [] # or set if need to delete def add(self, var, callback): if