-
Notifications
You must be signed in to change notification settings - Fork 930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swap pycryptodome to the faster, smaller, and industry standard cryto… #456
swap pycryptodome to the faster, smaller, and industry standard cryto… #456
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good to me. Some small requests.
I tested with all the pdf's in samples/encryption/
and they work :) I believe that those pdf's are not part of our test suite. It would be great if you can add them. They are encrypted with the password "foo".
…ower/pdfminer.six into pycryptodome-to-cryptographyio
@pietermarsman When you say that the files in I can add/refactor to use any of these targets instead of the existing tox.ini logic if that's what you're suggesting. However, if travis doesn't have the required programs installed then I'm not interested in debugging that. The options would be: If that is what you were suggesting then please let me know which would be preferred. If not, then I didn't understand your comment. |
I'm the one who opened the issue. I think there's a slight misunderstanding as to the origin of the extra 260MB for pycryptodome. The fact is, that in order to install pdfminer on Alpine Linux, all the requirements can add to 260 MB. I needed to install the following, which all count towards the 260 MB: My personal request was to somehow change pdfminer so that it has less bloating (be it pdfminer module proper or requirements) when installing on Alpine Linux. Whether switching to a different crypto package helps, I don't know. It depends as much on its requirements as on the package itself. So I guess one would have to test that specifically. |
@corneliusroemer w.r.t to your comment #456 (comment)
Thanks for the heads up, though I am aware of those particulars (I commented on the issue itself). If there were a prebuilt wheel of pycryptodome for Alpine it would probably be of size similar or on the order of the windows size (~40 MB). |
@lithiumFlower Thanks! That makes sense. Ah right, it's called wheel if you don't need build tools! |
Yes, that's what I mean. My preferred solution is to add them to the nosetest test suite. In particular, |
@pietermarsman I've removed the samples Makefile and ported its functionality to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant adding it to test_tools_pdf2txt.py
. This only tests if the pdf can be processed without errors and that's also what we want to test with this PR.
I agree that comparing the text output for some pdf's might be a good idea. But I rather add those tests as part of a different PR where we choose the pdf's deliberately.
@pietermarsman Ok. In the interest of merging the specific improvement of pycryptodome -> cryptography I'm going to revert to before the Makefile port and make that a separate MR for the Makefile -> nosetests port that people can do with what they please. Then, making the swap is available and ready if a maintainer chooses to use it. How does that sound to you? |
Probably easier if I do it myself. Can you give my chances one more look before I merge it? |
LGTM |
Great! Thanks for all the work :D |
There is an outstanding issue #429
While the size of pycryptodome is not as much as titled, it is still quite large (~40 MB).
Cryptography and all of its dependencies is ~7 MB. The dependencies (cffi, six, pycparser) are well known and common in other packages.
Cryptography defaults to using its shipped openssl library and has become the industry standard for python.
Why is openssl advantageous compared to pycryptodome?
How Has This Been Tested?
I ran the shipped test suits including
make crypts
on the sample pdfs.Checklist
works (I have not added existing codepaths, the existing testcases test these)
version
is not necessary
verified that this is not necessary
CHANGELOG.md