Comments (9)
Why couldn't I implement something like async with aclosing()
as an abstraction?
from anyio.
That's basically what the issue is for. Something that would satisfy curio and either be a no-op or the same functionality everywhere else.
from anyio.
What did you mean by hard-depending on curio then?
from anyio.
You can't do what the error message suggests without hard-depending. Bad phrasing on my part.
from anyio.
I'm mystified by this ticket now. I investigated and doesn't look like curio calls is_safe_generator()
on its own. I certainly don't run into this while running the test suite. Explain please.
from anyio.
It looks like that your curious library pretty more or less forces its use. Couldn't you just...not do that?
from anyio.
curio has an async generator hook: https://github.com/dabeaz/curio/blob/master/curio/meta.py#L400
which is installed by this function; https://github.com/dabeaz/curio/blob/ed00d710ebf60963360853b23b66c63fc6592a66/curio/meta.py#L36
which the kernel then uses here: https://github.com/dabeaz/curio/blob/master/curio/kernel.py#L143
so it's definitely called
from anyio.
What I cannot figure out is why I haven't run into this despite running unguarded async generators on curio in my test suite. I need to look deeper.
from anyio.
Ok, so it seems that because I use the the 3.5 backport (await yield_()
etc.), curio's heuristics miss these cases.
from anyio.
Related Issues (20)
- 100% CPU load after cancel HOT 13
- run_process fails when running from .exe console_script entrypoint on windows HOT 21
- Different cancel scope behaviour on asyncio vs Trio HOT 2
- Hypothesis tests that are class members are passed self twice HOT 1
- TCP listener handler does not disconnect on EOF (netcat -N) HOT 7
- Using `request.getfixturevalue` triggers errors "This event loop is already running" HOT 1
- Raising an error inside a task of a task group can produce: `RuntimeError: called 'started' twice on the same task status` HOT 7
- Cancelling `TaskGroup.start()` cancels `TaskGroup` itself (only for `asyncio` backend) HOT 4
- anyio is unexpectedly cancelling tasks HOT 6
- Provide async `getfixturevalue()` method on anyio
- run_sync_in_worker_thread hangs when 2 calls made in quick succession HOT 2
- MemoryObjectStream can drop items when the receiving end is cancelled HOT 7
- `MemoryObjectSendStream.send(item)` doesn't raise `BrokenResourceError` when the last receive stream is closed if `item` is falsey
- Test failures with Python 3.13.0b1 in 4.4.0 HOT 4
- Allow passing kwargs to anyio.open_process and anyio.run_process HOT 2
- Typing issue while use ParamSpec HOT 2
- Add default `SIGINT` signal handler to `process_worker()` at `anyio.to_process` HOT 2
- AttributeError: 'MemoryObjectItemReceiver' object has no attribute 'item' HOT 3
- Timing out when a cancelled process takes too long to die HOT 2
- `get_coro` is missing a `None` check in `_task_started` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anyio.