To: vim_dev@googlegroups.com Subject: Patch 8.2.3602 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3602 Problem: Python3 test fails with Python 3.10 on MS-Windows. Solution: Adjust the expected error. (Ken Takata, closes #9118) Files: src/testdir/test_python3.vim *** ../vim-8.2.3601/src/testdir/test_python3.vim 2021-10-06 19:39:12.096052788 +0100 --- src/testdir/test_python3.vim 2021-11-16 13:05:15.919388030 +0000 *************** *** 25,30 **** --- 25,31 ---- py33_type_error_pattern = re.compile('^__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') def emsg(ei): return ei[0].__name__ + ':' + repr(ei[1].args) *************** *** 60,65 **** --- 61,67 ---- msg = msg.replace(newmsg2, oldmsg2) # Python 3.9 reports errors like "vim.command() takes ..." instead of "command() takes ..." msg = py39_type_error_pattern.sub(r'\1', msg) + msg = py310_type_error_pattern.sub(r'takes exactly \1 positional argument (\2 given)', 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: *************** *** 2639,2644 **** --- 2641,2647 ---- py3 cb = vim.current.buffer py3 << trim EOF + import os d = vim.Dictionary() ned = vim.Dictionary(foo='bar', baz='abcD') dl = vim.Dictionary(a=1) *** ../vim-8.2.3601/src/version.c 2021-11-16 12:50:42.128595270 +0000 --- src/version.c 2021-11-16 13:07:21.859140995 +0000 *************** *** 759,760 **** --- 759,762 ---- { /* Add new patch number below this line */ + /**/ + 3602, /**/ -- Seen on the back of a biker's vest: If you can read this, my wife fell off. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///