]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.0784: there are several problems with python 3.13 v9.1.0784
authorBoris Staletic <boris.staletic@protonmail.com>
Mon, 14 Oct 2024 18:28:39 +0000 (20:28 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 14 Oct 2024 18:28:39 +0000 (20:28 +0200)
commit83a06705dcfb10e13a75eace6319cb77b6af4d29
treed9d9fdd6698cdab926b0f7bdfd49f10ff5c85240
parent322ad0c953b7a3023cd2a65db61d05e180a5d682
patch 9.1.0784: there are several problems with python 3.13

Problem:  there are several problems with python 3.13
Solution: fix the problems in the python3 interface (Boris Staletic)

This commit does the following things:
1) Since python 3.13.0b1, all statically defined objects are "immortal".
   Besides never getting garbage collected, this also affects reference
   counting:

   - Immportal objects have a reference count of 2^32-1.
   - Reference counting is a no-op.

   All this is considered implementation details by cpython, so
   documentation is next to non-existent.

   Relevant CPython source code:
   https://github.com/python/cpython/blob/v3.13.0/Include/object.h#L62-L107
   https://github.com/python/cpython/blob/v3.13.0/Include/object.h#L389-L391

2) Opt-out of ANSI-painted python stack traces

3) Make python error message severity more consistent

fixes: #15838
closes: #15842

Signed-off-by: Boris Staletic <boris.staletic@protonmail.com>
Signed-off-by: puremourning <puremourning@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/if_py_both.h
src/if_python3.c
src/testdir/test_python3.vim
src/version.c