Since [1] we monkey patch subprocess module and it uncovered one issue -
the previous patched_function implementation would produce functions
with all optional arguments lacking their default values which made them
required. This is an issue on Python 3 where there's at least one
optional explicit argument in at least one of the functions
(check_call), on Python 2 the function signature has *args and **kwargs
so it wasn't an issue.
This patch is contributed by Smarkets Limited.
[1] 614a20462a