Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new ASYNC3xx rules to account for asyncio's different cancellation semantics? #257

Open
Zac-HD opened this issue May 27, 2024 · 0 comments

Comments

@Zac-HD
Copy link
Member

Zac-HD commented May 27, 2024

In #211, we noted that ASYNC102 (await-in-finally-or-cancelled) is specific to Trio/AnyIO style "level-triggered" cancellation semantics.

Asyncio has a pretty different system, where cancellation is an event rather than a state (well, mostly - on Python 3.11+ there's also Task.uncancel() to reverse the state change, on 3.10 and earlier you can only partly uncancel).

If someone works out a good lint rule, or set of rules, for asyncio-style cancellation semantics, we'd be happy to accept them as ASYNC3xx rules and make ASYNC102 specific to Trio and AnyIO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant