patch 9.1.1869: tests: test failures with Python 3.14 and test_python3
Commit:
https://github.com/vim/vim/commit/6cb995970eeb01453b3ef93ffb141d515950e9d7
Author: Yee Cheng Chin <[email protected]>
Date: Fri Oct 24 15:40:09 2025 +0000
patch 9.1.1869: tests: test failures with Python 3.14 and test_python3
Problem: tests: test failures with Python 3.14 and test_python3
Solution: Adjust the expected error message (Yee Cheng Chin)
Python 3.14 changed the error message from "argument must be 2-item
sequence" to "argument must be 2-item tuple". Fix test to account for
that. Otherwise the error message for the `vim.current.window.cursor =
True` line would not match.
closes: #18629
Signed-off-by: Yee Cheng Chin <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/testdir/test_python3.vim b/src/testdir/test_python3.vim
index bd000ef05..3cc5ff2d9 100644
--- a/src/testdir/test_python3.vim
+++ b/src/testdir/test_python3.vim
@@ -28,6 +28,7 @@ func Test_AAA_python3_setup()
py37_exception_repr = re.compile(r'([^\(\),])(\)+)$')
py39_type_error_pattern = re.compile(r'\w+\.([^(]+\(\) takes)')
py310_type_error_pattern = re.compile(r'takes (\d+) positional argument
but (\d+) were given')
+ py314_type_error_tuple_pattern = re.compile(r'must be (\d+)-item tuple')
def emsg(ei):
return ei[0].__name__ + ':' + repr(ei[1].args)
@@ -64,6 +65,8 @@ func Test_AAA_python3_setup()
# Python 3.9 reports errors like "vim.command() takes
..." instead of "command() takes ..."
msg = py39_type_error_pattern.sub(r' ', msg)
msg = py310_type_error_pattern.sub(r'takes exactly
positional argument ( given)', msg)
+ # Python 3.14 has specific error messages for Tuple's
+ msg = py314_type_error_tuple_pattern.sub(r'must be
-item sequence', msg)
elif sys.version_info >= (3, 5) and e.__class__ is ValueError
and str(e) == 'embedded null byte':
msg = repr((TypeError, TypeError('expected bytes with no
null')))
else:
diff --git a/src/version.c b/src/version.c
index 0d6a5fd12..3001dbd1c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1869,
/**/
1868,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1vCJyW-00HKIG-Vd%40256bit.org.