home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.3 / 7.3.1314 < prev    next >
Encoding:
Internet Message Format  |  2013-07-05  |  2.6 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.1314
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.3.1314
  11. Problem:    Test 87 fails with Python 3.3.
  12. Solution:   Filter the error messages. (Taro Muraoka)
  13. Files:        src/testdir/test87.in
  14.  
  15.  
  16. *** ../vim-7.3.1313/src/testdir/test87.in    2013-06-26 21:49:46.000000000 +0200
  17. --- src/testdir/test87.in    2013-07-06 13:41:30.000000000 +0200
  18. ***************
  19. *** 829,834 ****
  20. --- 829,838 ----
  21.   :fun D()
  22.   :endfun
  23.   py3 << EOF
  24. + import re
  25. + py33_type_error_pattern = re.compile('^__call__\(\) takes (\d+) positional argument but (\d+) were given$')
  26.   def ee(expr, g=globals(), l=locals()):
  27.       try:
  28.           try:
  29. ***************
  30. *** 836,841 ****
  31. --- 840,854 ----
  32.           except Exception as e:
  33.               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."):
  34.                   cb.append(expr + ':' + repr((e.__class__, AttributeError(str(e)[str(e).rfind(" '") + 2:-1]))))
  35. +             elif sys.version_info >= (3, 3) and e.__class__ is ImportError and str(e).find('No module named \'') >= 0:
  36. +                 cb.append(expr + ':' + repr((e.__class__, ImportError(str(e).replace("'", '')))))
  37. +             elif sys.version_info >= (3, 3) and e.__class__ is TypeError:
  38. +                 m = py33_type_error_pattern.search(str(e))
  39. +                 if m:
  40. +                     msg = '__call__() takes exactly {0} positional argument ({1} given)'.format(m.group(1), m.group(2))
  41. +                     cb.append(expr + ':' + repr((e.__class__, TypeError(msg))))
  42. +                 else:
  43. +                     cb.append(expr + ':' + repr((e.__class__, e)))
  44.               else:
  45.                   cb.append(expr + ':' + repr((e.__class__, e)))
  46.           else:
  47. *** ../vim-7.3.1313/src/version.c    2013-07-06 13:35:04.000000000 +0200
  48. --- src/version.c    2013-07-06 13:42:50.000000000 +0200
  49. ***************
  50. *** 730,731 ****
  51. --- 730,733 ----
  52.   {   /* Add new patch number below this line */
  53. + /**/
  54. +     1314,
  55.   /**/
  56.  
  57. -- 
  58. BRIDGEKEEPER: What is your favorite editor?
  59. GAWAIN:       Emacs ...  No, Viiiiiiiiiiimmmmmmm!
  60.            "Monty Python and the Holy editor wars" PYTHON (MONTY) SOFTWARE LTD
  61.  
  62.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  63. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  64. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  65.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  66.