Tinche / aiofiles

File support for asyncio
Apache License 2.0
2.66k stars 150 forks source link

TemporaryDirectory is missing keyword arguments from upstream #112

Closed wlritchi closed 2 years ago

wlritchi commented 2 years ago

The synchronous equivalent from the standard library accepts a few keyword arguments to control the name and location of the created directory. However, aiofiles.tempfile.TemporaryDirectory does not accept the same keyword arguments.

...
    async with aiofiles.tempfile.TemporaryDirectory(dir=working_dir) as temp_dir_str:
TypeError: TemporaryDirectory() got an unexpected keyword argument 'dir'

Tested using aiofiles version 0.7.0.

gaby commented 2 years ago

I also ran into the same issue expecting a similar interface.