[vim/vim] runtime(python): fix compatibility with Python 3.13 (PR #15088)

31 views
Skip to first unread message

Yaakov Selkowitz

unread,
Jun 23, 2024, 7:04:45 PM6/23/24
to vim/vim, Subscribed

_PyObject_CallFunction_SizeT was dropped in Python 3.13:

python/cpython#105051


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/15088

Commit Summary

  • 18839a1 runtime(python): fix compatibility with Python 3.13

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15088@github.com>

K.Takata

unread,
Jun 23, 2024, 7:26:00 PM6/23/24
to vim/vim, Subscribed

Does this affect when the limited API is used?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15088/c2185357251@github.com>

Yaakov Selkowitz

unread,
Jun 23, 2024, 7:56:03 PM6/23/24
to vim/vim, Subscribed

PyObject_CallFunction is listed as part of the Limited API according to https://docs.python.org/3/c-api/stable.html#contents-of-limited-api but perhaps I didn't understand your question.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15088/c2185366159@github.com>

zdohnal

unread,
Jun 27, 2024, 3:16:06 AM6/27/24
to vim/vim, Subscribed

Hi @k-takata ,

what do you mean by "VIm compiled with limited API" - do you mean "dynamic" configure option value for --enable-python3interp? If you do, I would say the patch preserves using the old API for older Pythons and uses the new one for 3.13.
Please let us know how we could change the patch - VIm is currently not building in Fedora Rawhide, because new Python 3.13 came into the compose, so we would like to help with the fix.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15088/c2193965555@github.com>

K.Takata

unread,
Jun 27, 2024, 3:38:48 AM6/27/24
to vim/vim, Subscribed

@zdohnal I meant the --with-python3-stable-abi option. (Limited API == Stable ABI)
Ideally, if Vim is compiled with --enable-python3interp=dynamic --with-python3-stable-abi=3.8, it should work with any version of Python between 3.8 and 3.13.
This is mostly useful for Windows users, so we can include this PR for now, and can check the compatibility later (if it is difficult to check).


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15088/c2194005963@github.com>

zdohnal

unread,
Jun 27, 2024, 9:49:58 AM6/27/24
to vim/vim, Subscribed

@k-takata the current Fedora releases have Python 3.12 and Centos Stream 9 has 3.9 - I've successfully built the current Vim on all mentioned platforms with the options you mentioned. Tried ':py3 print('hello')' in c9s and it worked. In Fedora, public tests which run Vim project test suite passed with the patch, so it looks good.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15088/c2194738764@github.com>

Christian Brabandt

unread,
Jul 4, 2024, 10:36:07 AM7/4/24
to vim/vim, Subscribed

Thanks all.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15088/c2209141350@github.com>

Christian Brabandt

unread,
Jul 4, 2024, 10:50:05 AM7/4/24
to vim/vim, Subscribed

Closed #15088 via 4179f19.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15088/issue_event/13396090607@github.com>

Reply all
Reply to author
Forward
0 new messages