This looks like the author wants Go's concurrency framework (i.e. green threads), with Rust's mutex system. I think that would be awesome!
My main concern is that it would require a massive reworking of Python's internals to provide concurrency-friendly IO. The author mentioned the example of OS files, but there are plenty of others, especially with third party libraries using native extensions.
Free threaded came on the scene and packages slowly added support. So there is a will to gravitate towards and adopt what works. Albeit gradually.
I prefer typing_extensions over typing and collections.abc
With typing_extensions, new features are always backported. With Python features, have to continuously upgrade Python. Whatever you upgrade to is already guaranteed to be very temporary. It's much easier to upgrade a package.
For the same reasoning would prefer Trio over asyncio.TaskGroup.
Which leads to the question Trio vs asyncio.TaskGroup?
asyncio.TaskGroup is a py311 feature with context kwarg added in 3.13. The documentation is very terse and i'm unsure what guarantees it has, besides strong. Missed opportunity. Could have used the adjective, Mickey mouse. Both are essentially the same, useless.
Having to upgrade to 3.13 is what i call failure to backport or simply, failure or that's what failure looks like.
Give a free pass to free threading, but everything else, no!
Having to upgrade Python to have access to sane structured concurrency is silly. Have the exact same complaints about Package Managers.
The writer is not wrong about the awful ergonomics of having to deal with async. Project Loom took a long time to land but it really demonstrates how to do this kind of thing right.
Yeah, a more modern take on mutexes (as boxes for values) and support for structured concurrency would be fabulous. Those are somewhat orthogonal to the goal of being able to write straight-line code without function colouring. Long ago, eventlet provided something like this [although it had smoe subtle and deep bugs that took a long time to track down].
Potentially, a major stumbling-block would be providing machinery so that interleaved FFI & python calls can cooperate (if that's determined as being in-scope, which it ultimately should be).
This looks like the author wants Go's concurrency framework (i.e. green threads), with Rust's mutex system. I think that would be awesome!
My main concern is that it would require a massive reworking of Python's internals to provide concurrency-friendly IO. The author mentioned the example of OS files, but there are plenty of others, especially with third party libraries using native extensions.
Free threaded came on the scene and packages slowly added support. So there is a will to gravitate towards and adopt what works. Albeit gradually.
I prefer typing_extensions over typing and collections.abc
With typing_extensions, new features are always backported. With Python features, have to continuously upgrade Python. Whatever you upgrade to is already guaranteed to be very temporary. It's much easier to upgrade a package.
For the same reasoning would prefer Trio over asyncio.TaskGroup.
Which leads to the question Trio vs asyncio.TaskGroup?
asyncio.TaskGroup is a py311 feature with context kwarg added in 3.13. The documentation is very terse and i'm unsure what guarantees it has, besides strong. Missed opportunity. Could have used the adjective, Mickey mouse. Both are essentially the same, useless.
Having to upgrade to 3.13 is what i call failure to backport or simply, failure or that's what failure looks like.
Give a free pass to free threading, but everything else, no!
Having to upgrade Python to have access to sane structured concurrency is silly. Have the exact same complaints about Package Managers.