Conflict when pycryptodome is installed (a requirement of poljar/weechat-matrix))
Hi,
I've noticed a conflict that seems to occur. When I install the requirements.txt for poljar/weechat-matrix I get this error when trying to run mmb/weechat-otr
python: stdout/stderr (otr): Versions: weechat-otr 1.9.2, potr 1.0.0-final, Python 3.7.4, WeeChat 2.6
python: stdout/stderr (otr): Traceback (most recent call last):
python: stdout/stderr (otr): File "/home/dngray/.weechat/python/autoload/otr.py", line 1202, in message_in_cb
python: stdout/stderr (otr): to_bytes(context.in_assembler.get()))
python: stdout/stderr (otr): File "/usr/lib/python3.7/site-packages/potr/context.py", line 210, in receiveMessage
python: stdout/stderr (otr): self.crypto.handleAKE(message, appdata=appdata)
python: stdout/stderr (otr): File "/usr/lib/python3.7/site-packages/potr/crypt.py", line 288, in handleAKE
python: stdout/stderr (otr): outMsg = self.ake.handleRevealSig(inMsg)
python: stdout/stderr (otr): File "/usr/lib/python3.7/site-packages/potr/crypt.py", line 405, in handleRevealSig
python: stdout/stderr (otr): gxmpi = AESCTR(self.r).decrypt(self.encgx)
python: stdout/stderr (otr): File "/usr/lib/python3.7/site-packages/potr/compatcrypto/pycrypto.py", line 51, in AESCTR
python: stdout/stderr (otr): return Cipher.AES.new(key, Cipher.AES.MODE_CTR, counter=counter)
python: stdout/stderr (otr): File "/home/dngray/.local/lib/python3.7/site-packages/Crypto/Cipher/AES.py", line 232, in new
python: stdout/stderr (otr): return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs)
python: stdout/stderr (otr): File "/home/dngray/.local/lib/python3.7/site-packages/Crypto/Cipher/__init__.py", line 79, in _create_cipher
python: stdout/stderr (otr): return modes[mode](factory, **kwargs)
python: stdout/stderr (otr): File "/home/dngray/.local/lib/python3.7/site-packages/Crypto/Cipher/_mode_ctr.py", line 366, in _create_ctr_cipher
python: stdout/stderr (otr): _counter = dict(counter)
python: stdout/stderr (otr): TypeError: 'Counter' object is not iterable
python: error in function "message_in_cb"
When removing the offending library, weechat-otr works again. I am using python-potr from AUR. I do also have python-pycrypto installed.
I should also note it's more specifically poljar/matrix-nio matrix-nio (pip) that depends on Legrandin/pycryptodome, pycryptodome (pip).
Ugh. seems related https://github.com/python-otr/pure-python-otr/issues/68
So the issue is poljar/weechat-matrix uses Legrandin/pycryptodome, and weechat-otr uses python-otr/pure-python-otr which depends on unmaintained dlitz/pycrypto (last commit in June 2014) and they are in conflict. Ie aur/python-pycrypto cannot be installed at the same time as community/python-pycryptodome.
Further dlitz/pycrypto was not written for python3.
Any updates on this? Currently, pycrypto doesn't work with Python 3.8: module 'time' has no attribute 'clock'. Can we haz update?
Work still being done albeit very slowly in issue python-otr/pure-python-otr#68 which is currently stuck on https://github.com/Legrandin/pycryptodome/issues/414#issuecomment-643824612 which is not getting attention because I failed at communication.
It's not dead but I need help, I am really not efficient working on this alone and gathering the courage to spend an evening on it every 4 months :(