typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

aiofiles.tempfiles missing python 3.12-specific overloads for NamedTemporaryFile

Open katanacrimson opened this issue 1 year ago • 2 comments

Was digging through things to determine why I was being told by my editor that aiofiles.tempfile.NamedTemporaryFile didn't support the py3.12 argument delete_on_close, and it appears that it's that this isn't specified here and that it is not that I'm losing my mind. :)

https://github.com/python/typeshed/blob/main/stubs/aiofiles/aiofiles/tempfile/init.pyi

If we look through these, there are no python 3.12-specific variants which identify this delete_on_close argument which was added to support the behaviors of the same-named argument added to tempfiles.NamedTemporaryFile in python 3.12.

We can find the relevant portion of the python 3.12 overload of the aiofiles.tempfile.NamedTemporaryFile here:

https://github.com/Tinche/aiofiles/blob/v23.2.1/src/aiofiles/tempfile/init.py#L24-L61

katanacrimson avatar Jun 03 '24 20:06 katanacrimson

If in doubt, always assume that the stubs are wrong first. :) PR welcome!

srittau avatar Jun 03 '24 20:06 srittau

If in doubt, always assume that the stubs are wrong first. :) PR welcome!

Put up a PR here!

max-muoto avatar Jun 07 '24 15:06 max-muoto

We should be able to close this @srittau.

max-muoto avatar Jul 10 '24 21:07 max-muoto