Re: Import statements and multiprocessing

2018-01-31 Thread Nicholas Cole
On Tue, Jan 30, 2018 at 7:26 PM, Terry Reedy wrote: > On 1/30/2018 10:54 AM, Nicholas Cole wrote: > >> I have a strange problem on python 3.6.1 > > [involving multiprocessing] Interestingly it seems to have been a very subtle circular import problem that was showing up only in multiprocessing, an

Re: Import statements and multiprocessing

2018-01-30 Thread Terry Reedy
On 1/30/2018 10:54 AM, Nicholas Cole wrote: I have a strange problem on python 3.6.1 [involving multiprocessing] I think the first thing you should do is upgrade to 3.6.4 to get all the bugfixes since 3.6.4. I am pretty sure there have been some for multiprocessing itself. *Then* see if you

Re: Import statements and multiprocessing

2018-01-30 Thread Nicholas Cole
On Tue, Jan 30, 2018 at 4:33 PM, Nicholas Cole wrote: > On Tue, Jan 30, 2018 at 4:23 PM, Steven D'Aprano > wrote: >> On Tue, 30 Jan 2018 15:54:30 +, Nicholas Cole wrote: > >> I would say you're probably misinterpreting the nature of the problem. >> Import * isn't a directive that can be ignor

Re: Import statements and multiprocessing

2018-01-30 Thread Nicholas Cole
On Tue, Jan 30, 2018 at 4:23 PM, Steven D'Aprano wrote: > On Tue, 30 Jan 2018 15:54:30 +, Nicholas Cole wrote: > I would say you're probably misinterpreting the nature of the problem. > Import * isn't a directive that can be ignored. > > Can you show us a *simplified* demonstration? A minimal

Re: Import statements and multiprocessing

2018-01-30 Thread Steven D'Aprano
On Tue, 30 Jan 2018 15:54:30 +, Nicholas Cole wrote: [...] > The function I am passing to map calls a function in another file within > the same model. And that file has a > > from .some_file_in_the_package import * > > line at the top. > > However, in each function called in that file, I

Import statements and multiprocessing

2018-01-30 Thread Nicholas Cole
Dear List, I have a strange problem on python 3.6.1 I am using the multiprocessing function to parallelize an expensive operation, using the multiprocessing.Pool() and Pool.map() functions. The function I am passing to map calls a function in another file within the same model. And that file ha