This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author izbyshev
Recipients ThiefMaster, gregory.p.smith, izbyshev
Date 2020-11-22.17:12:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
It seems that allowing `input=None` to mean "redirect stdin to a pipe and send an empty string there" in `subprocess.check_output` was an accident(?), and this behavior is inconsistent with `` and `communicate`, where `input=None` has the same effect as not specifying it at all.

The docs for `subprocess.check_output` say:

The arguments shown above are merely some common ones. The full function signature is largely the same as that of run() - most arguments are passed directly through to that interface. However, explicitly passing input=None to inherit the parent’s standard input file handle is not supported.

They don't make it clear the effect of passing `input=None` though. I also couldn't find any tests that would check that effect.

Since we can't just forbid `input=None` for `check_output` at this point (probably can't even limit that to the case when `text` is used, since it was added in 3.7), I think that we need to extend the check pointed to by ThiefMaster to cover `text`, clarify the docs and add a test.
Date User Action Args
2020-11-22 17:12:17izbyshevsetrecipients: + izbyshev, gregory.p.smith, ThiefMaster
2020-11-22 17:12:17izbyshevsetmessageid: <>
2020-11-22 17:12:17izbyshevlinkissue42388 messages
2020-11-22 17:12:17izbyshevcreate