SMTP support needs to be updated for py3
I got this when sending an email:
** Unknown exception encountered with possibly-broken third-party extension mercurial_keyring
** which supports versions unknown of Mercurial.
** Please disable mercurial_keyring and try your action again.
** If that fixes the bug please report it to https://foss.heptapod.net/mercurial/mercurial_keyring/issues
** Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)]
** Mercurial Distributed SCM (version 5.5.1)
** Extensions loaded: extdiff, evolve, topic, phabricator, phabblocker, mercurial_keyring, rebase, absorb, blackbox, strip, show, fix, mq, tortoisehg.util.hgcommands, tortoisehg.util.partialcommit, tortoisehg.util.pipeui, tortoisehg.util.win32ill, tortoisehg.util.hgdispatch, patchbomb
** Unknown exception encountered with possibly-broken third-party extension mercurial_keyring
** which supports versions unknown of Mercurial.
** Please disable mercurial_keyring and try your action again.
** If that fixes the bug please report it to https://foss.heptapod.net/mercurial/mercurial_keyring/issues
** Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)]
** Mercurial Distributed SCM (version 5.5.1)
** Extensions loaded: extdiff, evolve, topic, phabricator, phabblocker, mercurial_keyring, rebase, absorb, blackbox, strip, show, fix, mq, tortoisehg.util.hgcommands, tortoisehg.util.partialcommit, tortoisehg.util.pipeui, tortoisehg.util.win32ill, tortoisehg.util.hgdispatch, patchbomb
Traceback (most recent call last):
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\Scripts\hg", line 43, in <module>
dispatch.run()
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 113, in run
status = dispatch(req)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 303, in dispatch
ret = _runcatch(req) or 0
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 479, in _runcatch
return _callcatch(ui, _runcatchfunc)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 488, in _callcatch
return scmutil.callcatch(ui, func)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\scmutil.py", line 152, in callcatch
return func()
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 469, in _runcatchfunc
return _dispatch(req)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 1233, in _dispatch
lui, repo, cmd, fullargs, ui, options, d, cmdpats, cmdoptions
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 917, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 1244, in _runcommand
return cmdfunc()
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 1230, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\util.py", line 1867, in check
return func(*args, **kwargs)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\util.py", line 1867, in check
return func(*args, **kwargs)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\hgext\mq.py", line 4226, in mqcommand
return orig(ui, repo, *args, **kwargs)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\util.py", line 1867, in check
return func(*args, **kwargs)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\commands.py", line 6519, in serve
return server.runservice(opts, initfn=service.init, runfn=service.run)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\server.py", line 164, in runservice
return runfn()
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\commandserver.py", line 469, in run
return sv.serve()
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\commandserver.py", line 403, in serve
while self.serveone():
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\commandserver.py", line 377, in serveone
handler(self)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\commandserver.py", line 358, in runcommand
ret = self._dispatchcommand(req) & 255
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\commandserver.py", line 297, in _dispatchcommand
return dispatch.dispatch(req)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 303, in dispatch
ret = _runcatch(req) or 0
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 479, in _runcatch
return _callcatch(ui, _runcatchfunc)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 488, in _callcatch
return scmutil.callcatch(ui, func)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\scmutil.py", line 152, in callcatch
return func()
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 469, in _runcatchfunc
return _dispatch(req)
File "c:\Users\Matt\projects\thg_py3\tortoisehg\util\hgdispatch.py", line 23, in _dispatch
return orig(req)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 1233, in _dispatch
lui, repo, cmd, fullargs, ui, options, d, cmdpats, cmdoptions
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 917, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 1244, in _runcommand
return cmdfunc()
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 1230, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\util.py", line 1867, in check
return func(*args, **kwargs)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\hgext\patchbomb.py", line 967, in email
sendmail = mail.connect(ui, mbox=mbox)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\mail.py", line 228, in connect
return _smtp(ui)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial_keyring.py", line 772, in _smtp
username = ui.config('smtp', 'username')
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\ui.py", line 610, in config
section, name, default=default, untrusted=untrusted
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\ui.py", line 629, in _config
msg %= (section, name)
TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'str'
cmdserver: process exited unexpectedly with code 1
There are a bunch of ui
, config
, and raise error
cases that aren't prefixed with b''
(or otherwise converted to bytes). I started changing them, but realizes that some of the variables being formatted in with %s
may be str that need to be converted to bytes, so I stopped since I didn't see any tests that I could run, and didn't want to make things worse.
The buglink
attribute at the button also needs a b''
prefix.