-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/10/12 14:34, Benjamin Peterson wrote:
> 2012/10/4 Jesus Cea <jcea@jcea.es>:
>> Any suggestion about how to solve this?
>
> Easy solutions include somehow removing the dependence on
> subprocess or moving the import of subprocess into the function
> that uses it.

Moving the import into the function that needs it solves the issue.

See <http://hg.python.org/cpython/rev/d6d908dc11f2>.

Thanks for the suggestion, Benjamin.

This used to be a no-no, though, because if someone called that function in a thread during an import it would deadlock. Now Antoine reworked the locks so I don't know if this is still true or not.
">

(original) (raw)



On Thu, Oct 4, 2012 at 9:17 AM, Jesus Cea <jcea@jcea.es> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/10/12 14:34, Benjamin Peterson wrote:
\> 2012/10/4 Jesus Cea <jcea@jcea.es>:
\>> Any suggestion about how to solve this?
\>
\> Easy solutions include somehow removing the dependence on
\> subprocess or moving the import of subprocess into the function
\> that uses it.

Moving the import into the function that needs it solves the issue.

See <http://hg.python.org/cpython/rev/d6d908dc11f2>.

Thanks for the suggestion, Benjamin.

This used to be a no-no, though, because if someone called that function in a thread during an import it would deadlock. Now Antoine reworked the locks so I don't know if this is still true or not.

-Brett