Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aiofiles.tempfiles missing python 3.12-specific overloads for NamedTemporaryFile #12091

Open
katanacrimson opened this issue Jun 3, 2024 · 2 comments
Labels
help wanted An actionable problem of low to medium complexity where a PR would be very welcome stubs: false positive Type checkers report false errors

Comments

@katanacrimson
Copy link

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

@srittau srittau added stubs: false positive Type checkers report false errors help wanted An actionable problem of low to medium complexity where a PR would be very welcome labels Jun 3, 2024
@srittau
Copy link
Collaborator

srittau commented Jun 3, 2024

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

@max-muoto
Copy link
Contributor

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

Put up a PR here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted An actionable problem of low to medium complexity where a PR would be very welcome stubs: false positive Type checkers report false errors
Projects
None yet
Development

No branches or pull requests

3 participants