-
Notifications
You must be signed in to change notification settings - Fork 424
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
Document Python stdout/stderr buffering behavior #26624
Conversation
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
@@ -90,7 +91,7 @@ proc test_three_args_with_default_and_kwargs(mod: borrowed Module) { | |||
func(NoneType, 8, kwargs=["b" => 10]); | |||
func(NoneType, 8, kwargs=["c" => 11, "abc" => 12]); | |||
} | |||
proc test_varargs_and_kwargs(mod: borrowed Module) { | |||
proc test_varargs_and_kwargs(mod: borrowed Module, flush: borrowed Value) { |
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.
can't you make flush a global variable instead of threading it through?
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.
Yes, but that would require making interp
a global variable as well
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 makes me think of two things, in ascending order of quality:
- Can you make
interp
global :3 - What if
interp
had a flush method, so that you didn't have to use aValue
in user code? Given that you'd need to do this for all interspersed IO, I think it might be worth it.
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.
I know this is just a test, but I dislike making interp
global. However, I do find adding interp.flush()
appealing. Value
is definitely a user facing type, but having interp.flush()
still seems like a useful helper.
Signed-off-by: Jade Abraham <[email protected]>
Document the behavior of IO with Chapel and Python interspersed, and tell users how to deal with it.
start_test test/library/packages/Python
start_test test/library/packages/Python
with GASNet[Reviewed by @DanilaFe]