jenkins-bot has submitted this change and it was merged.
Change subject: Let pydot encode labels for Python 3 support ......................................................................
Let pydot encode labels for Python 3 support
Since compat 2c0db026, interwiki graph has encoded the labels as utf8. pydot 1.0.28 adds the ability for this encoding to be done by the library while writing.
Forks after pydot 1.0.28 add Python 3 support, and they fail when the label is utf8.
Bug: T75704 Change-Id: Ie8a67e060db702cdc81112d9604d8857e9759d6f --- M pywikibot/interwiki_graph.py M setup.py 2 files changed, 3 insertions(+), 3 deletions(-)
Approvals: XZise: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/interwiki_graph.py b/pywikibot/interwiki_graph.py index bbb5896..6f2c49a 100644 --- a/pywikibot/interwiki_graph.py +++ b/pywikibot/interwiki_graph.py @@ -134,8 +134,7 @@
def getLabel(self, page): """Get label for page.""" - return (u'"%s:%s"' % (page.site.language(), - page.title())).encode('utf-8') + return '"%s:%s"' % (page.site.language(), page.title())
def addNode(self, page): """Add a node for page.""" diff --git a/setup.py b/setup.py index fb92b4c..df6f08a 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ extra_deps = { # Core library dependencies 'isbn': ['python-stdnum'], - 'Graphviz': ['pydot'], + 'Graphviz': ['pydot>=1.0.28'], 'MySQL': ['oursql'], 'Yahoo': ['pYsearch'], 'Google': ['google'], @@ -63,6 +63,7 @@ 'git+https://github.com/AlereDevices/lunatic-python.git#egg=lunatic-python', 'hg+https://bitbucket.org/TJG/pywin32#egg=pywin32', 'git+https://github.com/vasily-v-ryabov/pywinauto-64#egg=pywinauto', + 'git+https://github.com/nlhepler/pydot#egg=pydot-1.0.29', ]
if sys.version_info[0] == 2:
pywikibot-commits@lists.wikimedia.org