bug: vim 7.3 Python 3.2 FATAL "take_gil: NULL state"

Affichage de 13 messages sur 3
bug: vim 7.3 Python 3.2 FATAL "take_gil: NULL state" roland puntaier 10/06/11 06:14
Hello Bram,

I've compiled vim7.3 with Python3.2 and got "take_gil: NULL state" when
doing :py3 ...

After some investigation I found that with Python3.2
PyEval_InitThreads() must be called after Py_Initialize().

This needs to be changed in if_python3.c.

regards,
     Roland

Re: bug: vim 7.3 Python 3.2 FATAL "take_gil: NULL state" Bram Moolenaar 10/06/11 19:53

Roland Puntaier wrote:

> I've compiled vim7.3 with Python3.2 and got "take_gil: NULL state" when
> doing :py3 ...
>
> After some investigation I found that with Python3.2
> PyEval_InitThreads() must be called after Py_Initialize().
>
> This needs to be changed in if_python3.c.

Thanks.  Do you know if this works with all Python 3.x versions?

--
If you feel lonely, try schizophrenia.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Re: bug: vim 7.3 Python 3.2 FATAL "take_gil: NULL state" Andreas Behr 11/06/11 04:26
They changed the order as of python version 3.2.

Changing the order of the two calls even works with 3.1.x (short test with mac osx)

I attached a changeset with some minor changes to configure.in and if_python.c to get a more general python 3.x support in vim (see PEP 3149)