jenkins-bot merged this change.

View Change

Approvals: Zhuyifei1999: Looks good to me, approved jenkins-bot: Verified
[bugfix] fromlist identifiers must not be unicode in Python 2

detached from I1d12bfa2

Change-Id: I6186954414192cb51d1364eba780adbc14dc8d99
M pywikibot/
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/pywikibot/ b/pywikibot/
index f032eb1..f7504d3 100644
--- a/pywikibot/
+++ b/pywikibot/
@@ -1256,6 +1256,8 @@

if not isinstance(interface, type):
# If it isn't a class, assume it is a string
+ if PY2: # Must not be unicode in Python 2
+ interface = str(interface)
tmp = __import__('', fromlist=[interface])
except ImportError:

To view, visit change 510687. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6186954414192cb51d1364eba780adbc14dc8d99
Gerrit-Change-Number: 510687
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <>
Gerrit-Reviewer: John Vandenberg <>
Gerrit-Reviewer: Zhuyifei1999 <>
Gerrit-Reviewer: jenkins-bot (75)