Fix pywikibot.userinterfaces.gui (idlelib) in Python 3.6
Fix pywikibot.userinterfaces.gui (idlelib) in Python 3.6

Credit to T164164#3385548

Bug: T164164
Change-Id: Idc1a1d990e9646862dd831607bba88743f91f6d2

magul/pywikibot-core,wikimedia/pywikibot-core,PersianWikipedia/pywikibot-core,magul/pywikibot-core,wikimedia/pywikibot-core