!OqDVTrmPstKzivLwZW:gitter.im

python-trio/general

799 Members
Discussion of Trio, a friendly Python library for async concurrency and I/O19 Servers

Load older messages


SenderMessageTime
13 Feb 2025
@jakkdl-56365bc516b6c7089cb91462:gitter.imjakkdl (John Litborn) and then maybe AsyncResource.__aexit__ can do a proper checkpoint if its args are None 12:01:52
@jakkdl-56365bc516b6c7089cb91462:gitter.imjakkdl (John Litborn)I guess its https://github.com/python-trio/trio/issues/155912:02:58
@jakkdl-56365bc516b6c7089cb91462:gitter.imjakkdl (John Litborn)* I guess it's https://github.com/python-trio/trio/issues/155912:03:07
@jakkdl-56365bc516b6c7089cb91462:gitter.imjakkdl (John Litborn)* I guess this is https://github.com/python-trio/trio/issues/155912:03:16
@jakkdl-56365bc516b6c7089cb91462:gitter.imjakkdl (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
@goodboy:matrix.orglord_fomo
In reply to @jc211-5c663b7bd73408ce4fb7dbd0:gitter.im
I would if I could use tractor :P
😿
02:24:43
@goodboy:matrix.orglord_fomoi guess we should talk about that alt license 😂02:24:59
@goodboy:matrix.orglord_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
@goodboy:matrix.orglord_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
@goodboy:matrix.orglord_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
@goodboy:matrix.orglord_fomoi have a test that replicates with an approach to report if that's something y'all are interested in02:30:46
@a5rocks-5dd31b90d73408ce4fd16451:gitter.imA5rocks (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-5dd31b90d73408ce4fd16451:gitter.imA5rocks (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
@goodboy:matrix.orglord_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-56365bc516b6c7089cb91462:gitter.imjakkdl (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
@goodboy:matrix.orglord_fomo i personally think outcome is useful enough to be up front 17:09:22
@goodboy:matrix.orglord_fomothe cookie-cutter def doesn't need to be there imo17:09:36
@goodboy:matrix.orglord_fomo dangit, and i didn't even know about asyncclick 😂 17:10:04
@jakkdl-56365bc516b6c7089cb91462:gitter.imjakkdl (John Litborn) yeah agree on outcome 17:10:54
@goodboy:matrix.orglord_fomo yeah it's a pretty fundamentally useful impl of a Maybe effectively for python 17:13:04
@goodboy:matrix.orglord_fomo smurfix (Matthias Urlichs): what is the TLDR of asyncclick ? 17:13:31
@goodboy:matrix.orglord_fomo i can just swap it with all my click stuff ya? and have you ever tried using it under typer? 17:13:51
@goodboy:matrix.orglord_fomohttps://typer.tiangolo.com/17:14:23
@goodboy:matrix.orglord_fomoit'd sure be handy for a few things i'm doing in ma DDE 😏17:14:39
@mikenerone:matrix.orgmikenerone 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:matrix.orgmikenerone 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-5c663b7bd73408ce4fb7dbd0:gitter.imjc211 (jc211)What is the advantage of click over something like https://brentyi.github.io/tyro/examples/basics/#dataclasses20:53:10
@jc211-5c663b7bd73408ce4fb7dbd0:gitter.imjc211 (jc211)I guess one is more of an arg parser and the other is a method registration mechansim20:56:01
@jc211-5c663b7bd73408ce4fb7dbd0:gitter.imjc211 (jc211)Redacted or Malformed Event20:59:49
@jc211-5c663b7bd73408ce4fb7dbd0:gitter.imjc211 (jc211)Redacted or Malformed Event21:00:31

There are no newer messages yet.


Back to Room ListRoom Version: 6