Commit: patch 9.1.1673: if_python: still support for Python 1

1 view
Skip to first unread message

Christian Brabandt

unread,
Aug 23, 2025, 10:45:13 AM8/23/25
to vim...@googlegroups.com
patch 9.1.1673: if_python: still support for Python 1

Commit: https://github.com/vim/vim/commit/e2a6ba00f1d4448d967c30c4e7cc253f4d6b329a
Author: Hirohito Higashi <h.eas...@gmail.com>
Date: Sat Aug 23 16:31:15 2025 +0200

patch 9.1.1673: if_python: still support for Python 1

Problem: if_python: still support for Python 1
Solution: Drop outdated code (Hirohito Higashi)

closes: #18092

Signed-off-by: Hirohito Higashi <h.eas...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/if_python.c b/src/if_python.c
index 43b780be7..6ba0f90fa 100644
--- a/src/if_python.c
+++ b/src/if_python.c
@@ -838,10 +838,6 @@ static int PythonMod_Init(void);
///////////////////////////////////////////////////////
// 1. Python interpreter main program.

-#if PYTHON_API_VERSION < 1007 // Python 1.4
-typedef PyObject PyThreadState;
-#endif
-
#ifndef PY_CAN_RECURSE
static PyThreadState *saved_python_thread = NULL;

@@ -1561,17 +1557,6 @@ do_pyeval(char_u *str, dict_T *locals, typval_T *rettv)
}
}

-// Don't generate a prototype for the next function, it generates an error on
-// newer Python versions.
-#if PYTHON_API_VERSION < 1007 /* Python 1.4 */ && !defined(PROTO)
-
- char *
-Py_GetProgramName(void)
-{
- return "vim";
-}
-#endif // Python 1.4
-
int
set_ref_in_python(int copyID)
{
diff --git a/src/version.c b/src/version.c
index 718c41500..3a664bfb2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -724,6 +724,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1673,
/**/
1672,
/**/
Reply all
Reply to author
Forward
0 new messages