#22709: Use stdin as-is if it does not have a buffer attribute.

This restores backward compatibility lost in the fix for #21075, and
is better duck typing.

Patch by Akira Li.
3 files changed