You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could swear we already ran into and fixed this but I cannot find another issue for it, and the only applicable test I can find specifically calls out builtins and not other imported modules.
Symptomatic case is fabric/fabric#1823 where a user is (unintentionally) loading a tasks module as a runtime config file. The presence of the os module then causes an explosion as modules cannot be pickled, which copy.copy does internally (ugh).
The text was updated successfully, but these errors were encountered:
Writing test for this now; the obvious fix is to raise a specifically phrased and subclassed exception so users know what's going on instead of getting a TypeError about pickling, which is just confusing.
Suppose we could instead try to detect this and strip, as we do for builtins, but it feels more fragile than with builtins, and would lead to silent problems for advanced users attempting to assign modules to config values on purpose for whatever reason.
I've already gone back and forth on this a few times internally (and between the two repos) so I'm definitely past the point of caring about corner cases. Will set it up to just raise a useful error instead of TypeError, and that's that for now. Can iterate later if anybody gets mad.