-
Notifications
You must be signed in to change notification settings - Fork 110
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
DOCfix: fix docstring GeneratorStdOutErrCapture to say that treats both stdout and stderr identically #6930
Conversation
…th stdout and stderr identically I am not sure though if it does capture really, although I guess it should due to StdOutErrCapture... but that is a different story I guess. The main point is that there is no stderr_buffer to be seen and we subclass StdOutErrCapture which has Capture in name for both Out and Err
Codecov Report
@@ Coverage Diff @@
## maint #6930 +/- ##
==========================================
+ Coverage 90.12% 91.09% +0.97%
==========================================
Files 354 354
Lines 46250 46250
Branches 6597 6597
==========================================
+ Hits 41682 42131 +449
+ Misses 4552 4103 -449
Partials 16 16
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
but then getting back to "if it does capture", looking at
it seems it would capture everything but 1 and 2 in this case. if that is what is intended, then if CommandError is raised while processing output in But likely it was not really meant to capture because there is code like https://github.com/datalad/datalad/blob/HEAD/datalad/dataset/gitrepo.py#L489 in meanwhile I guess I would need to do that "capture output outside" like is done in the points of |
…present A little more discussion at datalad#6930 and initially identified while working on datalad#6932 and being unable to get CommandError.stdout for matching while using call_git (but works with _call_git using different code path, which does not have this git_ignore_check). One of the two locations where this function is used has stdout=None, so this lead to wiping out of e.stdout even if it was present. I think it was not intentional but @christian-monch would know better
Let me quickly describe the dataflow in the basic protocols and the generator protocols: All protocolsLevel 0: Now there is a distinction between basic protocols and generator protocols. Let's handle the basic protocols first: Basic protocolsLevel 1 .. n: Generator protocolsLevel 1:
W.r.t. naming. The protocol might better be called The docstring is definitely wrong (there was an implementation before that captured stderr in a provided buffer and yielded stdout).
Yes, we should do it as is done with |
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.
That was an artifact from a test implementations. Thx
I am not sure though if it does capture really, although I guess it should due to
StdOutErrCapture... but that is a different story I guess. The main point is that
there is no stderr_buffer to be seen and we subclass StdOutErrCapture which
has Capture in name for both Out and Err
@christian-monch please approach this fix "critically" since I have little to no clue on how exactly all the layers of the runner work ATM so I could be entirely wrong and stderr_buffer is right there looking into my face somehow ;-)