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.

Author terry.reedy
Recipients BreamoreBoy, gpolo, martin.panter, serhiy.storchaka, terry.reedy
Date 2014-10-05.01:36:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412473009.26.0.557516854472.issue18131@psf.upfronthosting.co.za>
In-reply-to
Content
My first message discussed two different issues.  The first, generalized, is that unconditionally using tkinter._default_root, which can be either None or absent, as a backup for master=None in __init__ functions, seems a bit sloppy.  Image.__init__ does this check
        if not master:
            master = _default_root
            if not master:
                raise RuntimeError('Too early to create image')
but that will fail if _default_root has been deleted.  Also, the message is wrong in that it is not 'too early' if an explicit master is passed.  I am thinking that all uses of _default_root should raise something like WhateverError("An explicit master is required when _default_root is None or deleted.")  Serhiy, what do you think?

The second issue noted that while widgets often have a container widget as master, the non-graphics classes like Variable and Font should have a Tk and not a widget as master.  I have corrected idlelib.configHandler and there is a tkinter patch on another issue (applied yet?) to automatically replace master=widget by master-widget.tk.  So Variable calls are no longer part of this issue.
History
Date User Action Args
2014-10-05 01:36:49terry.reedysetrecipients: + terry.reedy, gpolo, BreamoreBoy, martin.panter, serhiy.storchaka
2014-10-05 01:36:49terry.reedysetmessageid: <1412473009.26.0.557516854472.issue18131@psf.upfronthosting.co.za>
2014-10-05 01:36:49terry.reedylinkissue18131 messages
2014-10-05 01:36:48terry.reedycreate