Repository navigation
Conversation
Vim with dynamic Python binds to the Python library on the first Python command. Delay Python calls as much as possible to help with binding to the proper version.
On activation the following sequence happens: 1. Find the virtual environment directory: no Python calls 2. Determine the virtual environment Python version: no Python calls 3. Determine the Vim Python version: no Python calls with dyn-stable, some Python calls otherwise 4. Change 'pythonthreedll' to match the virtual environment Python Vim and Neovim can be built against a specific Python version. Vim exclusively can support a range of Python versions with dyn-stable feature. With dyn-stable Vim binds to the default Python version upon the first Python call. 'pythonthreedll' option can make Vim bind to a specific version instead. Changing it after the bind does nothing. Since step 3 involve Python calls on non dyn-stable setups, Vim will bind to the default Python version as required. Binding to another version will probably lead to crashes and problems. Since step 3 involve no Python calls on dyn-stable setups, Vim can bind to the virtual environment Python version. This will prevent C extensions ABI mismatch, which cannot be mixed between versions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.