Re: [Async-sig] [ANN] async_generator v1.2 released

2016-11-26 Thread Alex Grönholm
26.11.2016, 09:47, Nathaniel Smith kirjoitti: On Fri, Nov 25, 2016 at 10:46 AM, Alex Grönholm <alex.gronh...@nextday.fi> wrote: 25.11.2016, 12:09, Nathaniel Smith kirjoitti: On Thu, Nov 24, 2016 at 11:59 PM, Alex Grönholm <alex.gronh...@nextday.fi> wrote: 25.11.2016, 09:25, Nat

Re: [Async-sig] [ANN] async_generator v1.2 released

2016-11-22 Thread Alex Grönholm
Does this library offer any advantages over the same functionality in asyncio_extras? 15.11.2016, 08:52, Nathaniel Smith kirjoitti: Hi all, I just released v1.2 of my async_generator package: https://pypi.org/pypi/async_generator/ This package makes it easy to write PEP 525-style "async

Re: [Async-sig] [ANN] async_generator v1.2 released

2016-11-25 Thread Alex Grönholm
24.11.2016, 23:23, Nathaniel Smith kirjoitti: On Nov 23, 2016 11:29 PM, "Alex Grönholm" <alex.gronh...@nextday.fi <mailto:alex.gronh...@nextday.fi>> wrote: > > 23.11.2016, 01:34, Nathaniel Smith kirjoitti: >> >> On Tue, Nov 22, 2016 at 2:22 PM,

Re: [Async-sig] [ANN] async_generator v1.2 released

2016-11-25 Thread Alex Grönholm
25.11.2016, 09:25, Nathaniel Smith kirjoitti: On Thu, Nov 24, 2016 at 1:23 PM, Nathaniel Smith wrote: [...] One thing I noticed is that there seems to be no way to detect async generator functions in your implementation. That is something I would want to have before switching.

Re: [Async-sig] async contextmanager

2016-11-01 Thread Alex Grönholm
Certainly. You can use asyncio_extras for that: http://pythonhosted.org/asyncio_extras/#asyncio-extras-contextmanager 01.11.2016, 18:15, Federico Marani kirjoitti: Has anyone tried to build an asynchronous version of @contextmanager? Is it even possible... given the use of yield?

Re: [Async-sig] async documentation methods

2017-07-04 Thread Alex Grönholm
PM, Alex Grönholm <alex.gronh...@nextday.fi> wrote: The real question is: why doesn't vanilla Sphinx have any kind of support for async functions which have been part of the language for quite a while? Because no-one's sent them a PR, I assume. They're pretty swamped AFAICT. One of the maint

Re: [Async-sig] async testing question

2017-07-04 Thread Alex Grönholm
For asyncio, you can write your test functions as coroutines if you use pytest-asyncio. You can even write test fixtures using coroutines. Mocking coroutine functions can be done using asynctest, although I've found that library a bit buggy. Chris Jerdonek kirjoitti 02.07.2017 klo 00:00: On

Re: [Async-sig] async documentation methods

2017-07-04 Thread Alex Grönholm
Yeah, but that doesn't answer my question :) Chris Jerdonek kirjoitti 04.07.2017 klo 10:02: On Mon, Jul 3, 2017 at 11:49 PM, Alex Grönholm <alex.gronh...@nextday.fi> wrote: The real question is: why doesn't vanilla Sphinx have any kind of support for async functions which have bee

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

2017-06-09 Thread Alex Grönholm
Yarko Tymciurak kirjoitti 09.06.2017 klo 11:49: On Fri, Jun 9, 2017 at 3:05 AM Alex Grönholm <alex.gronh...@nextday.fi <mailto:alex.gronh...@nextday.fi>> wrote: Yarko Tymciurak kirjoitti 09.06.2017 klo 09:19: On Fri, Jun 9, 2017 at 12:48 AM Nathaniel Smith <

Re: [Async-sig] new library: sniffio – Sniff out which async library your code is running under

2018-08-17 Thread Alex Grönholm
This was my approach: def _detect_running_asynclib() -> str: if 'trio' in sys.modules: from trio.hazmat import current_trio_token try: current_trio_token() except RuntimeError: pass else: return 'trio' if 'curio' in

Re: [Async-sig] new library: sniffio – Sniff out which async library your code is running under

2018-08-17 Thread Alex Grönholm
ate to execution. I.e. since I could have > multiple event loops running at once that means what's in sys.modules > can't tell me what event loop I'm currently interacting with. > > On Fri, 17 Aug 2018 at 09:09 Alex Grönholm > wrote: > > This was my approach: > > &g