honssh
honssh copied to clipboard
Python 3 compatibility / porting.
Does Twisted Conch support Py3 now?
Last upstream commit seems to be from 14th September 2016, is Twisted dead?
Seems Twisted Conch is not yet Py3 capable...
2018-03-16 10:25:52+0000 [twisted.conch.ssh.factory.SSHFactory] Unhandled Error
Traceback (most recent call last):
File "/Users/robe8437/Documents/Python/envs/general_dev/lib/python3.6/site-packages/twisted/python/log.py", line 86, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/Users/robe8437/Documents/Python/envs/general_dev/lib/python3.6/site-packages/twisted/python/context.py", line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/Users/robe8437/Documents/Python/envs/general_dev/lib/python3.6/site-packages/twisted/python/context.py", line 85, in callWithContext
return func(*args,**kw)
File "/Users/robe8437/Documents/Python/envs/general_dev/lib/python3.6/site-packages/twisted/internet/selectreactor.py", line 149, in _doReadOrWrite
why = getattr(selectable, method)()
---
Maybe we can subclass it and override methods that require updating? < @tnich @Bifrozt @bang-uin thoughts?
Any news on this, I get this with Twisted 18.7.0 and Python3.
Ok I stand corrected it does work! But now you have to prefix a lot of the strings with b for a byte array. E.g. the key looks now like this:
publicKeys = {
b'ssh-rsa': keys.Key.fromString(data=sshkeys.SERVER_PUBLIC_KEY)
}