Open Issues Need Help
View All on GitHubAI Summary: The GitHub issue proposes defining the `__bool__` method for `trio.Event` objects to prevent common bugs where users mistakenly check `if event:` instead of `if event.is_set():`. The author's preferred solution is to make `__bool__` raise an error, explicitly guiding users to the correct `is_set()` method, though returning `is_set()` is also considered. This change aims to improve code clarity and reduce user errors, with potential implications for other `trio` synchronization primitives.
Trio – a friendly Python library for async concurrency and I/O
AI Summary: The user requests that `trio.CapacityLimiter` allow `total_tokens` to be set to 0. Currently, passing 0 raises an error, but allowing it would provide a clean way to temporarily pause task processing. A workaround exists, but a direct fix by modifying the setter is preferred.
Trio – a friendly Python library for async concurrency and I/O
Trio – a friendly Python library for async concurrency and I/O