[issue40497] subprocess.check_output() accept the check keyword argument

2021-09-20 Thread Łukasz Langa
Łukasz Langa added the comment: Fixed with GH-19897 for Python 3.11. Thanks! ✨ 🍰 ✨ -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.11 -Python 3.7, Python 3.8, Python 3.9 ___ Python tracker

[issue40497] subprocess.check_output() accept the check keyword argument

2021-09-20 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 4d2957c1b9a915f76da418e89bf9b5add141ca3e by Rémi Lapeyre in branch 'main': bpo-40497: Fix handling of check in subprocess.check_output() (GH-19897) https://github.com/python/cpython/commit/4d2957c1b9a915f76da418e89bf9b5add141ca3e -- nosy:

[issue40497] subprocess.check_output() accept the check keyword argument

2020-05-04 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > Now a reviewer has to check that a developer uses the validate_result() > function *and* the developer is not passing validate=False into the function. Fair enough, I updated the PR to raise ValueError instead. --

[issue40497] subprocess.check_output() accept the check keyword argument

2020-05-04 Thread Christian Heimes
Christian Heimes added the comment: IMHO it's both confusing and bad API design to have a function like validate_result(..., validate=False) Now a reviewer has to check that a developer uses the validate_result() function *and* the developer is not passing validate=False into the functio

[issue40497] subprocess.check_output() accept the check keyword argument

2020-05-04 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > check_output() should not accept check=False. I thought about raising ValueError instead but `subprocess.check_output([...], check=False)` is actually a convenient shortcut over `subprocess.run([...], stdout=subprocess.PIPE).stdout` and I can't think of much

[issue40497] subprocess.check_output() accept the check keyword argument

2020-05-04 Thread Christian Heimes
Christian Heimes added the comment: -1 check_output() should not accept check=False. Please only improve the error message. I would be fine with accepting check=True, too -- nosy: +christian.heimes stage: patch review -> ___ Python tracker

[issue40497] subprocess.check_output() accept the check keyword argument

2020-05-04 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +19208 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19897 ___ Python tracker ___

[issue40497] subprocess.check_output() accept the check keyword argument

2020-05-04 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : The subprocess.check_output() raises TypeError when given the `check` keyword-argument: Python 3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> i