Tinche / aiofiles

File support for asyncio
Apache License 2.0
2.67k stars 149 forks source link

Missing .name and .mode attributes #69

Closed mjpieters closed 4 years ago

mjpieters commented 4 years ago

The FileIO attributes .name and .mode are missing from the wrappers.

So this works:

with open(filename) as f:
    print(f.name, f.mode)

This doesn't, resulting in attribute errors.

async with aiofiles.open(filename) as f:
    print(f.name, f.mode)