See most comments after closure of #482 -- anecdotal evidence suggests this feature is broken, even though I can't actually replicate the behavior.
I still can't replicate the symptom, but I can confirm that the tasks being run don't see env.linewise = True, so...yea.
env.linewise = True
Guessing it's because the code setting this is a context manager wrapping the definition of the function passed into multiprocessing -- not surprised that relying on global module state could cause hijinx like this.
What is odd is that the env.parallel = True is sticking. If the inner scope was completely ignoring the env changes I'd expect that to also be False.
env.parallel = True
Will experiment with explicitly handing a copy of local_env down the call chain, and hope that moving things around won't sink some other edge case not under study here 😕
I'm committing this change to the 1.4 branch and merging it into master on the assumption that it does fix the problem. Attn @shaftoe & @dmcquay if either of you are up to testing from a Git checkout :)
Add failing test re: linewise-when-parallel
Clean up use of per-subprocess env tweaks in parallel mode.
Should fix #767.
Changelog re #767
Thanks @bitprophet! I'll give this a try soon.