Closed erikkemperman closed 2 years ago
Sorry, docs say that redirecting stdout was added in 3.4, but stderr was only added in 3.5 -- amended the commit, and threw in 3.10 for good measure.
Could we get this merged down and released? This is causing issues for us as well. Thank you!
This looks like a good fix, well at least it seems to agree with the pytest maintainer's suggestion in https://github.com/PyCQA/flake8/pull/1422 ("use io.TextIOWrapper").
@tholo Do you have any reservations about this MR? Maybe some changes needed before it can be merged? People could help in getting these changes in, just let us know.
Would love this too 👍
@erikkemperman I think a change to .travis.yml
is needed too, to reflect the versions in the tests.
@boidolr Thanks, I've amended the travis config now.
Sorry for the force pushes, had not configured my gpg key properly on new laptop
I tested this branch and it works for me.
Hi,
I just ran into https://github.com/tholo/pytest-flake8/issues/81 and looked into it a bit.
It seems that the stderr/stdout capturing, currently handled by
py
, doesn't agree withflake8
report generation...Considering that
py
is in maintenance mode and Python 2 is officially pushing the daisies, I thought you might consider this PR which uses capturing utilities available in the standard library,contextlib
-- since 3.4.