Re: [Python-Dev] Fwd: Deadlock by a second import in a thread

2007-10-26 Thread Facundo Batista
2007/10/26, Christian Heimes <[EMAIL PROTECTED]>: > First of all I don't understand what you mean with "that some imports > are inside the call() function". Please elaborate on it. I'm talking about the "call" function defined in the _sre.c file. This function has a call to PyImport_Import() insi

Re: [Python-Dev] Fwd: Deadlock by a second import in a thread

2007-10-26 Thread Christian Heimes
Facundo Batista wrote: > Feel free to do it. But note, that some imports are inside the call() > function, this could have more implications that you see (at least I > saw) at first glance. CC to get Guido's attention First of all I don't understand what you mean with "that some imports are insid

Re: [Python-Dev] Fwd: Deadlock by a second import in a thread

2007-10-25 Thread Facundo Batista
2007/10/25, Christian Heimes <[EMAIL PROTECTED]>: > I could look into the matter and provide a patch for the trunk. Feel free to do it. But note, that some imports are inside the call() function, this could have more implications that you see (at least I saw) at first glance. Regards, -- .

Re: [Python-Dev] Fwd: Deadlock by a second import in a thread

2007-10-25 Thread Christian Heimes
Facundo Batista wrote: > It's a matter of perspective, yes. But I'll close this bug, because > he's hitting the problem through a weird way, doing something that he > shouldn't. > > The real problem here, if any, is that you can not make a second > import in another thread. Feel free to open a bug

Re: [Python-Dev] Fwd: Deadlock by a second import in a thread

2007-10-25 Thread Facundo Batista
2007/10/19, Adam Olsen <[EMAIL PROTECTED]>: > Whether this is a minor problem due to poor style or a major problem > due to a language defect is a matter of perspective. I'm working on > redesigning Python's threading support, expecting it to be used a > great deal more, which'd push it into the

Re: [Python-Dev] Fwd: Deadlock by a second import in a thread

2007-10-19 Thread Adam Olsen
On 10/19/07, Facundo Batista <[EMAIL PROTECTED]> wrote: > 2007/10/19, Adam Olsen <[EMAIL PROTECTED]>: > > > The solution then is, if your python file will ever be imported, you > > must write a main function and do all the work there instead. Do not > > write it in the style of a script (with sign

[Python-Dev] Fwd: Deadlock by a second import in a thread

2007-10-19 Thread Facundo Batista
2007/10/19, Adam Olsen <[EMAIL PROTECTED]>: > The solution then is, if your python file will ever be imported, you > must write a main function and do all the work there instead. Do not > write it in the style of a script (with significant work in the global > scope.) I had this a as a good codi