[Async-sig] async/sync library reusage

2017-06-08 Thread manuel miranda
Hello everyone, After using asyncio for a while, I'm struggling to find information about how to support both synchronous and asynchronous use cases for the same library. I.e. imagine you have a package for http requests and you want to give the user the choice to use a synchronous or an asynchro

Re: [Async-sig] async/sync library reusage

2017-06-08 Thread Luciano Ramalho
Hello, Manuel. The answer to your problem is to refactor the libraries in the "sans I/O" style. Take a look here: http://sans-io.readthedocs.io/ On Thu, 8 Jun 2017 at 19:32 manuel miranda wrote: > Hello everyone, > > After using asyncio for a while, I'm struggling to find information about >

Re: [Async-sig] async/sync library reusage

2017-06-08 Thread Nathaniel Smith
On Thu, Jun 8, 2017 at 3:32 PM, manuel miranda wrote: > Hello everyone, > > After using asyncio for a while, I'm struggling to find information about > how to support both synchronous and asynchronous use cases for the same > library. > > I.e. imagine you have a package for http requests and you w

Re: [Async-sig] async/sync library reusage

2017-06-08 Thread Yarko Tymciurak
On Fri, Jun 9, 2017 at 12:48 AM Nathaniel Smith wrote: > On Thu, Jun 8, 2017 at 3:32 PM, manuel miranda > wrote: > > Hello everyone, > > > > After using asyncio for a while, I'm struggling to find information about > > how to support both synchronous and asynchronous use cases for the same > > l