Closed rhelmot closed 1 year ago
There are a handful of superfluous changes in the diff because I ran black on the whole project to format my code.
Okay. new commit. This one makes it so that wrap() no longer has the option to do indirect wrapping, which makes sense - you need to specify the type of the base class if the underlying file (and its type!) can change - you need to be accountable for the contract that the interface you're wrapping provides, which may be different than its stated type.
As a result, things are simplified drastically, and e.g. trying to use stdin from tests yields pytest's error with a meaningful message.
Cool, thanks. Will merge it in soon.
Can you please release this on pypi?
Released!
Closes #153 Closes #131
This adds stdin, stdout, stderr, and their binary counterparts to aiofiles. It does this by introducing two concepts:
is None
check.AsyncIndirectBase
. This is only used when opted-in explicitly, which we do for the stdio files in order to support monkeypatching, as is common in the python ecosystem.