|
1 |
| -*if_pyth.txt* For Vim version 9.1. Last change: 2023 Oct 25 |
| 1 | +*if_pyth.txt* For Vim version 9.1. Last change: 2024 May 16 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Paul Moore
|
@@ -343,7 +343,8 @@ In python vim.VIM_SPECIAL_PATH special directory is used as a replacement for
|
343 | 343 | the list of paths found in 'runtimepath': with this directory in sys.path and
|
344 | 344 | vim.path_hooks in sys.path_hooks python will try to load module from
|
345 | 345 | {rtp}/python2 (or python3) and {rtp}/pythonx (for both python versions) for
|
346 |
| -each {rtp} found in 'runtimepath'. |
| 346 | +each {rtp} found in 'runtimepath' (Note: find_module() has been removed from |
| 347 | +imp module around Python 3.12.0a7). |
347 | 348 |
|
348 | 349 | Implementation is similar to the following, but written in C: >
|
349 | 350 |
|
@@ -404,10 +405,12 @@ vim.VIM_SPECIAL_PATH *python-VIM_SPECIAL_PATH*
|
404 | 405 |
|
405 | 406 | vim.find_module(...) *python-find_module*
|
406 | 407 | vim.path_hook(path) *python-path_hook*
|
| 408 | +vim.find_spec(...) *python-find_spec* |
407 | 409 | Methods or objects used to implement path loading as described above.
|
408 | 410 | You should not be using any of these directly except for vim.path_hook
|
409 |
| - in case you need to do something with sys.meta_path. It is not |
410 |
| - guaranteed that any of the objects will exist in the future vim |
| 411 | + in case you need to do something with sys.meta_path, vim.find_spec() |
| 412 | + is available starting with Python 3.7. |
| 413 | + It is not guaranteed that any of the objects will exist in future vim |
411 | 414 | versions.
|
412 | 415 |
|
413 | 416 | vim._get_paths *python-_get_paths*
|
|
0 commit comments