From 2cb80dd52cb8e9d0f46e0fcad8438900f88dc83d Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 15 Oct 2021 06:38:39 +0200 Subject: [PATCH] vim-python310-new-errmsg.patch: adjust test suite to Python 3.10 New Python 3.10 changes its error messages, which breaks matching in the test suite... --- vim-python310-new-errmsg.patch | 13 +++++++++++++ vim.spec | 9 +++++++++ 2 files changed, 22 insertions(+) create mode 100644 vim-python310-new-errmsg.patch diff --git a/vim-python310-new-errmsg.patch b/vim-python310-new-errmsg.patch new file mode 100644 index 00000000..68c77b30 --- /dev/null +++ b/vim-python310-new-errmsg.patch @@ -0,0 +1,13 @@ +diff --git a/src/testdir/test_python3.vim b/src/testdir/test_python3.vim +index 66d5db5..a7b3570 100644 +--- a/src/testdir/test_python3.vim ++++ b/src/testdir/test_python3.vim +@@ -3094,7 +3094,7 @@ func Test_python3_errors() + <<< Finished + > VimForeachRTP + vim.foreach_rtp(None):(, TypeError("'NoneType' object is not callable",)) +- vim.foreach_rtp(NoArgsCall()):(, TypeError('__call__() takes exactly 1 positional argument (2 given)',)) ++ vim.foreach_rtp(NoArgsCall()):(, TypeError('__call__() takes 1 positional argument but 2 were given',)) + vim.foreach_rtp(FailingCall()):(, NotImplementedError('call',)) + vim.foreach_rtp(int, 2):(, TypeError('foreach_rtp() takes exactly one argument (2 given)',)) + > import diff --git a/vim.spec b/vim.spec index e760bdac..81f360c9 100644 --- a/vim.spec +++ b/vim.spec @@ -70,6 +70,8 @@ Patch3005: vim-python3-tests.patch Patch3006: vim-crypto-warning.patch # don't ever set mouse (Fedora downstream patch) Patch3007: vim-8.0-copy-paste.patch +# F35+: Python changed the error message which test suite expects +Patch3008: vim-python310-new-errmsg.patch # uses autoconf in spec file @@ -331,6 +333,10 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch3006 -p1 -b .fips-warning %patch3007 -p1 -b .copypaste +%if 0%{?fedora} >= 35 +%patch3008 -p1 -b .python310-new-errmsg +%endif + %build cd src autoconf @@ -897,6 +903,9 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags %endif %changelog +* Thu Oct 14 2021 Zdenek Dohnal - 2:8.2.3404-2 +- adjust test suite to Python 3.10 + * Thu Oct 14 2021 Zdenek Dohnal - 2:8.2.3404-2 - remove filetype plugin from virc - it doesn't work with vi