Re: [Async-sig] Optional async method and best practices

2017-07-12 Thread Nathaniel Smith
On Tue, Jul 11, 2017 at 3:26 PM, Laurent Mazuel via Async-sig wrote: > Hello, > > Iโ€™m working currently with Brett Cannon to bring asyncio support to our SDK. > We wanted to check with you one of the scenario, since we got a lng > discussion on it together ๐Ÿ˜Š. And we want to do it using the b

Re: [Async-sig] Optional async method and best practices

2017-07-12 Thread Laurent Mazuel via Async-sig
esday, July 12, 2017 13:27 To: Laurent Mazuel Cc: Cory Benfield ; async-sig@python.org Subject: Re: [Async-sig] Optional async method and best practices On Wed, Jul 12, 2017 at 9:44 AM, Laurent Mazuel via Async-sig wrote: > @property > def future(self): > if self._futur

Re: [Async-sig] Optional async method and best practices

2017-07-12 Thread Chris Jerdonek
๐Ÿ˜Š > > -Original Message- > From: Cory Benfield [mailto:c...@lukasa.co.uk] > Sent: Wednesday, July 12, 2017 01:18 > To: Laurent Mazuel > Cc: async-sig@python.org > Subject: Re: [Async-sig] Optional async method and best practices > > >> On 11 Jul 2017

Re: [Async-sig] Optional async method and best practices

2017-07-12 Thread Laurent Mazuel via Async-sig
-Original Message- From: Cory Benfield [mailto:c...@lukasa.co.uk] Sent: Wednesday, July 12, 2017 01:18 To: Laurent Mazuel Cc: async-sig@python.org Subject: Re: [Async-sig] Optional async method and best practices > On 11 Jul 2017, at 23:26, Laurent Mazuel via Async-sig > wrote

Re: [Async-sig] Optional async method and best practices

2017-07-12 Thread Dima Tisnek
Hi Laurent, I'm still a dilettante, so take my comments with a grain of salt: 1. Target Python 3.6 only. (i.e. drop 3.5; look at 3.7 obv, but you want users now) (i.e. forget `yield from`, none will remember/get it next year) (if 2.7 or 3.3 must be supported, provide synch package) 2.

Re: [Async-sig] Optional async method and best practices

2017-07-12 Thread Cory Benfield
> On 11 Jul 2017, at 23:26, Laurent Mazuel via Async-sig > wrote: > > Hello, Hi Laurent! A future note: your message got stuck in moderation because you arenโ€™t subscribed to the mailing list. You may find it helpful to subscribe, as your future messages will also get stuck unless you do! >

Re: [Async-sig] Optional async method and best practices

2017-07-12 Thread Chris Jerdonek
On Tue, Jul 11, 2017 at 3:26 PM, Laurent Mazuel via Async-sig wrote: > But I got a warning if I decide to do not use this poller, RuntimeWarning: > coroutine 'foo' was never awaited > ... > I found 2 solutions to avoid the warning, and I currently prefer solution 2: > 1- Return a function to call

[Async-sig] Optional async method and best practices

2017-07-12 Thread Laurent Mazuel via Async-sig
Hello, Iโ€™m working currently with Brett Cannon to bring asyncio support to our SDK. We wanted to check with you one of the scenario, since we got a lng discussion on it together ๐Ÿ˜Š. And we want to do it using the best reasonable practice with your opinion. We have an api that is clearly asy