Skip to content

Commit 79b063a

Browse files
authored
Fix CI to be green again. Drop support for py3.8, py3.9 and Vim < 9.0 (#1567)
Also fix ci to be green again: - Download VIM releases by tag from GitHub instead from FTP - Fix several warnings about wrong escape sequences that Python >= 3.12 started to vomit on the screen. - `assertRegexpMatches` is now called `assertRegex`.
1 parent 35252b3 commit 79b063a

File tree

11 files changed

+32
-32
lines changed

11 files changed

+32
-32
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
include:
16-
- { vim_version: "8.1", python_image: "3.8-bookworm", tag: "vim_81_py38" }
17-
- { vim_version: "8.2", python_image: "3.8-bookworm", tag: "vim_82_py38" }
18-
- { vim_version: "git", python_image: "3.8-bookworm", tag: "vim_git_py38" }
19-
20-
- { vim_version: "8.1", python_image: "3.9-bookworm", tag: "vim_81_py39" }
21-
- { vim_version: "8.2", python_image: "3.9-bookworm", tag: "vim_82_py39" }
22-
- { vim_version: "9.0", python_image: "3.9-bookworm", tag: "vim_90_py39" }
23-
- { vim_version: "git", python_image: "3.9-bookworm", tag: "vim_git_py39" }
24-
25-
# Vim 8.1 and 8.2 do not build with python 3.10.
26-
- { vim_version: "9.0", python_image: "3.10-bookworm", tag: "vim_90_py310" }
16+
- { vim_version: "9.0.0000", python_image: "3.10-bookworm", tag: "vim_90_py310" }
17+
- { vim_version: "9.1.0000", python_image: "3.10-bookworm", tag: "vim_91_py310" }
2718
- { vim_version: "git", python_image: "3.10-bookworm", tag: "vim_git_py310" }
2819

29-
# Vim 8.1 and 8.2 hang forever with python 3.11.
30-
- { vim_version: "9.0", python_image: "3.11-bookworm", tag: "vim_90_py311" }
20+
- { vim_version: "9.0.0000", python_image: "3.11-bookworm", tag: "vim_90_py311" }
21+
- { vim_version: "9.1.0000", python_image: "3.11-bookworm", tag: "vim_91_py311" }
3122
- { vim_version: "git", python_image: "3.11-bookworm", tag: "vim_git_py311" }
3223

24+
- { vim_version: "9.0.0000", python_image: "3.12-bookworm", tag: "vim_90_py312" }
25+
- { vim_version: "9.1.0000", python_image: "3.12-bookworm", tag: "vim_91_py312" }
26+
- { vim_version: "git", python_image: "3.12-bookworm", tag: "vim_git_py312" }
27+
28+
# Vim 9.0 and 9.1 prior to 417 hang forever with python 3.13 due to a bug fixed here
29+
# https://github.com/vim/vim/issues/14776.
30+
- { vim_version: "9.1.0417", python_image: "3.13-bookworm", tag: "vim_91_py313" }
31+
- { vim_version: "git", python_image: "3.13-bookworm", tag: "vim_git_py313" }
32+
3333
name: Build & Test using Docker
3434
steps:
3535
- uses: actions/checkout@v2

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ mypy = "*"
1313
black = "*"
1414

1515
[requires]
16-
python_version = "3.7"
16+
python_version = "3.10"
1717

1818
[pipenv]
1919
allow_prereleases = true

docker/download_vim.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mkdir -p /src && cd /src
88
if [[ $VIM_VERSION == "git" ]]; then
99
git clone https://github.com/vim/vim
1010
else
11-
curl https://ftp.nluug.nl/pub/vim/unix/vim-${VIM_VERSION}.tar.bz2 -o vim.tar.bz2
12-
tar xjf vim.tar.bz2
13-
mv -v vim?? vim
11+
curl -L https://github.com/vim/vim/archive/refs/tags/v${VIM_VERSION}.tar.gz -o vim.tar.gz
12+
tar xf vim.tar.gz && rm vim.tar.gz
13+
mv -v vim* vim
1414
fi

test/test_Autocommands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ class Autocommands(_VimTest):
1616
+ JF
1717
+ " done "
1818
+ ESC
19-
+ ':execute "normal aM" . g:mapper_call_count . "\<Esc>"'
19+
+ ':execute "normal aM" . g:mapper_call_count . "\\<Esc>"'
2020
+ "\n"
21-
+ ':execute "normal aU" . g:unmapper_call_count . "\<Esc>"'
21+
+ ':execute "normal aU" . g:unmapper_call_count . "\\<Esc>"'
2222
+ "\n"
2323
)
2424
wanted = "[ [ bar ] ] done M1U1"

test/test_Choices.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class Choices_With_Mirror_ContinueMirroring_EvenAfterSelectionDone(_VimTest):
101101
class Choices_ShouldThrowErrorWithZeroTabstop(_VimTest):
102102
snippets = ("test", "${0|red,blue|}")
103103
keys = "test" + EX
104-
expected_error = "Choices selection is not supported on \$0"
104+
expected_error = r"Choices selection is not supported on \$0"
105105

106106

107107
class Choices_CanEscapeCommaInsideChoiceItem(_VimTest):

test/test_Interpolation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ class PythonCode_CanOverwriteTabstop(_VimTest):
494494
"""$1`!p if len(t[1]) > 3 and len(t[2]) == 0:
495495
t[2] = t[1][2:];
496496
t[1] = t[1][:2] + '-\\n\\t';
497-
vim.command('call feedkeys("\<End>", "n")');
497+
vim.command('call feedkeys("\\\\<End>", "n")');
498498
`$2""",
499499
)
500500
keys = "test" + EX + "blah" + ", bah"

test/test_ParseSnippets.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ class ParseSnippets_MultiWord_NoContainer(_VimTest):
220220
}
221221
keys = "test snip" + EX
222222
wanted = keys
223-
expected_error = "Invalid multiword trigger: 'test snip' in \S+:2"
223+
expected_error = "Invalid multiword trigger: 'test snip' in \\S+:2"
224224

225225

226226
class ParseSnippets_MultiWord_UnmatchedContainer(_VimTest):
@@ -233,7 +233,7 @@ class ParseSnippets_MultiWord_UnmatchedContainer(_VimTest):
233233
}
234234
keys = "inv snip" + EX
235235
wanted = keys
236-
expected_error = "Invalid multiword trigger: '!inv snip/' in \S+:2"
236+
expected_error = "Invalid multiword trigger: '!inv snip/' in \\S+:2"
237237

238238

239239
class ParseSnippets_Global_Python_After(_VimTest):
@@ -324,7 +324,7 @@ class ParseSnippets_PrintPythonStacktraceMultiline(_VimTest):
324324
}
325325
keys = "test" + EX
326326
wanted = keys
327-
expected_error = " > \s+qwe"
327+
expected_error = " > \\s+qwe"
328328

329329

330330
class ParseSnippets_PrintErroneousSnippet(_VimTest):

test/test_SnippetOptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class SnippetOptions_Regex_Multiple(_VimTest):
219219

220220

221221
class _Regex_Self(_VimTest):
222-
snippets = ("((?<=\W)|^)(\.)", "self.", "", "r")
222+
snippets = ("((?<=\\W)|^)(\\.)", "self.", "", "r")
223223

224224

225225
class SnippetOptions_Regex_Self_Start(_Regex_Self):

test/test_Transformation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Transformation_SimpleCaseTransformInFrontDefVal_ECR(_VimTest):
2929

3030

3131
class Transformation_MultipleTransformations_ECR(_VimTest):
32-
snippets = ("test", "${1:Some Text}${1/.+/\\U$0\E/}\n${1/.+/\L$0\E/}")
32+
snippets = ("test", "${1:Some Text}${1/.+/\\U$0\\E/}\n${1/.+/\\L$0\\E/}")
3333
keys = "test" + EX + "SomE tExt "
3434
wanted = "SomE tExt SOME TEXT \nsome text "
3535

@@ -89,19 +89,19 @@ class Transformation_CleverTransformUpercaseChar_ExpectCorrectResult(_VimTest):
8989

9090

9191
class Transformation_CleverTransformLowercaseChar_ExpectCorrectResult(_VimTest):
92-
snippets = ("test", "$1 ${1/(.*)/\l$1/}")
92+
snippets = ("test", "$1 ${1/(.*)/\\l$1/}")
9393
keys = "test" + EX + "Hallo"
9494
wanted = "Hallo hallo"
9595

9696

9797
class Transformation_CleverTransformLongUpper_ExpectCorrectResult(_VimTest):
98-
snippets = ("test", "$1 ${1/(.*)/\\U$1\E/}")
98+
snippets = ("test", "$1 ${1/(.*)/\\U$1\\E/}")
9999
keys = "test" + EX + "hallo"
100100
wanted = "hallo HALLO"
101101

102102

103103
class Transformation_CleverTransformLongLower_ExpectCorrectResult(_VimTest):
104-
snippets = ("test", "$1 ${1/(.*)/\L$1\E/}")
104+
snippets = ("test", "$1 ${1/(.*)/\\L$1\\E/}")
105105
keys = "test" + EX + "HALLO"
106106
wanted = "HALLO hallo"
107107

@@ -115,7 +115,7 @@ class Transformation_SimpleCaseAsciiResult(_VimTest):
115115

116116
class Transformation_LowerCaseAsciiResult(_VimTest):
117117
skip_if = lambda self: no_unidecode_available()
118-
snippets = ("ascii", "$1 ${1/(.*)/\L$1\E/a}")
118+
snippets = ("ascii", "$1 ${1/(.*)/\\L$1\\E/a}")
119119
keys = "ascii" + EX + "éèàçôïÉÈÀÇÔÏ€"
120120
wanted = "éèàçôïÉÈÀÇÔÏ€ eeacoieeacoieur"
121121

test/test_UltiSnipFunc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class TestLangmapWithUtf8_ExpectCorrectResult(_VimTest):
8686

8787
def _before_test(self):
8888
self.vim.send_to_vim(
89-
":set langmap=йq,цw,уe,кr,еt,нy,гu,шi,щo,зp,х[,ъ],фa,ыs,вd,аf,пg,рh,оj,лk,дl,ж\\;,э',яz,чx,сc,мv,иb,тn,ьm,ю.,ё',ЙQ,ЦW,УE,КR,ЕT,НY,ГU,ШI,ЩO,ЗP,Х\{,Ъ\},ФA,ЫS,ВD,АF,ПG,РH,ОJ,ЛK,ДL,Ж\:,Э\",ЯZ,ЧX,СC,МV,ИB,ТN,ЬM,Б\<,Ю\>\n"
89+
":set langmap=йq,цw,уe,кr,еt,нy,гu,шi,щo,зp,х[,ъ],фa,ыs,вd,аf,пg,рh,оj,лk,дl,ж\\;,э',яz,чx,сc,мv,иb,тn,ьm,ю.,ё',ЙQ,ЦW,УE,КR,ЕT,НY,ГU,ШI,ЩO,ЗP,Х\\{,Ъ\\},ФA,ЫS,ВD,АF,ПG,РH,ОJ,ЛK,ДL,Ж\:,Э\",ЯZ,ЧX,СC,МV,ИB,ТN,ЬM,Б\<,Ю\>\n"
9090
)
9191

9292

0 commit comments

Comments
 (0)