From 8fdaaf5c4360e5ec0b1f7881beff9f35f46f1e64 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Fri, 1 Nov 2024 11:02:10 +0000 Subject: [PATCH] restore comment --- src/trio/_core/_asyncgens.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/trio/_core/_asyncgens.py b/src/trio/_core/_asyncgens.py index b2cc0564a..b3b689575 100644 --- a/src/trio/_core/_asyncgens.py +++ b/src/trio/_core/_asyncgens.py @@ -73,6 +73,9 @@ def firstiter(agen: AsyncGeneratorType[object, NoReturn]) -> None: # An async generator first iterated outside of a Trio # task doesn't belong to Trio. Probably we're in guest # mode and the async generator belongs to our host. + # A strong set of ids is one of the only good places to + # remember this fact, at least until + # https://github.com/python/cpython/issues/85093 is implemented. self.foreign.add(id(agen)) if self.prev_hooks.firstiter is not None: self.prev_hooks.firstiter(agen)