Open
Description
Motivation
On windows, get_environ
and apply
methods on the ResolvedContext class take a very long time when resolving a powershell environment before the cached method.
Explanation
This is because append_system_paths
method on the Python interpreter creates a new shell from the config defaults. This method trickles up to the _execute
method in the ResolvedContext
class. Which is then called by apply
and get_environ
.
Additional Motivation
There are other methods on the ResolvedContext
class that allows for using shells within the resolved context and would be nice to be able to carry this functionality over.
Proposed Solutions
- Add a default shell on the
Python
interpreter class that can be used for Python shell environments when instantiating the executor. - Add a argument
shell
in theappend_system_paths
and the_execute
functions to be passed down as default or override.
Current Workaround
config = create_config()
config.override("default_shell", "cmd")
context.get_environ()