Skip to content

[aiofiles] aiofiles.tempfile.NamedTemporaryFile.name should probably be a str #13551

Open
@sashkent3

Description

@sashkent3

When using aiofiles like this:

from aiofiles.tempfile import NamedTemporaryFile


async def main():
    async with NamedTemporaryFile() as f:
        print(f.name)

f.name is reported to be a FileDescriptorOrPath. It should probably be a str instead because that's how it is for the stdlib's tempfile.NamedTemporaryFile and that's the whole point of a named temporary file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions