13 Feb 2025 |
jakkdl (John Litborn) | and then maybe AsyncResource.__aexit__ can do a proper checkpoint if its args are None | 12:01:52 |
jakkdl (John Litborn) | I guess its https://github.com/python-trio/trio/issues/1559 | 12:02:58 |
jakkdl (John Litborn) | * I guess it's https://github.com/python-trio/trio/issues/1559 | 12:03:07 |
jakkdl (John Litborn) | * I guess this is https://github.com/python-trio/trio/issues/1559 | 12:03:16 |
jakkdl (John Litborn) | random fun fact: out of 28 raise AssertionError in the trio code base, all but four have pragma: no cover . I was hoping it'd be all of them so it could be added to the standard pragmas, the remaining ones are all in src/trio/testing | 16:46:32 |
14 Feb 2025 |
lord_fomo | In reply to @jc211-5c663b7bd73408ce4fb7dbd0:gitter.im I would if I could use tractor :P 😿 | 02:24:43 |
lord_fomo | i guess we should talk about that alt license 😂 | 02:24:59 |
lord_fomo | In reply to @jakkdl-56365bc516b6c7089cb91462:gitter.im
eyy, figured out wth is going on:
async def test_cancel_memorysendchannel_aexit() -> None:
send_chan, _recv_chan = trio.open_memory_channel[None](0)
with trio.CancelScope() as cs:
async with send_chan:
cs.cancel()
# the value error is eaten by MemorySendChannel.aclose() turning it into a trio.Cancelled
raise ValueError
lol pretty sure this is what i was complaining about end-of-last/beginning-of-this year no? | 02:26:28 |
lord_fomo | In reply to @jakkdl-56365bc516b6c7089cb91462:gitter.im this seems ... bad? pretty sure this is the "i raised a Cancelled in a finally: " case and now i can't get the src error | 02:27:45 |
lord_fomo | * pretty sure this is the "i raised a Cancelled in a finally: and now i can't get the src error", case no? | 02:28:34 |
lord_fomo | i have a test that replicates with an approach to report if that's something y'all are interested in | 02:30:46 |
A5rocks (EXPLOSION) | it's slightly different because the thing suppressing the error is within trio, so we can fix it (this instance) for all users (maybe. at least that's what i understand of the issue) | 03:16:51 |
A5rocks (EXPLOSION) | Hello! https://pypi.org/project/trio/0.29.0/ is now released, featuring a few new features and fixes for mypy 1.15! | 07:20:22 |
lord_fomo | In reply to @a5rocks-5dd31b90d73408ce4fd16451:gitter.im it's slightly different because the thing suppressing the error is within trio, so we can fix it (this instance) for all users (maybe. at least that's what i understand of the issue) yeah, but it's the same fundamental mistake, which is kinda why i was suggesting we intro something to help mitigate | 13:29:28 |
jakkdl (John Litborn) | the pinned repos at https://github.com/python-trio could do with some updating. async_generator doesn't deserve to be there, and I would personally put flake8-async there (though I'm very biased there :P) | 16:45:37 |
lord_fomo | i personally think outcome is useful enough to be up front | 17:09:22 |
lord_fomo | the cookie-cutter def doesn't need to be there imo | 17:09:36 |
lord_fomo | dangit, and i didn't even know about asyncclick 😂 | 17:10:04 |
jakkdl (John Litborn) | yeah agree on outcome | 17:10:54 |
lord_fomo | yeah it's a pretty fundamentally useful impl of a Maybe effectively for python | 17:13:04 |
lord_fomo | smurfix (Matthias Urlichs): what is the TLDR of asyncclick ? | 17:13:31 |
lord_fomo | i can just swap it with all my click stuff ya? and have you ever tried using it under typer ? | 17:13:51 |
lord_fomo | https://typer.tiangolo.com/ | 17:14:23 |
lord_fomo | it'd sure be handy for a few things i'm doing in ma DDE 😏 | 17:14:39 |
mikenerone | I've been aware of asyncclick for a long time, but I still don't use it. I just use regular click (but actually typer these days) and put the trio.run() call in the function. I'm not really clear on the benefit of the extra dep to save a few characters. | 17:30:15 |
mikenerone | Note: I'm actually lying slightly. I have a standard @with_trio_run decorator that I put on the real entry points, so in the click /typer functions, it still actually looks like a synchronous call. This has other benefits for firing those entry points consistently from alternative means. | 17:31:56 |
jc211 (jc211) | What is the advantage of click over something like https://brentyi.github.io/tyro/examples/basics/#dataclasses | 20:53:10 |
jc211 (jc211) | I guess one is more of an arg parser and the other is a method registration mechansim | 20:56:01 |
jc211 (jc211) | Redacted or Malformed Event | 20:59:49 |
jc211 (jc211) | Redacted or Malformed Event | 21:00:31 |