Repository navigation
Remove Python 2 support and dependency on py, fixes #81 - #82
Conversation
962d1e0 to
eda4ef7
Compare
|
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! |
Pytest-flake8 (by way of py.io) monkey-patches stdout, stderr in an unclean way which is incompatible with how flake8 >= 4.0.0 uses them. A fix for this has been submitted to pytest-flake8: tholo/pytest-flake8#82 Until this or an equivalent change is available, we'll pin flake8 to a version which works without the fix. Signed-off-by: Nils Philippsen <[email protected]>
|
This looks like a good fix, well at least it seems to agree with the pytest maintainer's suggestion in PyCQA/flake8#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 👍 |
|
@boidolr Thanks, I've amended the travis config now. |
6b7c44d to
7b4f8d5
Compare
7b4f8d5 to
fe70f45
Compare
|
Sorry for the force pushes, had not configured my gpg key properly on new laptop |
|
I tested this branch and it works for me. |
…le wiating for tholo/pytest-flake8#82 to be merged
…le wiating for tholo/pytest-flake8#82 to be merged (#337)
Hi,
I just ran into #81 and looked into it a bit.
It seems that the stderr/stdout capturing, currently handled by
py, doesn't agree withflake8report generation...Considering that
pyis 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.