[arch-dev-public] Merging {g,}vim-python3 into {g,}vim package
Hi Currently vim split package creates several binary packages: vim-runtime (common runtime data) vim-minimal (vim without language bindings) vim (vim with ruby, lua language bindings + python2 support) vim-python3 (vim with ruby, lua language bindings + python3 support) gvim, gvim-python3 ditto for graphical based vim The fact that we have separate package for python2 and python3 is a bit confusing and does not allow users to use both languages at the same time. Per discussion in https://bugs.archlinux.org/task/47500 I would like to fold *-python3 packages into {,g}vim. The new {,g}vim will have both languages support. Thoughts, objections?
On 06/01, Anatol Pomozov wrote:
Hi
Currently vim split package creates several binary packages: vim-runtime (common runtime data) vim-minimal (vim without language bindings) vim (vim with ruby, lua language bindings + python2 support) vim-python3 (vim with ruby, lua language bindings + python3 support) gvim, gvim-python3 ditto for graphical based vim
The fact that we have separate package for python2 and python3 is a bit confusing and does not allow users to use both languages at the same time.
No, what doesn't allow users to use both at the same time is vim not supporting it, which is why python3 support was added as a split package in the first place. If you believe that that's changed and that the vim docs are now out of date, please do test it extensively and show your results From <http://vimdoc.sourceforge.net/htmldoc/if_pyth.html#python3>: | When Python 2 and Python 3 are both supported they must be loaded dynamically. | | When doing this on Linux/Unix systems and importing global symbols, this leads | to a crash when the second Python version is used." -- Sincerely, Johannes Löthberg PGP Key ID: 0x50FB9B273A9D0BB5 https://theos.kyriasis.com/~kyrias/
Hi On Wed, Jan 6, 2016 at 1:10 PM, Johannes Löthberg <johannes@kyriasis.com> wrote:
No, what doesn't allow users to use both at the same time is vim not supporting it, which is why python3 support was added as a split package in the first place.
Let me to rephrase my statement to match what I really meant. "Merge -python3 into {vim,gvim} to let one use any python version with the same package without need to do reinstalls". I am fine if only one language can be used - it is just the same as we had. But this merge will make switching between python versions easier. Gentoo and Fedora compile both python bindings dynamically and I guess this configuration is pretty stable.
If you believe that that's changed and that the vim docs are now out of date, please do test it extensively and show your results
From <http://vimdoc.sourceforge.net/htmldoc/if_pyth.html#python3>: | When Python 2 and Python 3 are both supported they must be loaded dynamically. | | When doing this on Linux/Unix systems and importing global symbols, this leads | to a crash when the second Python version is used."
I was trying to find more information about python2/python3 issues with vim. Google points me to some bug reports that say calling ":py print 1" then ":py3 print(1)" crashes vim. But I do not see this issue. I can run both py bindings in the same session and it works fine :py version = sys.version :py3 version = sys.version :py print(version) :py3 print(version) gives 2.7.11 (default, Dec 6 2015, 15:43:46) [GCC 5.2.0] 3.5.1 (default, Dec 7 2015, 12:58:09) [GCC 5.2.0] The VIM documentation a bit confusing. For example :help has-python states "If only one can be loaded at a time, just checking if Python 2 or 3 are available will prevent the other one from being available." makes me believe that both languages share some kind of common execution context but the example above shows that python2 and python3 have different contexts that can coexist. Anyway the new version of vim is in [testing] please check and let me know if you see any specific issues with python2/python3 bindings.
Hi On Wed, Jan 6, 2016 at 9:22 PM, Anatol Pomozov <anatol.pomozov@gmail.com> wrote:
Anyway the new version of vim is in [testing] please check and let me know if you see any specific issues with python2/python3 bindings.
Actually just found such case myself. :py import glib gives error Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/site-packages/glib/__init__.py", line 22, in <module> from glib._glib import * ImportError: /usr/lib/libpyglib-2.0-python2.so.0: undefined symbol: _Py_ZeroStruct Checking /usr/lib/libpyglib-2.0-python2.so.0 I found that it uses Python symbols but "ldd" shows no dependency to the correct libpython.so version. It seems vim dynamic loader does not known what libpython to use. I believe third-party python packages should be linked with correct libpython version. Will research it once I get more time, but if someone knows more info about this issue then please share.
participants (2)
-
Anatol Pomozov
-
Johannes Löthberg