Re: [Twisted-Python] Wanting to use Twisted, but a dependency uses asyncio

2017-08-27 Thread Hynek Schlawack
> What is your nefarious intention? http://twistedmatrix.com/trac/ticket/5000 duh ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-p

Re: [Twisted-Python] Wanting to use Twisted, but a dependency uses asyncio

2017-08-27 Thread Justin Myles Holmes
Why are you all so awesome? What is your nefarious intention? Are you trying to make other open source projects look bad or what? Thanks so much Craig. On Sun, Aug 27, 2017 at 12:35 PM, Craig Rodrigues wrote: > You can use this class to interoperate with the Python asyncio reactor and > Twist

Re: [Twisted-Python] Wanting to use Twisted, but a dependency uses asyncio

2017-08-27 Thread Craig Rodrigues
You can use this class to interoperate with the Python asyncio reactor and Twisted: https://twistedmatrix.com/documents/current/api/twisted.internet.asyncioreactor.html So you can do something like: import asyncio from twisted.internet import asyncioreactor, reactor loop = asyncio.get_event_loo

Re: [Twisted-Python] Wanting to use Twisted, but a dependency uses asyncio

2017-08-27 Thread Justin Myles Holmes
Sure, syntactically it seems pretty close to gravy. But I'm wondering about flow control: if a project like kademlia is using the ayncio event loop, is it still practical to use twisted? On Sun, Aug 27, 2017 at 11:35 AM, Craig Rodrigues wrote: > Twisted 17.5.0 has new code to interoperate betwe

Re: [Twisted-Python] Wanting to use Twisted, but a dependency uses asyncio

2017-08-27 Thread Craig Rodrigues
Twisted 17.5.0 has new code to interoperate between Python's asyncio and "async def": https://twistedmatrix.com/documents/current/core/howto/defer-intro.html#coroutines-with-async-await One example of where this is used is in Klein, a web microframework built on top of Twisted: https://klein.rea

[Twisted-Python] Wanting to use Twisted, but a dependency uses asyncio

2017-08-27 Thread Justin Myles Holmes
Hey friends. I'm in a position that is probably increasingly common. I'm working on a project that has a dependency that uses asyncio (kademlia). However, I much prefer to use Twisted. What's are some best practices for this at the moment? -- Justin Myles Holmes justinholmes.com thisisthebus.

Re: [Twisted-Python] SSLContext not valid for TLS Server

2017-08-27 Thread Thomas Hartwich
Thank you for your reply. > This is a somewhat-known issue that I’ve had bubbling on the backburner for > some time. For a long time PyOpenSSL didn’t automatically load all EC curves > and didn’t provide any API to do so, so Twisted told OpenSSL which curve to > use. Some time ago PyOpenSSL ch