fix test suite from python3 syntax warnings

This commit is contained in:
Zdenek Dohnal 2023-08-11 16:59:51 +02:00
parent 3094c97ae1
commit 6121c87abc
2 changed files with 26 additions and 1 deletions

18
vim-pysyntaxwarn.patch Normal file
View File

@ -0,0 +1,18 @@
diff --git a/src/testdir/test_python3.vim b/src/testdir/test_python3.vim
index b7140ee..e975cb6 100644
--- a/src/testdir/test_python3.vim
+++ b/src/testdir/test_python3.vim
@@ -22,10 +22,10 @@ func Test_AAA_python3_setup()
import sys
import re
- py33_type_error_pattern = re.compile('^__call__\(\) takes (\d+) positional argument but (\d+) were given$')
+ py33_type_error_pattern = re.compile(r'^__call__\(\) takes (\d+) positional argument but (\d+) were given$')
py37_exception_repr = re.compile(r'([^\(\),])(\)+)$')
- py39_type_error_pattern = re.compile('\w+\.([^(]+\(\) takes)')
- py310_type_error_pattern = re.compile('takes (\d+) positional argument but (\d+) were given')
+ py39_type_error_pattern = re.compile(r'\w+\.([^(]+\(\) takes)')
+ py310_type_error_pattern = re.compile(r'takes (\d+) positional argument but (\d+) were given')
def emsg(ei):
return ei[0].__name__ + ':' + repr(ei[1].args)

View File

@ -50,7 +50,7 @@ Summary: The VIM editor
URL: http://www.vim.org/
Name: vim
Version: %{baseversion}.%{patchlevel}
Release: 3%{?dist}
Release: 4%{?dist}
Epoch: 2
# swift.vim contains Apache 2.0 with runtime library exception:
# which is taken as Apache-2.0 WITH Swift-exception - reported to legal as https://gitlab.com/fedora/legal/fedora-license-data/-/issues/188
@ -102,6 +102,9 @@ Patch3005: vim-8.0-copy-paste.patch
Patch3006: 0001-if_python3.c-Fix-building-dynamic-Python3-interprete.patch
# https://github.com/vim/vim/pull/12575 + https://github.com/vim/vim/pull/12575#issuecomment-1634226250
Patch3007: perl538.patch
# fix python syntax warnings which make test suite fail
# reported upstream https://github.com/vim/vim/pull/12765
Patch3008: vim-pysyntaxwarn.patch
# uses autoconf in spec file
@ -414,6 +417,7 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk
%patch -P 3005 -p1 -b .copypaste
%patch -P 3006 -p1 -b .python312
%patch -P 3007 -p1 -b .perl538
%patch -P 3008 -p1 -b .pysyntaxwarn
%build
cd src
@ -1036,6 +1040,9 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags
%changelog
* Fri Aug 11 2023 Zdenek Dohnal <zdohnal@redhat.com> - 2:9.0.1677-4
- fix test suite from python3 syntax warnings
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2:9.0.1677-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild