This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IDLE: Remove close_when_done from colorizer close()
Type: enhancement Stage: resolved
Components: IDLE Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: cheryl.sabella, miss-islington, terry.reedy
Priority: normal Keywords: patch

Created on 2019-02-28 23:51 by cheryl.sabella, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 12109 merged cheryl.sabella, 2019-02-28 23:55
PR 12119 merged miss-islington, 2019-03-01 10:19
Messages (4)
msg336880 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2019-02-28 23:51
Remove the unused `close_when_done` parameter from `close()` in `colorizer.ColorDelegator()`.

* The second parameter to close() is called `close_when_done` and it is expected to contain a toplevel widget that has a destroy() method.

* Originally, the editor window had code that would send self.top (if colorizing was in process) as the value for this parameter:

            doh = colorizing and self.top
            self.color.close(doh) # Cancel colorization

* This was changed via this commit (https://github.com/python/cpython/commit/8ce8a784bd672ba42975dec752848392ff9a7797) in 2007 to instead be:
 
            self.color.close(False)
            self.color = None

The value of `False` made it so the destroy code in colorizer wouldn't be run even though `None` or leaving the parameter off would have been more clear.

In any case, this `close_when_done` hasn't been used since 2007.
msg336884 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-03-01 01:50
Thanks for digging up the history.  I would have approved without, but feel better with.  Using the colorizer close method to close a window seemed flakey to me, and it seems someone else thought the same long ago.  I suspect the machinery was left to avoid breaking external uses.  PEP 434 changed this avoidance being *necessary*.  (I am sure I have seen a SO answer with percolator + colorizer, as in turtledemo.)

IDLE has had a too many shutdown bugs and still has some.  Not adding one was my main concern when reviewing.
msg336913 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2019-03-01 10:19
New changeset b9f0354efce95b7557bc43ea193c4b652cd28392 by Cheryl Sabella in branch 'master':
bpo-36152: IDLE: Remove unused parameter from colorizer (GH-12109)
https://github.com/python/cpython/commit/b9f0354efce95b7557bc43ea193c4b652cd28392
msg336920 - (view) Author: miss-islington (miss-islington) Date: 2019-03-01 14:52
New changeset 70852b1eb6fbcc41fe9cad042e9ca61c5148fbda by Miss Islington (bot) in branch '3.7':
bpo-36152: IDLE: Remove unused parameter from colorizer (GH-12109)
https://github.com/python/cpython/commit/70852b1eb6fbcc41fe9cad042e9ca61c5148fbda
History
Date User Action Args
2022-04-11 14:59:11adminsetgithub: 80333
2019-03-01 14:52:47miss-islingtonsetnosy: + miss-islington
messages: + msg336920
2019-03-01 13:27:04cheryl.sabellasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-03-01 10:19:54miss-islingtonsetpull_requests: + pull_request12124
2019-03-01 10:19:44cheryl.sabellasetmessages: + msg336913
2019-03-01 01:50:51terry.reedysetmessages: + msg336884
2019-03-01 00:04:40cheryl.sabellasetassignee: cheryl.sabella -> terry.reedy
2019-02-28 23:55:43cheryl.sabellasetkeywords: + patch
stage: patch review
pull_requests: + pull_request12116
2019-02-28 23:51:49cheryl.sabellacreate