Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Auto-isolate asyncio tasks if event loop is running

Offen
#5,379 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
backend

Rechercherichtung

Lies zunächst die bestehende AsyncioIntegration und ihr Verhalten im Hinblick auf die Isolierung des Scopes, und vergleiche dann die vorgeschlagenen Designs zur automatischen Aktivierung. Prüfe, wie ein laufender Event Loop gepatcht wird, ob wiederholtes Patchen möglich ist und wie bestehende Nutzer von AsyncioIntegration betroffen wären. Als erledigt gilt die Aufgabe, wenn die Task-Isolierung automatisch funktioniert, während zusätzliche Funktionen weiterhin ausdrücklich opt-in bleiben und Fälle ohne Event Loop graceful fehlschlagen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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?
Vorherrschende Sprache
Python
Sterne
2.2k
Forks
672
Ø Merge
22 Std. 47 Min.
Gemergte PRs (30 T.)
224

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus getsentry/sentry-python

Alle Issues in getsentry/sentry-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.