Skip to content
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

--check doesn't print to stderr as the documentation says #1429

Closed
tdhopper opened this issue Aug 28, 2020 · 4 comments · Fixed by #1435
Closed

--check doesn't print to stderr as the documentation says #1429

tdhopper opened this issue Aug 28, 2020 · 4 comments · Fixed by #1435
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation
Milestone

Comments

@tdhopper
Copy link

I believe I'm correct that running --check prints the required changes to stdout despite what the README says.

@timothycrosley timothycrosley added bug Something isn't working documentation Improvements or additions to documentation labels Aug 29, 2020
@timothycrosley
Copy link
Member

timothycrosley commented Aug 29, 2020

Hi @tdhopper!

Thanks for pointing out the inconsistency! I did some digging to see why this was, and it looks like originally it did print to stderr, and then intentionally was changed (here: be10c4a) as a result of the discussion here: #156. .

Personally, looking back on it, I think the wrong course of action was taking and that errors (and only the errors) should have been sent to stderr and the documentation should be made consist, I'll take the opportunity in the next minor release to fix this behaviour.

Thanks for shedding light on a ~6 year old bug that's probably caused confusion for many!

~Timothy

@timothycrosley timothycrosley added this to the 5.5.0 milestone Aug 29, 2020
@sztamas sztamas self-assigned this Aug 31, 2020
@sztamas
Copy link
Collaborator

sztamas commented Aug 31, 2020

I already noticed this inconsistency when added the colored output code, but didn't want to break backward compatibility and left a TODO to make the changes later on.

I haven't noticed that the documentation say we should print to stderr already, which gives us the option of treating this as a bugfix and fix it right away.

sztamas added a commit that referenced this issue Aug 31, 2020
@timothycrosley
Copy link
Member

This change has just been deployed to PyPI in version 5.5.0

Thanks!

~Timothy

@tdhopper
Copy link
Author

tdhopper commented Sep 3, 2020

Thanks for jumping on it!

jparise added a commit to pinterest/arcanist-linters that referenced this issue Sep 3, 2020
PyCQA/isort#1429 fixed `--check`'s output so
that the error message and diff output are separated into STDERR and
STDOUT rather than combined in STDOUT. This means we need to update our
diff parsing function accordingly.

Also fix the version parsing routine to read from STDOUT. This was
busted for at least a few versions.
jparise added a commit to pinterest/arcanist-linters that referenced this issue Sep 3, 2020
PyCQA/isort#1429 fixed --check's output so
that the error message and diff output are separated into STDERR and
STDOUT rather than combined in STDOUT. This means we need to update our
diff parsing function accordingly.

Also fix the version parsing routine to read from STDOUT. This was
busted for at least a few versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants