saltstack/salt — Issue #404: add a session object for each call
Author: ewsnow
Created: 2011-12-29 23:48:05+00:00
State: open

it would be nice if each command I ran was associated with a session dict/object that held the state specific to that session. That would include things like the environment, __salt__, and __grains__. The session would be passed around as the first argument to most functions in the library.

Then you handle things properly, without having to inject attributes into modules all over the place (not pretty). With the session getting passed around, it's a lot cleaner and easier to follow.