To: vim_dev@googlegroups.com
Subject: Patch 7.3.1314
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.1314
Problem: Test 87 fails with Python 3.3.
Solution: Filter the error messages. (Taro Muraoka)
Files: src/testdir/test87.in
*** ../vim-7.3.1313/src/testdir/test87.in 2013-06-26 21:49:46.000000000 +0200
--- src/testdir/test87.in 2013-07-06 13:41:30.000000000 +0200
***************
*** 829,834 ****
--- 829,838 ----
:fun D()
:endfun
py3 << EOF
+ import re
+
+ py33_type_error_pattern = re.compile('^__call__\(\) takes (\d+) positional argument but (\d+) were given$')
+
def ee(expr, g=globals(), l=locals()):
try:
try:
***************
*** 836,841 ****
--- 840,854 ----
except Exception as e:
if sys.version_info >= (3, 3) and e.__class__ is AttributeError and str(e).find('has no attribute')>=0 and not str(e).startswith("'vim."):
cb.append(expr + ':' + repr((e.__class__, AttributeError(str(e)[str(e).rfind(" '") + 2:-1]))))
+ elif sys.version_info >= (3, 3) and e.__class__ is ImportError and str(e).find('No module named \'') >= 0:
+ cb.append(expr + ':' + repr((e.__class__, ImportError(str(e).replace("'", '')))))
+ elif sys.version_info >= (3, 3) and e.__class__ is TypeError:
+ m = py33_type_error_pattern.search(str(e))
+ if m:
+ msg = '__call__() takes exactly {0} positional argument ({1} given)'.format(m.group(1), m.group(2))
+ cb.append(expr + ':' + repr((e.__class__, TypeError(msg))))
+ else:
+ cb.append(expr + ':' + repr((e.__class__, e)))
else:
cb.append(expr + ':' + repr((e.__class__, e)))
else:
*** ../vim-7.3.1313/src/version.c 2013-07-06 13:35:04.000000000 +0200
--- src/version.c 2013-07-06 13:42:50.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
{ /* Add new patch number below this line */
+ /**/
+ 1314,
/**/
--
BRIDGEKEEPER: What is your favorite editor?
GAWAIN: Emacs ... No, Viiiiiiiiiiimmmmmmm!
"Monty Python and the Holy editor wars" PYTHON (MONTY) SOFTWARE LTD
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///