-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it.
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 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.