Re: [PATCH] scripts: generate_rust_analyzer.py: avoid FD leak
From: Miguel Ojeda
Date: Wed Feb 11 2026 - 08:27:30 EST
On Tue, Jan 27, 2026 at 2:39 PM Tamir Duberstein <tamird@xxxxxxxxxx> wrote:
>
> I'm not sure how CPython could close the FD immediately - it would
> require the GC to run, at least? Anyway, agree with you below:
At least it looked to be immediately closed from a quick test I did.
I assume it knows because the temporary goes away and thus the
refcount goes to zero, without needing a GC run:
https://docs.python.org/3/reference/datamodel.html
> Thanks for reviewing!
You're welcome!
Cheers,
Miguel