WolfgangFahl / py-3rdparty-mediawiki

Wrapper for pywikibot and mwclient MediaWiki API librarties with improvements for 3rd party wikis
Apache License 2.0
4 stars 5 forks source link

Pycrypto is not actively maintained #43

Closed tholzheim closed 2 years ago

tholzheim commented 3 years ago

The library pycrypto is discontinued. The fork pycryptodome seems to be a good alternative which is actively maintained.

WolfgangFahl commented 3 years ago

@tholzheim thank you for the hint.

Does pycryptodome have compatible functionality? The reason to use pycrypto was that the encryption is compatible with the Java Encryption library used by https://github.com/WolfgangFahl/Mediawiki-Japi see https://github.com/WolfgangFahl/Mediawiki-Japi/blob/master/src/main/java/com/bitplan/mediawiki/japi/user/Crypt.java and the import references there.

Changing the algorithm would potentially mean to change all existing .ini files which are out there - so that at least a transition period using both libraries/algorithms might be needed. If the library has compatible encryption we are fine. I also saw that https://pypi.org/project/pycrypto-yb/ was started last year but seems to be undocumented and unfortunately in alpha state. Contacting Author: Dwayne C. Litzenberger in this matter directly might help to clarify the state of affairs.

https://pypi.org/user/dlitz/ and https://www.dlitz.net/software/pycrypto/ and https://www.linkedin.com/in/dlitz/?originalSubdomain=ca are direct pointers to him.

StroemPhi commented 3 years ago

I cannot reinstall the package using pip as the pycrypto dependency produces this error:

Error: warning: GMP or MPIR library not found; 
Not building Crypto.PublicKey._fastm ath. building 'Crypto.Random.OSRNG.winrandom' extension error: 
Microsoft Visual C++ 14.0 is required. 
Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

Even though I installed Microsoft Visual C++ 14.0, It is still failing.

Searching for the error message got me here: https://www.gitmemory.com/issue/dlitz/pycrypto/287/501514454.

WolfgangFahl commented 3 years ago

Did you try the Linux subsystem for Windows 10?

StroemPhi commented 3 years ago

@WolfgangFahl unfortunately I'm running on Windows 8.

WolfgangFahl commented 3 years ago

That is good to know since the minimum requirement is Python 3.5 + and a current OS anyway. Our CI doesn't check for anything other. See https://github.com/WolfgangFahl/py-3rdparty-mediawiki/actions/runs/572169123 for your choice of 12 supported combinations.

WolfgangFahl commented 2 years ago

testCrypt test fails with

TypeError: Object type <class 'str'> cannot be passed to C code

see: https://stackoverflow.com/a/50302966/1497139