Conversation
Pin the contract that subprocess stdout/stderr, piped command stderr, and pypiper messages must appear in log files. Three xfail tests mark the multi=True limitation that the upcoming tee removal will fix.
Step 1: Add logging.FileHandler to the logger so all pypiper messages (info, timestamp, debug) are written directly to the log file. Step 2: Add _tee_output() helper that reads from a subprocess pipe and writes each line to both sys.stdout and the log file. Step 3: Modify callprint() to set stdout=PIPE on the final process and stderr=PIPE on all processes, then spawn daemon threads to tee output in real time. Threads are joined after the polling loop completes. Both old tee mechanism and new per-command capture coexist in this commit.
- Delete Unbuffered class (no longer needed) - Remove tee subprocess setup (os.dup2, Popen tee, _ignore_interrupts) - Remove tee kill from _exit_handler - Remove import __main__ (only used for interactive_mode check) - Clean up signal handler docstrings that referenced tee behavior - Remove dead commented-out code about tee alternatives - Update multi parameter: still used for pipestat multi_pipelines, no longer controls tee behavior - Remove unnecessary multi=True from test fixtures where it was only needed for tee avoidance (keep it where pipestat needs it)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.