Refactoring: make subproc_captured_*
methods private and provide xonsh API instead
#5383
Labels
subproc_captured_*
methods private and provide xonsh API instead
#5383
I noticed that another projects (e.g. conda, xontrib-prompt-bar) are using
xonsh.built_ins.subproc_captured_*
methods to run commands using xonsh. But behavior of this methods is strongly related to parser (i.e. substitutions), environment (i.e.$XONSH_SUBPROC_OUTPUT_FORMAT
) and CommandPipeline (i.e. a bunch of settings) and these methods were originally used in parser. If we change environment or parser we can break other projects (mostly integrations and xontribs) downstream code.This is why we need to separate
subproc_captured_*
into:For example
subproc_captured_stdout
now can return str or list (#5377) because we need this behavior in parser as well as in CommandPipeline but it's uncomfortable behavior for xonsh API users who expect to have str forever.For community
⬇️ Please click the 👍 reaction instead of leaving a
+1
or 👍 commentThe text was updated successfully, but these errors were encountered: