Page MenuHomePhabricator

pywikibot.userinterfaces.gui is broken in Python 3.6
Closed, ResolvedPublic

Description

pywikibot.userinterfaces.gui is broken in python 3.6 because it relies on idlelib which has had a major rewrite in this version.

None of the idlelib imports work in python 3.6:

from idlelib import SearchDialog, ReplaceDialog, configDialog
from idlelib.configHandler import idleConf
from idlelib.MultiCall import MultiCallCreator

Event Timeline

Framawiki subscribed.

The following imports work in 3.6, but I have not tested them to see if their signatures and methods are the same.

from idlelib.configdialog import ConfigDialog
from idlelib.replace import ReplaceDialog
from idlelib.search import SearchDialog
from idlelib.config import IdleConf
from idlelib.multicall import MultiCallCreator

@Dalba If the methods or signatures have changed I'd say it's another issue. With the imports you have said, the editor works (haven't tested it extensively but I was able to edit and search). This is what the new imports should look like, with the conditional:

if sys.version_info > (3, 5):
	from idlelib import search as SearchDialog, replace as ReplaceDialog, configdialog as configDialog
	from idlelib.config import idleConf
	from idlelib.multicall import MultiCallCreator
else:
	from idlelib import SearchDialog, ReplaceDialog, configDialog
	from idlelib.configHandler import idleConf
	from idlelib.MultiCall import MultiCallCreator

I'd like to push this change but I don't know where (Gerrit?, Github?) and I don't know what steps you follow (testing, branches, pull requests, etc).

@Ssola. Thanks. If you would like to submit your patch you might want to take a look at Manual:Pywikibot/Gerrit and Gerrit/Getting started.

Change 398669 had a related patch set uploaded (by Eflyjason; owner: Eflyjason):
[pywikibot/core@master] pywikibot.userinterfaces.gui is broken in Python 3.6

https://gerrit.wikimedia.org/r/398669

Change 398669 merged by jenkins-bot:
[pywikibot/core@master] Fix pywikibot.userinterfaces.gui (idlelib) in Python 3.6

https://gerrit.wikimedia.org/r/398669

eflyjason claimed this task.