Symptom
Closing an stdio client prints ResourceWarning: Unclosed <MemoryObjectReceiveStream at ...> and the same warning for MemoryObjectSendStream.
Evidence what you'll see
- The warnings come from
anyio/streams/memory.pylines 183 and 313. - The report's interpreter is Python 3.12. The warning text says to enable tracemalloc for the allocation traceback.
Why it happens
Response streams on the session were not closed, so the memory-object streams stayed open after the client finished.
Affected versions
The warning in the report is Python 3.12. The linked issue does not name an SDK version or an operating system.
Fix steps
0 of 1 done
Your check marks stay in this browser only.
How to check it worked
- Closing the client no longer prints
ResourceWarning: Unclosed <MemoryObjectReceiveStreamor the matching send-stream warning.
If it still fails
- The linked issue does not describe the warning on v1.7.0. A stream the application opens itself is still the application's to close.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it