Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Auto-isolate asyncio tasks if event loop is running

未關閉
#5,379 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
python
領域
backend

研究方向

先閱讀現有的 AsyncioIntegration 及其隔離作用域行為,然後比較提議的自動啟用設計。檢查如何對正在執行的事件迴圈進行修補、是否可以重複修補,以及這會如何影響現有的 AsyncioIntegration 使用者。完成的標準是任務隔離能夠自動運作,同時附加功能仍需明確 opt-in,並且在沒有事件迴圈的情況下能夠優雅地失敗。

由索引模型根據 Issue 內容生成。

描述

Better Async Support Improvement Integration: Asyncio Python

Currently, the opt-in AsyncioIntegration is responsible for multiple things, one of them being providing proper scope isolation in asyncio tasks. Without this functionality, people are running into different types of hard-to-diagnose scope bleed issues, like here.

Goal
  • Automatically patch the current event loop to isolate tasks in their isolation scopes, if there is an event loop running
  • For additional functionality (creating task spans, etc.), explicit opt-in should still be required from users
How to do this

Different ways to do this, each with its own caveats (e.g. introducing breaking changes).

  1. Take the isolation scope logic out of AsyncioIntegration into its own integration and make it auto-enabled (best effort, if there is no event loop we can't do anything).
  2. Make AsyncioIntegration auto-enabled, and change the additional functions it's providing (like task spans) to be opt-in. Also, make it fail gracefully if there is no event loop to patch.
  3. ???

When picking an option, consider:

  • Will this break behavior for existing users using the AsyncioIntegration?
  • Is there a risk of double-patching the event loop?
主要語言
Python
星號
2.2k
分支
682
平均合併
1 天 7 小時
30 天內合併 PR
246

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

getsentry/sentry-python 的其他 Issue

查看 getsentry/sentry-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。