-
Notifications
You must be signed in to change notification settings - Fork 45
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
SRP updates #18
Comments
The reason for the ctypes version was for use on systems where compiling Tom On Fri, Jun 10, 2016 at 7:58 AM, lsmag [email protected] wrote:
|
Mistune actually only uses Cython if it's available. The documentation recommends installing it before if performance is desired, like About pypy: you're right, I forgot about it. Maybe it's worth checking cffi out and see if it solves the problem? I'll add tox first and include pypy too, and then maybe I'll look into it. |
Just a quick update: cryptography.io supports PyPy and Py3 and has a handy OpenSSL cffi binding:
|
Thanks Ismag. After rerunning the performance tests, I'm starting to think you have the right idea. The C-implementation is not providing a significant performance benefit over the ctypes module so it's probably best to just remove it entirely. With respect to cryptography.io, thanks for pointing that out, I had no idea. The transparent Py3 support is awfully attractive and looks like it would dramatically simplify simultaneous Py2/Py3 support. If you get this working, please send me a pull request. I'll gladly accept it. If not, I'll put it on my queue for investigating when I can once again find time to work through the backlog. |
I'll send a PR with the first patches I mentioned in this thread, then I'll look into porting the ctypes code to cryptography.io. I'll let you know when I start working on it, as there will be some structural refactoring and the code isn't mine, of course :) |
So, a heads up of what I've done last night on this branch:
The test case right now is full of There's a single bug I didn't solve yet on Now, what I'm planning to do from now on:
Finally, about multiple versions: in my experience, installing So, in the end, what do you think? Should I proceed? |
Hi,
I'm working on some updates on your library. These are the things I'm working on right now:
Also, why is the ctypes code optional? It is available in both py2 and py3 (at least in my Arch linux), is there some version or platform which doesn't come with this module? If ctypes is in fact optional, there's another option: compile
_pysrp.py
with Cython, if available, like mistune does, for example.I'm yet to benchmark the Cython version against all others, but the advantage of Cython is that you can use just regular Python and still have a performance improvement, so maybe you can get rid of
_ctsrp.py
and maintain just_srp.c
and_pysrp.py
; less code duplication, less things to maintain. I'll update this thread later with the benchmarks.The text was updated successfully, but these errors were encountered: